I have a material on one object and I need to copy it to another object.
I do ... material.copy () but the group node in the material copy does not become a single-user copy. How can this problem be solved?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
The copy function can be used on the node tree as well. The copy function returns the copied node group, so it can be used replace the original group with the single user copy:
original_group = bpy.context.objects['Object'].material_slots['Material'].material.node_tree.nodes['Baking_node'].node_tree single_user_group = original_group.copy() original_group = single_user_group
Then just loop that over all your materials