I am making an add-on in which many node groups can be inserted using:
My_NodeGroup = bpy.context.object.modifiers.active.node_group.nodes.new(type='GeometryNodeGroup')
The problem is that the Node Groups can only be inserted at the top, in the Geometry Nodes.
How can I make dynamically that the node group is always inserted where the user is? So e.g. In a Node Group of a Node Group?
NodeGroup.001
is a node of typeGROUP
, so you can usenode_tree = node.id_data
which will giveNodeGroup.node_tree
$\endgroup$