diff --git a/scripts/startup/bl_operators/node.py b/scripts/startup/bl_operators/node.py index 84de3848ceb..508cf60b73e 100644 --- a/scripts/startup/bl_operators/node.py +++ b/scripts/startup/bl_operators/node.py @@ -314,7 +314,7 @@ class NODE_OT_interface_item_new(NodeInterfaceOperator, Operator): active_item = interface.active # Panels have the extra option to add a toggle. - if active_item and active_item.item_type == 'PANEL': + if active_item and active_item.item_type == 'PANEL' and tree.type in ('GEOMETRY', 'SHADER'): items.append(('PANEL_TOGGLE', "Panel Toggle", "")) return items diff --git a/scripts/startup/bl_ui/space_node.py b/scripts/startup/bl_ui/space_node.py index 6044a508ebf..f9a11936875 100644 --- a/scripts/startup/bl_ui/space_node.py +++ b/scripts/startup/bl_ui/space_node.py @@ -911,11 +911,12 @@ class NODE_MT_node_tree_interface_context_menu(Menu): active_item = tree.interface.active layout.operator("node.interface_item_duplicate", icon='DUPLICATE') - layout.separator() - if active_item.item_type == 'SOCKET': - layout.operator("node.interface_item_make_panel_toggle") - elif active_item.item_type == 'PANEL': - layout.operator("node.interface_item_unlink_panel_toggle") + if tree.type in ('GEOMETRY', 'SHADER'): + layout.separator() + if active_item.item_type == 'SOCKET': + layout.operator("node.interface_item_make_panel_toggle") + elif active_item.item_type == 'PANEL': + layout.operator("node.interface_item_unlink_panel_toggle") class NODE_PT_node_tree_interface(Panel):