[Bf-extensions-cvs] [0c2d39ad] master: PDT: Minor fixes to Intersect and Delta Move
Rune Morling
noreply at git.blender.org
Fri Dec 27 15:55:29 CET 2019
Commit: 0c2d39adf6e7ceb95b8f7acb3ddb4de5e7846fb5
Author: Rune Morling
Date: Fri Dec 27 15:49:31 2019 +0100
Branches: master
https://developer.blender.org/rBA0c2d39adf6e7ceb95b8f7acb3ddb4de5e7846fb5
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.
===================================================================
M precision_drawing_tools/pdt_design.py
===================================================================
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
More information about the Bf-extensions-cvs
mailing list