Core - Moved layer properties to their own class

This commit is contained in:
Robert committed 2020-03-09 19:57:17 +01:00
1 parent 88ac5a3951
commit 0a5f16a0f4
8 files changed
+274 -221

No files matched your search

@@ -58,7 +58,7 @@ namespace Artemis.Core.Plugins.LayerBrush
protected LayerProperty<T> RegisterLayerProperty<T>(BaseLayerProperty parent, string id, string name, string description, T defaultValue = default)
{
var property = new LayerProperty<T>(Layer, Descriptor.LayerBrushProvider.PluginInfo, parent, id, name, description) {Value = defaultValue};
Layer.RegisterLayerProperty(property);
Layer.Properties.RegisterLayerProperty(property);
// It's fine if this is null, it'll be picked up by SetLayerService later
_layerService?.InstantiateKeyframeEngine(property);
return property;
@@ -77,9 +77,9 @@ namespace Artemis.Core.Plugins.LayerBrush
protected LayerProperty<T> RegisterLayerProperty<T>(string id, string name, string description, T defaultValue = default)
{
var property = new LayerProperty<T>(
Layer, Descriptor.LayerBrushProvider.PluginInfo, Layer.BrushReferenceProperty.Parent, id, name, description
Layer, Descriptor.LayerBrushProvider.PluginInfo, Layer.Properties.BrushReference.Parent, id, name, description
) {Value = defaultValue};
Layer.RegisterLayerProperty(property);
Layer.Properties.RegisterLayerProperty(property);
// It's fine if this is null, it'll be picked up by SetLayerService later
_layerService?.InstantiateKeyframeEngine(property);
return property;