mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Layer properties - Fixed some checks
This commit is contained in:
1 parent
10e9e9446a
commit
7b1cefca8b
3 files changed
+5
-10
No files matched your search
@@ -156,14 +156,9 @@ namespace Artemis.Core.Models.Profile
|
||||
instance.ProfileElement = profileElement;
|
||||
instance.Parent = this;
|
||||
instance.PropertyDescription = (PropertyDescriptionAttribute) propertyDescription;
|
||||
if (!instance.KeyframesSupported && instance.PropertyDescription.KeyframesSupported)
|
||||
{
|
||||
throw new ArtemisPluginException($"Failed to create instance of layer property at {path + propertyInfo.Name}. " +
|
||||
$"In the description attribute {nameof(instance.KeyframesSupported)} is set to true but this layer property type " +
|
||||
"does not support keyframes.");
|
||||
}
|
||||
if (instance.PropertyDescription.DisableKeyframes)
|
||||
instance.KeyframesSupported = false;
|
||||
|
||||
instance.KeyframesSupported = instance.PropertyDescription.KeyframesSupported;
|
||||
InitializeProperty(profileElement, path + propertyInfo.Name, instance);
|
||||
|
||||
propertyInfo.SetValue(this, instance);
|
||||
|
||||
Reference in new issue
Block a user