mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Nuget - Updated packages
Brush properties - Added default values Brush properties - Removed option to always auto-expand groups Layer properties - Remember expanded/collapsed groups Storage - Added migration system Storage - Added migration that removes profiles made in the old layer properties format Layer timeline - Added back zoom functionality
This commit is contained in:
1 parent
221c8bc7e7
commit
dd000e7bed
58 files changed
+329
-188
No files matched your search
@@ -141,5 +141,7 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public abstract void ApplyDefaultValue();
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,12 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
internal set => _currentValue = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default value of this layer property. If set, this value is automatically applied if the property has no
|
||||
/// value in storage
|
||||
/// </summary>
|
||||
public T DefaultValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a read-only list of all the keyframes on this layer property
|
||||
/// </summary>
|
||||
@@ -275,5 +281,10 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
EasingFunction = (int) k.EasingFunction
|
||||
}));
|
||||
}
|
||||
|
||||
public override void ApplyDefaultValue()
|
||||
{
|
||||
CurrentValue = DefaultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using Artemis.Core.Exceptions;
|
||||
using Artemis.Core.Models.Profile.Colors;
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
{
|
||||
@@ -11,6 +12,18 @@ namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
KeyframesSupported = false;
|
||||
}
|
||||
|
||||
internal override void ApplyToLayerProperty(PropertyEntity entity, LayerPropertyGroup layerPropertyGroup, bool fromStorage)
|
||||
{
|
||||
base.ApplyToLayerProperty(entity, layerPropertyGroup, fromStorage);
|
||||
|
||||
// Don't allow color gradients to be null
|
||||
if (BaseValue == null)
|
||||
{
|
||||
BaseValue = DefaultValue ?? new ColorGradient();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected override void UpdateCurrentValue(float keyframeProgress, float keyframeProgressEased)
|
||||
{
|
||||
throw new ArtemisCoreException("Color Gradients do not support keyframes.");
|
||||
|
||||
Reference in new issue
Block a user