[Bf-extensions-cvs] [639e1d3a] master: PDT: Check a Selection is Made (fix)
Alan Odom
noreply at git.blender.org
Sat Mar 28 18:59:43 CET 2020
Commit: 639e1d3adc9861babb335566e4502ad07d04f12e
Author: Alan Odom
Date: Tue Feb 18 09:52:40 2020 +0000
Branches: master
https://developer.blender.org/rBA639e1d3adc9861babb335566e4502ad07d04f12e
PDT: Check a Selection is Made (fix)
Make sure that there is a selection of vertices before processing, must be
a minimum of 1 in Point mode and 2 in other modes.
===================================================================
M pdt_tangent.py
===================================================================
diff --git a/pdt_tangent.py b/pdt_tangent.py
index e5f32e0b..d292a7ff 100644
--- a/pdt_tangent.py
+++ b/pdt_tangent.py
@@ -540,6 +540,10 @@ class PDT_OT_TangentOperateSel(Operator):
# Get All Values from Selected Vertices
verts = [v for v in bm.verts if v.select]
+ if len(verts) <= 0:
+ pg.error = f"{PDT_ERR_SEL_1_VERT} 0"
+ context.window_manager.popup_menu(oops, title="Error", icon="ERROR")
+ return {"FINISHED"}
v1 = verts[0]
vn = verts[-1]
for v in bm.verts:
More information about the Bf-extensions-cvs
mailing list