[Bf-extensions-cvs] [8ee9bd5d] master: Fix T89810: Vertex snapping at world origin when using 'Snap_Utilities_Line'

Germano Cavalcante noreply at git.blender.org
Wed Jul 14 19:00:17 CEST 2021


Commit: 8ee9bd5d633f2cb1006e108d47a49457e7561c84
Author: Germano Cavalcante
Date:   Wed Jul 14 13:59:07 2021 -0300
Branches: master
https://developer.blender.org/rBA8ee9bd5d633f2cb1006e108d47a49457e7561c84

Fix T89810: Vertex snapping at world origin when using 'Snap_Utilities_Line'

The operator depended on the gizmo to get the initial location.

===================================================================

M	mesh_snap_utilities_line/__init__.py
M	mesh_snap_utilities_line/op_line.py

===================================================================

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')



More information about the Bf-extensions-cvs mailing list