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:
authormano-wii <germano.costa@ig.com.br>2019-02-11 19:20:59 +0300
committermano-wii <germano.costa@ig.com.br>2019-02-11 19:20:59 +0300
commitf0e2d0e6a21c3391c1b4583764eb921c0eef1480 (patch)
treec941959d4f448a8de068f34db25cbf11bc3b5d32 /mesh_snap_utilities_line/op_line.py
parenta5aec7f5a5558bf0c08b9c5a75eb4272f586dfa8 (diff)
mesh_snap_utilitie_line: Don't always pass the active object mesh as the main mesh.
Diffstat (limited to 'mesh_snap_utilities_line/op_line.py')
-rw-r--r--mesh_snap_utilities_line/op_line.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mesh_snap_utilities_line/op_line.py b/mesh_snap_utilities_line/op_line.py
index 585792bd..454c64e3 100644
--- a/mesh_snap_utilities_line/op_line.py
+++ b/mesh_snap_utilities_line/op_line.py
@@ -233,11 +233,11 @@ class SnapUtilitiesLine(SnapUtilities, bpy.types.Operator):
self.vector_constrain = ()
self.len = 0
- active_object = context.active_object
- mesh = active_object.data
+ self.main_snap_obj = self.snap_obj = self.sctx._get_snap_obj_by_obj(self.obj)
+ if self.bm == None:
+ self.bm = bmesh.from_edit_mesh(self.obj.data)
- self.main_snap_obj = self.snap_obj = self.sctx._get_snap_obj_by_obj(active_object)
- self.main_bm = self.bm = bmesh.from_edit_mesh(mesh)
+ self.main_bm = self.bm
def modal(self, context, event):
if self.navigation_ops.run(context, event, self.prevloc if self.vector_constrain else self.location):
@@ -435,7 +435,7 @@ class SnapUtilitiesLine(SnapUtilities, bpy.types.Operator):
context.window_manager.modal_handler_add(self)
if not self.wait_for_input:
- mat_inv = context.object.matrix_world.inverted_safe()
+ mat_inv = self.obj.matrix_world.inverted_safe()
point = mat_inv @ self.location
self.list_verts_co = make_line(self, self.geom, point)