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?
A screenshot of your graph would be nice…
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:…
I haven’t actually defined any input type. Does this mean var:… is automatically assigned and i need to change it to var since it is a list of lists?
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.
It’s not the IF node I’ve double checked. The dropping last item is happening after it. Its driving me nuts. I’ve never seen this happen before.
I can’t replicate this. Have you tried recreating the custom node?
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.