Layers - Finished effects on layers, groups still missing

Effects - Added filter effect with different SkiaSharp image filters
This commit is contained in:
SpoinkyNL committed 2020-06-16 00:25:04 +02:00
1 parent 58a964b872
commit a62d5544cf
18 files changed
+264 -55

No files matched your search

+2 -1
View File
@@ -166,6 +166,7 @@ namespace Artemis.Core.Models.Profile
{
var layerEffectEntity = new LayerEffectEntity
{
Id = layerEffect.EntityId,
PluginGuid = layerEffect.PluginInfo.Guid,
EffectType = layerEffect.GetType().Name,
Name = layerEffect.Name,
@@ -524,7 +525,7 @@ namespace Artemis.Core.Models.Profile
var index = 0;
foreach (var baseLayerEffect in LayerEffects.OrderBy(e => e.Order))
{
baseLayerEffect.UpdateOrder(index + 1);
baseLayerEffect.Order = Order = index + 1;
index++;
}
@@ -78,6 +78,11 @@ namespace Artemis.Core.Models.Profile
}
}
/// <summary>
/// Gets or sets whether the group is expanded in the UI
/// </summary>
public bool IsExpanded { get; set; }
/// <summary>
/// A list of all layer properties in this group
/// </summary>
@@ -107,21 +112,6 @@ namespace Artemis.Core.Models.Profile
return _allLayerProperties;
}
public void UpdateOrder(int oldOrder)
{
// Expanded state is tied to the path so save it before changing the path
var expanded = Layer.IsPropertyGroupExpanded(this);
Layer.SetPropertyGroupExpanded(this, false);
Path = Path.Replace($"LayerEffect.{oldOrder}.", $"LayerEffect.{LayerEffect.Order}.");
// Restore the expanded state with the new path
Layer.SetPropertyGroupExpanded(this, expanded);
// Update children
foreach (var layerPropertyGroup in LayerPropertyGroups)
layerPropertyGroup.UpdateOrder(oldOrder);
}
/// <summary>
/// Called before properties are fully initialized to allow you to populate
/// <see cref="LayerProperty{T}.DefaultValue" /> on the properties you want