diff --git a/src/Artemis.Core/Models/Profile/LayerPropertyGroup.cs b/src/Artemis.Core/Models/Profile/LayerPropertyGroup.cs index e20d958ae..70893bc8f 100644 --- a/src/Artemis.Core/Models/Profile/LayerPropertyGroup.cs +++ b/src/Artemis.Core/Models/Profile/LayerPropertyGroup.cs @@ -156,6 +156,13 @@ 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."); + } + instance.KeyframesSupported = instance.PropertyDescription.KeyframesSupported; InitializeProperty(profileElement, path + propertyInfo.Name, instance); @@ -230,7 +237,7 @@ namespace Artemis.Core.Models.Profile // let properties subscribe to the update event and update themselves OnPropertyGroupUpdating(); } - + private void InitializeProperty(RenderProfileElement profileElement, string path, BaseLayerProperty instance) { Guid pluginGuid;