0
$\begingroup$

Could someone tell me what are the bpy commands to save a shading node in a library? and how to recover it for another project within blender from this library?

@unwave I'm talking about the nodes that we can create on the shader editor to create materials that we can then use on objects shader editor which would make it possible to create libraries of this type: collection example

$\endgroup$
2
  • $\begingroup$ Are you talking about a shading node group? The one from bpy.data.node_groups. $\endgroup$
    – unwave
    Commented Sep 17 at 16:27
  • $\begingroup$ You don’t create single nodes, you add them. I think you mean how to save a node tree. $\endgroup$
    – TheLabCat
    Commented Sep 18 at 17:47

1 Answer 1

0
$\begingroup$

You don't save a single node, but node trees in the form of materials and nodes groups, which are the ID data blocks, using bpy.data.libraries.load and bpy.data.libraries.write.

If you need to save a single node then you need to find a way to serialize it to text, or you can use the node groups to store a single node.

$\endgroup$

You must log in to answer this question.

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