mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-31 17:53:32 +00:00
😑
This commit is contained in:
parent
b659be1f48
commit
10e9e9446a
@ -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);
|
||||||
|
|
||||||
@ -230,7 +237,7 @@ namespace Artemis.Core.Models.Profile
|
|||||||
// let properties subscribe to the update event and update themselves
|
// let properties subscribe to the update event and update themselves
|
||||||
OnPropertyGroupUpdating();
|
OnPropertyGroupUpdating();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeProperty(RenderProfileElement profileElement, string path, BaseLayerProperty instance)
|
private void InitializeProperty(RenderProfileElement profileElement, string path, BaseLayerProperty instance)
|
||||||
{
|
{
|
||||||
Guid pluginGuid;
|
Guid pluginGuid;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user