Page 1 of 1

Move nodes into node pins

PostPosted: Fri May 20, 2016 2:12 am
by roeland
This script moves all the selected nodes into their destination pins if possible. To use, select the nodes to be moved (don't select the destination node) and run this script.

A node can be moved if:
  • The ouput is connected to exactly one destination pin,
  • All nodes connected to the input pins are either already inside the input pin, or they will be moved there by this script

Download:
Move nodes into pins.lua
(3.38 KiB) Downloaded 429 times


--
Roeland

Re: Move nodes into node pins

PostPosted: Fri May 20, 2016 8:15 pm
by calus
Very useful script, thanks !

Re: Move nodes into node pins

PostPosted: Mon Jun 06, 2016 8:23 am
by calus
Hi Roeland,

I'm trying to make a "Move nodes out of node pins" script.
I want to unfold the graph except the "end of chain" value nodes and rgb node.

Do you think it's a good idea to start from this script and kind of reverse it, or should I use a different approach ?

Re: Move nodes into node pins

PostPosted: Tue Jun 14, 2016 5:54 am
by roeland
You can look at this script for a start, you'll need to go over the nodes recursively in a similar way. The moving out case will be a bit easier since any internal node will definitely be moved out.

The terminal value nodes are easy to recognise because they don't have any input pins.

--
Roeland