diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_node.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_node.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 4cd38831cdf..9ad454d49e1 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -154,7 +154,20 @@ class NODE_HT_header(Header): elif snode.tree_type == 'GeometryNodeTree': NODE_MT_editor_menus.draw_collapsible(context, layout) layout.separator_spacer() - layout.template_ID(snode, "node_tree", new="node.new_geometry_node_tree") + + ob = context.object + + row = layout.row() + if snode.pin: + row.enabled = False + row.template_ID(snode, "node_tree", new="node.new_geometry_node_group_assign") + elif ob: + active_modifier = ob.modifiers.active + if active_modifier and active_modifier.type == "NODES": + row.template_ID(active_modifier, "node_group", new="node.new_geometry_node_group_assign") + else: + row.template_ID(snode, "node_tree", new="node.new_geometry_node_modifier") + else: # Custom node tree is edited as independent ID block |