diff options
author | Rune Morling <ermo.blender.org@spammesenseless.net> | 2019-12-27 17:49:31 +0300 |
---|---|---|
committer | Rune Morling <ermo.blender.org@spammesenseless.net> | 2019-12-27 17:49:31 +0300 |
commit | 0c2d39adf6e7ceb95b8f7acb3ddb4de5e7846fb5 (patch) | |
tree | 301500e0a758a558148f11af0ac29583e692d6b1 /precision_drawing_tools | |
parent | 8673c814bf9a8e0c858006523033d8d31454fe1e (diff) |
PDT: Minor fixes to Intersect and Delta Move
Intersect Fix:
Changed priorities to give more weight to selection by Vertex than selection
by Edge. Selection by Edge without All/Active will now cause an error if first
vertex of edge is not closest to intersection. This can be overridden by either
setting All/Active, or by working in Vertex mode and ensuring vertex to be
extended is closest to the intersection, when doing both closest vertices is
not required.
Delta Move Fix:
Fixed minor error in Move by Delta operation, when in Object Mode,
Objects were both moved to same location.
Diffstat (limited to 'precision_drawing_tools')
-rw-r--r-- | precision_drawing_tools/pdt_design.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/precision_drawing_tools/pdt_design.py b/precision_drawing_tools/pdt_design.py index ddde1231..a20ebdd4 100644 --- a/precision_drawing_tools/pdt_design.py +++ b/precision_drawing_tools/pdt_design.py @@ -280,7 +280,7 @@ class PDT_OT_PlacementDelta(Operator): bm.select_history.clear() elif obj.mode == "OBJECT": for ob in context.view_layer.objects.selected: - ob.location = obj_loc + vector_delta + ob.location = ob.location + vector_delta elif oper == "SE" and obj.mode == "EDIT": edges = [e for e in bm.edges if e.select] faces = [f for f in bm.faces if f.select] @@ -823,17 +823,7 @@ class PDT_OT_PlacementInt(Operator): obj_loc = obj.matrix_world.decompose()[0] bm = bmesh.from_edit_mesh(obj.data) edges = [e for e in bm.edges if e.select] - if len(edges) == 2: - ext_a = True - va = edges[0].verts[0] - actV = va.co - vo = edges[0].verts[1] - othV = vo.co - vl = edges[1].verts[0] - lstV = vl.co - vf = edges[1].verts[1] - fstV = vf.co - elif len(bm.select_history) == 4: + if len(bm.select_history) == 4: ext_a = pg.extend va = bm.select_history[-1] vo = bm.select_history[-2] @@ -844,6 +834,16 @@ class PDT_OT_PlacementInt(Operator): errmsg = PDT_ERR_VERT_MODE self.report({"ERROR"}, errmsg) return {"FINISHED"} + elif len(edges) == 2: + ext_a = pg.extend + va = edges[0].verts[0] + actV = va.co + vo = edges[0].verts[1] + othV = vo.co + vl = edges[1].verts[0] + lstV = vl.co + vf = edges[1].verts[1] + fstV = vf.co else: errmsg = ( PDT_ERR_SEL_4_VERTS |