diff options
author | Alan Odom <clockmender@icloud.com> | 2020-01-20 23:48:53 +0300 |
---|---|---|
committer | Rune Morling <ermo.blender.org@spammesenseless.net> | 2020-02-01 18:40:43 +0300 |
commit | 0e62a382183b02799dda7e48d5a3f97dd2321be9 (patch) | |
tree | 00c3da979cc19f05ed7ca7f0aa0ebd5d6a1c0582 /precision_drawing_tools/pdt_bix.py | |
parent | fccd99b8324ca4b44eea964273b4f22c6d738690 (diff) |
PDT: Refactor - Stage 3 (Pylint & Black runs)
Most of the recommendations from pylint are now done, I have not changed variables
like v in expression [v for v in... as I consider these to be normal coding practice.
Rename pdt_com_functions.py to pdt_command_functions.py
Fix error in Intersect operation if selected vertices resulted in more than
2 edges being selected. Priority is given to two edges as a selection, then to
4 vertices, if the four vertices represent two edges, the intersection point is
at the intersection of the two edges, which might not be the four vertices, if
one of the vertices forms part of two edges that are also selected.
Priority is 2 edges, then 4 vertices selected individually with the mouse.
Diffstat (limited to 'precision_drawing_tools/pdt_bix.py')
-rw-r--r-- | precision_drawing_tools/pdt_bix.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/precision_drawing_tools/pdt_bix.py b/precision_drawing_tools/pdt_bix.py index adf4d335..0da468cb 100644 --- a/precision_drawing_tools/pdt_bix.py +++ b/precision_drawing_tools/pdt_bix.py @@ -34,7 +34,7 @@ from .pdt_msg_strings import ( ) from .pdt_functions import debug, oops -def add_line_to_bisection(self, context): +def add_line_to_bisection(context): """Computes Bisector of 2 Co-Planar Edges. Args: @@ -46,7 +46,7 @@ def add_line_to_bisection(self, context): obj = context.object if all([bool(obj), obj.type == "MESH", obj.mode == "EDIT"]): - pg = scene.pdt_pg + pg = context.scene.pdt_pg me = obj.data bm = bmesh.from_edit_mesh(me) @@ -70,8 +70,8 @@ def add_line_to_bisection(self, context): edge2 = (v3, v4) if not cm.test_coplanar(edge1, edge2): - msg = PDT_ERR_NCEDGES - self.report({"ERROR"}, msg) + pg.error = PDT_ERR_NCEDGES + context.window_manager.popup_menu(oops, title="Error", icon="ERROR") return # get pt and pick farthest vertex from (projected) intersections |