I am wanting to use the ‘List.DropItems’ node within a custom node but it is behaving different to how it would outside of the custom node. I am using ‘-1’ as the amount to remove the last item. Outside of the custom node it works fine. Inside the custom node, something is happening to the lacing and/or list structure because it removes the wrong elements. Any ideas as to why this would be happening?
The custom node’s input definition is very important. Each node placed inside will be affected if you defined an input as accepting a singleton, a list, or a list of lists, instead of the default var:[]…[]
It should. You can hover your mouse over the input port and check. Alternatively, you could right-click the node and select Help for a detailed view.
But if that’s the case, then I’m not sure why the drop item node acts any different. I suspect the issue might be in the “IF” node prior to it. It’s notorious for messing up the list structure when its inputs are of varying length and depth.
Yes IF is dropping last, I had to apply IF to last item in both list and then add the recaptured items to end of the IF list that was dropping last item.