My question concerns the use of scripts to generate nodetrees. If I manage to use and link all the nodes offered by Blender on the same tree, I can't find a way of using a custom group.
an example below (the code itself is of no interest; it's just so I can understand how to code nodetrees)
as mentioned before, within a single tree, I have no problem creating nodes, but as soon as I want to create group with the following function (which works since I can add it manually after) :
##############
def create_group():
group = bpy.data.node_groups.new(type="GeometryNodeTree", name="test-group")
new_socket_g = group.interface.new_socket(name='in Socket', in_out='INPUT',socket_type='NodeSocketVector',)
return group
################
I don't know how to use it with a python command on the main tree since the command g1=node_tree.nodes.new(type="test-group") returns the error message : "RuntimeError: Error: Node type test-group undefined"
So what is the script to load a custom group intside a tree ??
Thank you very much for any help
Crys