The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.
I expect it to give me the result of the "first" node inside the network (0.0)
what I get:
the whole range of numbers.
I have attached a nodebox3 file to show the problem. I expect the network to output the same result as the two top level nodes next to it, but it doesnt.
while on the topic of nested networks:
I dont think it is a good idea to let whatever node inside the network that is set as rendered to be the official output of it. The reason being that if i quickly need to go in to a subnetwork and do some work and look at what the nodes inside produce then I dont want to risk forgetting to set the render flag back to the right node. I have suggestions to how this could be handled if anyone is interested.
I've looked at your network and it seems to do what is intended; that is, there is no bug in NodeBox.
The question is: what do you want to do? It looks like you're trying to sum all the numbers or something?
About the issue of the rendered node in the subnetwork: we're aware of that, it is indeed irritating and we're thinking of a fix.
GU
GUgustaf
hmm. What I am trying to do is just get the first value of a list. The "add" node doesnt do anything and is only there because, well, thats how i ran in to this problem.
If you look at the result of the two nodes on the left (add+first) you see a single value as the result (0.0), right?
If you look inside the group on the right hand side you see that it has the same two nodes (add+first) inside of it, but it doesnt produce the same result. Instead of returning a single value (0.0), it returns the full range of 10 values.
Is this what you see as well? If it is, please explain why the group on the right shouldnt produce the same result as the two nodes on the left.
thanks
FB
FBFrederik De BleserNodeBox team
Okay, I see your problem. This is related to how NodeBox does list matching.
Basically, it treats the network as a function, and will call it with each element of the list. In your case, that means it will take the first element of the list, add zero to it, then take the first element (but there's already only one element) and return that. Then it will do the same for the second element, and append that to the bigger list. If you're familiar with functional operation, it basically performs a map operation over all the elements.
This is the default behavior but you can change it. In the metadata for the network, select the published port and set the "range" to "list". This means that NodeBox will work on the entire list at once, not one-by-one. Then you see that the network works as the nodes in the root.
For more information, you can read How NodeBox Works, specifically the part on list matching.
Hope this helps!
F
FB
FBFrederik De BleserNodeBox team
Here's a screenshot showing the metadata setting:
GU
GUgustaf
aaaaaaaaaah slaps forhead
May I give a suggestion for the subnetwork output? Having special "input" and "output" nodes that you put inside the network that creates a virtual bridge to the parent nodes in and out points seems to work very well in other programs.
Could also avoid any backwards compatibility issues with some kind of "if (no output nodes exist) then output the render-flagged node" ?
FB
FBFrederik De BleserNodeBox team
Yes – having "inlets" and an "outlet" is something we're considering, since the issue you mention causes lots of confusion. This requires a conversion from published ports to inlets/outlets.