0
$\begingroup$

I want to iterate the Animation Nodes Node Trees in my current scene, and for each Node Tree, I want to execute it as if by clicking the Execute Node Tree button. When I click the button manually, I don't see any output in the Python console for this button, so I'm not sure where to begin.

$\endgroup$

1 Answer 1

3
$\begingroup$

Find AN node tree and execute():

import bpy

anTreeNames = ["NodeTree", "NodeTree.001"]

for name in anTreeNames:
    tree = bpy.data.node_groups.get(name)
    if tree:
        tree.execute()
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .