mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Profile editor - Reimplemented a way to get all keyframe times
New implementation does not add clutter to the core
This commit is contained in:
1 parent
952e28c9b9
commit
af133a5881
6 files changed
+63
-39
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Artemis.Core;
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
using Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree;
|
||||
@@ -69,5 +70,28 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties
|
||||
disposableChild.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateOrder(int order)
|
||||
{
|
||||
LayerPropertyGroup.LayerEffect.Order = order;
|
||||
NotifyOfPropertyChange(nameof(IsExpanded));
|
||||
}
|
||||
|
||||
public List<TimeSpan> GetAllKeyframePositions(bool expandedOnly)
|
||||
{
|
||||
var result = new List<TimeSpan>();
|
||||
if (expandedOnly == IsExpanded)
|
||||
return result;
|
||||
|
||||
foreach (var child in Children)
|
||||
{
|
||||
if (child is LayerPropertyViewModel layerPropertyViewModel)
|
||||
result.AddRange(layerPropertyViewModel.LayerPropertyTimelineViewModel.GetAllKeyframePositions());
|
||||
else if (child is LayerPropertyGroupViewModel layerPropertyGroupViewModel)
|
||||
result.AddRange(layerPropertyGroupViewModel.GetAllKeyframePositions(expandedOnly));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user