nuke.collapseToGroup

nuke.collapseToGroup(show=True) Group

Moves the currently selected nodes to a new group, maintaining their previous connections.

Parameters:

show – If show is True, the node graph for the new group is shown in the background.

Returns:

The new Group node.