0

I've created a complex shader node tree for the world material and I want to pack it into an addon. Do I really have to recreate all of it in Python or is there a way to just copy and paste the information of this setup into a python script?

  • 1
    Simplest solution, add a blend file with your addon, and in the addon, 'import' the node_group datablock. Making a node from a node_group with python is also not very difficult. You just need to replicate the .nodes, .inputs, .outputs and .links collections.. and set all non-default attributes from each node. – Secrop Dec 15 '22 at 21:31
  • For complex node groups I would concurr with Secrop, you're better off shipping a blend file with your addon and append from it dynamically. Otherwise you can read https://blender.stackexchange.com/q/214911/86891 – Gorgious Dec 16 '22 at 07:09

0 Answers0