mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Data bindings - Rewrote data binding system to fully leverage nodes
This commit is contained in:
1 parent
7933bf7ee9
commit
0bb93f2ebd
63 files changed
+654
-1533
No files matched your search
+1
-1
@@ -61,7 +61,7 @@ namespace Artemis.VisualScripting.Nodes.CustomViewModels
|
||||
if (_node.ProfileElement == null)
|
||||
return;
|
||||
|
||||
LayerProperties.AddRange(_node.ProfileElement.GetAllLayerProperties().Where(l => l.GetAllDataBindingRegistrations().Any()));
|
||||
LayerProperties.AddRange(_node.ProfileElement.GetAllLayerProperties().Where(l => l.DataBindingsSupported));
|
||||
_selectedLayerProperty = _node.LayerProperty;
|
||||
NotifyOfPropertyChange(nameof(SelectedLayerProperty));
|
||||
}
|
||||
|
||||
@@ -26,16 +26,16 @@ namespace Artemis.VisualScripting.Nodes
|
||||
return;
|
||||
}
|
||||
|
||||
List<IDataBindingRegistration> list = LayerProperty.GetAllDataBindingRegistrations();
|
||||
List<IDataBindingProperty> list = LayerProperty.BaseDataBinding.Properties.ToList();
|
||||
int index = 0;
|
||||
foreach (IPin pin in Pins)
|
||||
{
|
||||
OutputPin outputPin = (OutputPin) pin;
|
||||
IDataBindingRegistration dataBindingRegistration = list[index];
|
||||
IDataBindingProperty dataBindingProperty = list[index];
|
||||
index++;
|
||||
|
||||
// TODO: Is this really non-nullable?
|
||||
outputPin.Value = dataBindingRegistration.GetValue();
|
||||
outputPin.Value = dataBindingProperty.GetValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ namespace Artemis.VisualScripting.Nodes
|
||||
if (LayerProperty == null)
|
||||
return;
|
||||
|
||||
foreach (IDataBindingRegistration dataBindingRegistration in LayerProperty.GetAllDataBindingRegistrations())
|
||||
foreach (IDataBindingProperty dataBindingRegistration in LayerProperty.BaseDataBinding.Properties)
|
||||
CreateOutputPin(dataBindingRegistration.ValueType, dataBindingRegistration.DisplayName);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user