3
$\begingroup$

enter image description here Is there a way to make all the groups in a geometry nodes set up single user at once? I don't really understand why they keep being linked to the original ones when you have already made the Set up itself single user... I guess it's treating them like an asset, which could be handy sometimes, but if you have multiple groups inside of each other and you want to make significant changes to the set up, you have to manually go make them all single user one by one

Is there a faster way?

$\endgroup$

1 Answer 1

3
$\begingroup$

Make last modifier (Geometry Node) of active object node group single (recursion)

import bpy

def make_recursion_single(node_group):
    for node in node_group.nodes:
        if node.type == "GROUP":
            if not node.node_tree: continue
            if node.node_tree.users != 1:
                new_tree = node.node_tree.copy()
                node.node_tree = new_tree
                print("make new node_tree",node, new_tree)

                make_recursion_single(new_tree)
            else:
                make_recursion_single(node.node_tree)

# get active object
obj = bpy.context.active_object

# get last modifier node group
ng = obj.modifiers[-1].node_group

make_recursion_single(ng)
  1. Select a object that last modifier is a Geometry Node in 3d viewport (Node group cannot empty)
  2. Go to Text Editor and run the script

enter image description here

enter image description here

$\endgroup$
0

You must log in to answer this question.

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