Output type of a subnetwork
I created an invader node per the subnetwork tutorial (http://nodebox.net/node/documentation/concepts/subnetworks.html). It works as described, however the node says its output type is int. When I go to the node's settings and try to change the type to geometry and output range to Value, I get an exception "nodebox.graphics.Geometry cannot be cast to nodebox.graphics.Point".
Could you explain why this happens when switching output range from List to Value?
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
Support Staff 1 Posted by Stefan Gabriels on 15 Jan, 2013 10:28 AM
Hello, I figured out why this happened but the reason is quite technical: turning the output range to value causes the output to be basically organised in such a way (if you really want to know, a "list of a list of geometry objects") that the code is trying it to feed as an argument of a function that is not really capable of handling it.
That said, it's not a good idea to set the output range of sub networks to value. Yes your output inside the subnetwork might be treated as a single object and from that perspective it makes sense to make the network have output range value. But... the subnetwork itself wraps whatever is inside of it into a list anyway, so from the subnetwork's point of view it makes more sense to always have output range list.
But we agree it's confusing and we'll think about how we can approach this issue.