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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlijenstina <lijenstina@gmail.com>2017-09-30 16:13:30 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-01-01 18:22:01 +0300
commit3688fd258354b8327de14e373582e5c79a7860e8 (patch)
treeab0db8d6b2f22566807c6cb70c0fc2b65168bd67
parentbd9a87ca2539e8bb81c2f44ec7d3a7aa3c85fd9e (diff)
Dynamic Context Menu: Fix issues with moving the object to a new layer
Bump version to 1.8.7 Moving the active object to a different layer or switching to a different layer will cause: - Showing two contexts together (the no object one will be on top) - errors with accessing operators (as the context.object is passed) Use context.active_object as the obj var instead
-rw-r--r--space_view3d_spacebar_menu.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/space_view3d_spacebar_menu.py b/space_view3d_spacebar_menu.py
index 3ba517e7..e183e075 100644
--- a/space_view3d_spacebar_menu.py
+++ b/space_view3d_spacebar_menu.py
@@ -20,7 +20,7 @@
bl_info = {
"name": "Dynamic Context Menu",
"author": "meta-androcto",
- "version": (1, 8, 6),
+ "version": (1, 8, 7),
"blender": (2, 77, 0),
"location": "View3D > Spacebar",
"description": "Object Mode Context Sensitive Spacebar Menu",
@@ -54,10 +54,10 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
layout = self.layout
settings = context.tool_settings
layout.operator_context = 'INVOKE_REGION_WIN'
- obj = context.object
+ obj = context.active_object
# No Object Selected #
- if not context.active_object:
+ if not obj:
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("wm.search_menu", text="Search", icon='VIEWZOOM')
@@ -114,6 +114,7 @@ class VIEW3D_MT_Space_Dynamic_Menu(Menu):
# Mesh Edit Mode #
if obj and obj.type == 'MESH' and obj.mode in {'EDIT'}:
+
layout.operator("wm.search_menu", text="Search", icon='VIEWZOOM')
UseSeparator(self, context)
layout.menu("VIEW3D_MT_View_Menu", icon='ZOOM_ALL')