New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node groups #462
Comments
Also a big question is what nodes can be inside of a node group in a safe way. |
Socket which gives the index of the current iteration of the loop could be used in conjunction with 'list item' node to obtain a new item of the list for each iteration |
Yes an index socket! makes sense. @ly29 is this part of the 0.5 push? |
No, I would like it to be but lets do it a bit afterwards... |
cool, that's the response I hoped for |
I really want to finish the 0.5 push very soon. And then: |
Looks cool! i'm getting flashes of a Symbolic approach, no code in the nodes but one massive symbolic evaluation step for entire tree or subtrees. |
For recursion to work switch node has to be lazily evaluated. This requires some fundamental changes to the order that nodes a processed. Consider switch like a First process the things needed for state, then evaluate the nodes going into the True or False input. Today everything is evaluated but switch only decides which data to pass on. |
In update system there are nice methods for working with parts of node trees. But somewhat badly names, make update list from nodes would perhaps be a better name of this node.
Where node_list is list of node names for the node tree ng. down is set to true if want down stream nodes from sverchok.core.update_system import make_tree_from_nodes
true_nodes = [s.links[0].from_node.name for s in switch_node.inputs[1:switch_node.switch_count+1] if s.is_linked]
if_true_update_list = make_tree_from_nodes(dep_nodes ,ng, False) The main is that I am bit uncertain where to put machinery for this in clean way. Inside of the node feels a bit dirty but putting inside the update system feels a bit strange also. |
I'm not up-to-speed with node_groups, having never used them in Sverchok. But my opinion about the naming of that function "make_tree_from_nodes" is that perhaps it should be |
The badly named
Where each node knows the name of its inputs and the topological sorting ensures safe evaluation order.
What I want to do know is change this around and introduce if statements with the switch node.
With introduction of iteration for flow control and groups inside of groups we then have a Turing complete language (I think). |
Regardless is probably a good idea to split the file up into two parts. |
now is clear. Naming - secondary. primarly you explained everything |
Is it possible to reuse groups in one setup? For example, if I create a group which duplicates input mesh N times, and then I want to apply this group twice, for two different inputs... |
Yes. This part needs to be redone however partly, which is why it is in beta. |
Is it a good idea to use a separate layout as a group and put there some sort of Wifi nodes for input and output for another layouts? So it will be like:
So it all comes to making Wifi node that can transfer data between layouts. Or is it even harder to code and make it work than the thing you already did? I use groups a lot ever since you implemented them, would be glad if they improve. |
It is a very good idea in general. My thinking about sverchok has become clearear lately, since I developed groups I have reached an deeper understanding of how I think it should work. |
@pierdr just create group connected with outer nodes allready. It is beta version, and works as it works. sorry |
@nortikin Thanks! It works. Sverchok is super! Keep going! |
follow vk.com group of #sverchok there is more stuff. |
I thought I had solved that. Make new issue and tag me. |
A node group can be seen as code block. It is very beta right now but works.
Plans: recursion, iteration, do while.
For recursion the key issue is to change update system to use switch node as a if statement for flow control.
Iteration and do while is pretty straightforward to do inside of the current system.
Other issues to resolve:
The text was updated successfully, but these errors were encountered: