diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-07-14 19:59:07 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-07-14 20:00:01 +0300 |
commit | 8ee9bd5d633f2cb1006e108d47a49457e7561c84 (patch) | |
tree | 734a4e77ed6d1ab531babf54f21fafb56c46a186 | |
parent | 855d51830b51f5d2ef1eacbd7c996a1db1febb61 (diff) |
Fix T89810: Vertex snapping at world origin when using 'Snap_Utilities_Line'
The operator depended on the gizmo to get the initial location.
-rw-r--r-- | mesh_snap_utilities_line/__init__.py | 2 | ||||
-rw-r--r-- | mesh_snap_utilities_line/op_line.py | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/mesh_snap_utilities_line/__init__.py b/mesh_snap_utilities_line/__init__.py index ee6503aa..c22c5b02 100644 --- a/mesh_snap_utilities_line/__init__.py +++ b/mesh_snap_utilities_line/__init__.py @@ -21,7 +21,7 @@ bl_info = { "name": "Snap_Utilities_Line", "author": "Germano Cavalcante", - "version": (6, 9, 20), + "version": (6, 9, 22), "blender": (2, 93, 0), "location": "View3D > TOOLS > Line Tool", "description": "Extends Blender Snap controls", diff --git a/mesh_snap_utilities_line/op_line.py b/mesh_snap_utilities_line/op_line.py index f63eb219..aa516bfe 100644 --- a/mesh_snap_utilities_line/op_line.py +++ b/mesh_snap_utilities_line/op_line.py @@ -414,9 +414,12 @@ class SnapUtilitiesLine(SnapUtilities, bpy.types.Operator): context.window_manager.modal_handler_add(self) if not self.wait_for_input: - mat_inv = self.obj.matrix_world.inverted_safe() - point = mat_inv @ self.location - self.list_verts_co = make_line(self, self.geom, point) + if not self.snapwidgets: + self.modal(context, event) + else: + mat_inv = self.obj.matrix_world.inverted_safe() + point = mat_inv @ self.location + self.list_verts_co = make_line(self, self.geom, point) self._handle = bpy.types.SpaceView3D.draw_handler_add(self.draw_callback_px, (), 'WINDOW', 'POST_VIEW') |