Hi all,
Have a fairly specific question regarding custom node development.
We have a series of custom components that are using the EngineController to access the input data. We have mostly inherited this method from how Speckle does it (thanks guys).
public static T GetInputAs<T>(EngineController engine, NodeModel node, int port)
{
var valuesNode = node.InPorts[port].Connectors[0].Start.Owner;
var valuesIndex = node.InPorts[port].Connectors[0].Start.Index;
var astId = valuesNode.GetAstIdentifierForOutputIndex(valuesIndex).Name;
var inputMirror = engine.GetMirror(astId);
if (inputMirror?.GetData() == null) return default;
var data = inputMirror.GetData();
var value = RecurseInput(data);
return (T)value;
}
The issue we have run in to now is how to deal with different length list structures when using this method. By specifying exactly how to handle the data in each input we seem to be bypassing the option to use any lacing to help handle varying length lists.
Is there any way to still make use of lacing when using a method like this to access the nodes inputs? Any suggestions for alternatives when handling the data like this?
Thanks in advance!