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:
authorGermano Cavalcante <germano.costa@ig.com.br>2017-04-14 03:00:50 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2017-04-14 03:00:50 +0300
commit40c74f1ff85f73a9f942ce433ad671626a187277 (patch)
tree935d3689d7b922257f6e3f1fa36a1190d3189548
parent90dcb91c8b2aa653b922bbc35003faed09c7f54a (diff)
Always prioritize navigation
-rw-r--r--mesh_snap_utilities_line.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/mesh_snap_utilities_line.py b/mesh_snap_utilities_line.py
index 816bf80a..6e71b9bb 100644
--- a/mesh_snap_utilities_line.py
+++ b/mesh_snap_utilities_line.py
@@ -686,11 +686,13 @@ class SnapUtilitiesLine(Operator):
evkey = (event.alt, event.ctrl, event.shift, event.type, event.value)
if evkey in self.navigation_keys._rotate:
bpy.ops.view3d.rotate('INVOKE_DEFAULT')
+ return True
elif evkey in self.navigation_keys._move:
if event.shift and self.vector_constrain and \
self.vector_constrain[2] in {'RIGHT_SHIFT', 'LEFT_SHIFT', 'shift'}:
self.vector_constrain = None
bpy.ops.view3d.move('INVOKE_DEFAULT')
+ return True
else:
for key in self.navigation_keys._zoom:
if evkey == key[0:5]:
@@ -704,10 +706,16 @@ class SnapUtilitiesLine(Operator):
rv3d.view_distance -= key[5] * rv3d.view_distance / 6
else:
bpy.ops.view3d.zoom('INVOKE_DEFAULT', delta = key[5])
- break
+ return True
+ #break
+
+ return False
def modal(self, context, event):
+ if self.modal_navigation(context, event):
+ return {'RUNNING_MODAL'}
+
context.area.tag_redraw()
if event.ctrl and event.type == 'Z' and event.value == 'PRESS':
@@ -861,7 +869,6 @@ class SnapUtilitiesLine(Operator):
self.location[1], self.location[2], a)
)
- self.modal_navigation(context, event)
return {'RUNNING_MODAL'}
def invoke(self, context, event):