Compositor: "Copy" button duplicates node tree

Currently, the compositor template ID creates a new node tree. This is
inconsistent with other node editors where the button copies the node
tree.
Also use "New" in geometry nodes operator description instead of "Copy"

Pull Request: https://projects.blender.org/blender/blender/pulls/146222
This commit is contained in:
Habib Gahbiche
2025-09-30 11:46:32 +02:00
parent d75b8e5b6e
commit 4f722eaae3
5 changed files with 81 additions and 30 deletions

View File

@@ -152,7 +152,10 @@ class NODE_HT_header(Header):
if snode.node_tree_sub_type == 'SCENE':
row = layout.row()
row.enabled = not snode.pin
row.template_ID(scene, "compositing_node_group", new="node.new_compositing_node_group")
if scene.compositing_node_group:
row.template_ID(scene, "compositing_node_group", new="node.duplicate_compositing_node_group")
else:
row.template_ID(scene, "compositing_node_group", new="node.new_compositing_node_group")
elif snode.node_tree_sub_type == 'SEQUENCER':
row = layout.row()
sequencer_scene = context.workspace.sequencer_scene