blendersynth.blender.nodes.node_arranger

Utilities for neatly arranging nodes in the node editor, to make debugging easier.

blendersynth.blender.nodes.node_arranger.calc_depth(node_island)[source]

Given a node island (i.e. all nodes in the same fully connected component), set the depth of each node to be the maximum depth of all its input nodes + 1. Once complete, normalize these depths so the first item is 0

blendersynth.blender.nodes.node_arranger.split_to_islands(nodes)[source]

Given a node list, return a list of sets, each one being a fully disconnected island

blendersynth.blender.nodes.node_arranger.tidy_tree(node_tree, dX=400, dY=200)[source]

Search through tree, positioning nodes in a grid based on their depth and connectivity.

Parameters:
  • node_tree (NodeTree) – node tree to tidy

  • dX (int) – horizontal distance between nodes

  • dY (int) – vertical distance between nodes