mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Refactored shape brushes to use the properties system
This commit is contained in:
1 parent
128a656f4b
commit
ebea8b16a3
40 files changed
+650
-686
No files matched your search
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Artemis.Core.Exceptions;
|
||||
using Artemis.Core.Models.Profile.KeyframeEngines;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.Utilities;
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
using Newtonsoft.Json;
|
||||
@@ -13,9 +14,10 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
{
|
||||
private object _baseValue;
|
||||
|
||||
protected BaseLayerProperty(Layer layer, BaseLayerProperty parent, string id, string name, string description, Type type)
|
||||
protected BaseLayerProperty(Layer layer, PluginInfo pluginInfo, BaseLayerProperty parent, string id, string name, string description, Type type)
|
||||
{
|
||||
Layer = layer;
|
||||
PluginInfo = pluginInfo;
|
||||
Parent = parent;
|
||||
Id = id;
|
||||
Name = name;
|
||||
@@ -23,8 +25,14 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
Type = type;
|
||||
CanUseKeyframes = true;
|
||||
|
||||
// This can only be null if accessed internally
|
||||
if (PluginInfo == null)
|
||||
PluginInfo = Constants.CorePluginInfo;
|
||||
|
||||
Children = new List<BaseLayerProperty>();
|
||||
BaseKeyframes = new List<BaseKeyframe>();
|
||||
|
||||
parent?.Children.Add(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -32,6 +40,11 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
/// </summary>
|
||||
public Layer Layer { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Info of the plugin associated with this property
|
||||
/// </summary>
|
||||
public PluginInfo PluginInfo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the parent property of this property.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user