Keyframes - If needed enable keyframes on properties when pasting

This commit is contained in:
SpoinkyNL committed 2020-12-03 19:48:03 +01:00
1 parent 408916ea6a
commit 5b0e1c91dd
3 files changed
+11

No files matched your search

@@ -87,6 +87,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Timeline
private void UpdateKeyframes()
{
NotifyOfPropertyChange(nameof(LayerProperty.KeyframesEnabled));
// Only show keyframes if they are enabled
if (LayerProperty.KeyframesEnabled)
{
@@ -23,6 +23,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
LayerProperty.VisibilityChanged += LayerPropertyOnVisibilityChanged;
LayerProperty.DataBindingEnabled += LayerPropertyOnDataBindingChange;
LayerProperty.DataBindingDisabled += LayerPropertyOnDataBindingChange;
LayerProperty.KeyframesToggled += LayerPropertyOnKeyframesToggled;
LayerPropertyViewModel.IsVisible = !LayerProperty.IsHidden;
}
@@ -100,6 +101,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
LayerProperty.VisibilityChanged -= LayerPropertyOnVisibilityChanged;
LayerProperty.DataBindingEnabled -= LayerPropertyOnDataBindingChange;
LayerProperty.DataBindingDisabled -= LayerPropertyOnDataBindingChange;
LayerProperty.KeyframesToggled -= LayerPropertyOnKeyframesToggled;
}
#endregion
@@ -121,6 +123,11 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
NotifyOfPropertyChange(nameof(HasDataBinding));
}
private void LayerPropertyOnKeyframesToggled(object sender, LayerPropertyEventArgs<T> e)
{
NotifyOfPropertyChange(nameof(KeyframesEnabled));
}
#endregion
}