0
$\begingroup$

I have created some custom node groups that use built-in nodes in Cycles Compositor. Now I would like to have another group that make use of these custom groups. I think in the new node group, I would do something similar to

Mygroupnode = nodes.new('somegroupname')

However, what I got is an error saying there was no type called 'somegroupname'. I understand that the position is expected to receive a node type (not name), but I don't know how to retrieve a type of my group node.

PS: There is a type called 'CompositorNodeGroup', but it can only create an 'empty' node where you should do an extra step to link it to a custom group node. But I do not know how to do it in script.

$\endgroup$

1 Answer 1

1
$\begingroup$

This is done by adding a node group:

group = C.scene.node_tree.nodes.new('CompositorNodeGroup')

... and then adding the custom group as new group's node tree:

group.node_tree = bpy.data.node_groups['somegroupname']
$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.