This commit is contained in:
SpoinkyNL committed 2020-08-03 00:18:42 +02:00
1 parent b659be1f48
commit 10e9e9446a
1 file changed
+7
@@ -156,6 +156,13 @@ namespace Artemis.Core.Models.Profile
instance.ProfileElement = profileElement; instance.ProfileElement = profileElement;
instance.Parent = this; instance.Parent = this;
instance.PropertyDescription = (PropertyDescriptionAttribute) propertyDescription; 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.");
}
instance.KeyframesSupported = instance.PropertyDescription.KeyframesSupported; instance.KeyframesSupported = instance.PropertyDescription.KeyframesSupported;
InitializeProperty(profileElement, path + propertyInfo.Name, instance); InitializeProperty(profileElement, path + propertyInfo.Name, instance);