mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Nodes - Support dynamic children in data model node
This commit is contained in:
1 parent
bd3bf20d92
commit
4fbd229846
9 files changed
+165
-76
No files matched your search
+10
-12
@@ -11,10 +11,12 @@ namespace Artemis.VisualScripting.Nodes.CustomViewModels
|
||||
private readonly DataModelNode _node;
|
||||
private BindableCollection<Module> _modules;
|
||||
|
||||
public DataModelNodeCustomViewModel(DataModelNode node, ISettingsService settingsService) : base(node)
|
||||
public DataModelNodeCustomViewModel(DataModelNode node, ISettingsService settingsService, IPluginManagementService test) : base(node)
|
||||
{
|
||||
_node = node;
|
||||
|
||||
var tessst = test.GetFeaturesOfType<Module>();
|
||||
|
||||
ShowFullPaths = settingsService.GetSetting("ProfileEditor.ShowFullPaths", true);
|
||||
ShowDataModelValues = settingsService.GetSetting("ProfileEditor.ShowDataModelValues", false);
|
||||
}
|
||||
@@ -33,19 +35,15 @@ namespace Artemis.VisualScripting.Nodes.CustomViewModels
|
||||
get => _node.DataModelPath;
|
||||
set
|
||||
{
|
||||
if (ReferenceEquals(_node.DataModelPath, value))
|
||||
return;
|
||||
|
||||
_node.DataModelPath.Dispose();
|
||||
_node.DataModelPath = value;
|
||||
_node.DataModelPath.Save();
|
||||
|
||||
if (_node.DataModelPath != null)
|
||||
{
|
||||
_node.DataModelPath.Save();
|
||||
_node.Storage = _node.DataModelPath.Entity;
|
||||
}
|
||||
else
|
||||
{
|
||||
_node.Storage = null;
|
||||
}
|
||||
|
||||
_node.UpdateOutputPin();
|
||||
_node.Storage = _node.DataModelPath.Entity;
|
||||
_node.UpdateOutputPin(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user