Skip to content

Select all nodes in Node Graph

fabiof17 edited this page Jun 18, 2019 · 6 revisions
from NatronGui import *
import NatronEngine

# select all nodes in the Node Graph
app.selectAllNodes(app)

# in a list called 'currentNodes', we store the selected nodes
currentNodes = app.getSelectedNodes()

# now we can cycle through all nodes to do whatever we want
# a variable called 'node' is created on the fly
# this variable will store the current node we are looking at in the list
for node in currentNodes:
	do your stuff...

Clone this wiki locally