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
@@ -148,20 +148,9 @@ namespace Artemis.Core.Services.Storage
|
||||
|
||||
private void InstantiateProfileLayerBrushes(Profile profile)
|
||||
{
|
||||
var layerBrushProviders = _pluginService.GetPluginsOfType<LayerBrushProvider>();
|
||||
var descriptors = layerBrushProviders.SelectMany(l => l.LayerBrushDescriptors).ToList();
|
||||
|
||||
// Only instantiate brushes for layers without an existing brush instance
|
||||
foreach (var layer in profile.GetAllLayers().Where(l => l.LayerBrush == null && l.LayerEntity.BrushEntity != null))
|
||||
{
|
||||
// Get a matching descriptor
|
||||
var descriptor = descriptors.FirstOrDefault(d => d.LayerBrushProvider.PluginInfo.Guid == layer.LayerEntity.BrushEntity.BrushPluginGuid &&
|
||||
d.LayerBrushType.Name == layer.LayerEntity.BrushEntity.BrushType);
|
||||
|
||||
// If a descriptor that matches if found, instantiate it with the GUID of the element entity
|
||||
if (descriptor != null)
|
||||
_layerService.InstantiateLayerBrush(layer, descriptor, layer.LayerEntity.BrushEntity.Configuration);
|
||||
}
|
||||
foreach (var layer in profile.GetAllLayers().Where(l => l.LayerBrush == null))
|
||||
_layerService.InstantiateLayerBrush(layer);
|
||||
}
|
||||
|
||||
private void InstantiateProfileKeyframeEngines(Profile profile)
|
||||
|
||||
Reference in new issue
Block a user