Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-12-20 07:26:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-20 07:26:27 +0300
commitc4c2c27f971631eb130b1964c33f83e748411c5a (patch)
treefda37b84c6d685b243bfaf450d713e9ce6e87f0e /release/scripts/startup/bl_ui/space_node.py
parent98d1231fb5c54bbe50ae6420e961ac04b67ba8b3 (diff)
Fix context menu w/o an active object
Also remove special case when no items are selected, since this only has one or two menu items, one being the add menu which can be better accessed from the header or add shortcut. If the no-selection case is to have it's own alternate menu - it should be more complete before enabling.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_node.py')
-rw-r--r--release/scripts/startup/bl_ui/space_node.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 73afb62567c..9754cf64a86 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -328,12 +328,15 @@ class NODE_MT_specials(Menu):
layout = self.layout
# If nothing is selected
+ # (disabled for now until it can be made more useful).
+ '''
selected_nodes_len = len(context.selected_nodes)
if selected_nodes_len == 0:
layout.operator_context = 'INVOKE_DEFAULT'
layout.menu("NODE_MT_add")
layout.operator("node.clipboard_paste", text="Paste")
return
+ '''
# If something is selected
layout.operator_context = 'INVOKE_DEFAULT'