From 40c74f1ff85f73a9f942ce433ad671626a187277 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Thu, 13 Apr 2017 21:00:50 -0300 Subject: Always prioritize navigation --- mesh_snap_utilities_line.py | 11 +++++++++-- 1 file 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): -- cgit v1.2.3