I'm using animation nodes add-on. How can I switch between the node tree data blocks using python (as shown in the picture below)?

enter image description here


Try this(change "GeometryNodes")

bpy.data.objects["Cube"].modifiers["GeometryNodes"].node_group =  bpy.data.node_groups["NodeTree.001"]
  • $\begingroup$ Hi, thanks for the post. This site is not a regular forum, answers should be substantial and thoroughly explain the solution and required workflow. One liners and short tips rarely make for a good answer. If you can edit your post and provide some more details about the procedure and why it works feel free to restore it, otherwise it may be deleted or converted into a comment. Perhaps add a few images illustrating the workflow and final results. See How do I write a good answer? $\endgroup$ Jul 30 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.