From c924e2d52affcf12f23951ec7ec7adf843ac1d65 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Feb 2022 16:01:40 +1100 Subject: Cleanup: minor changes & simplification to Align-XY Also shorten text which didn't fit in the UI. --- object_print3d_utils/operators.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'object_print3d_utils/operators.py') diff --git a/object_print3d_utils/operators.py b/object_print3d_utils/operators.py index 3f66f07b..50988163 100644 --- a/object_print3d_utils/operators.py +++ b/object_print3d_utils/operators.py @@ -757,8 +757,7 @@ class MESH_OT_print3d_align_to_xy(Operator): else: faces = [p for p in obj.data.polygons if p.select] - face_count = len(faces) - if face_count < 1: + if not faces: skip_invalid.append(obj.name) continue @@ -788,9 +787,7 @@ class MESH_OT_print3d_align_to_xy(Operator): return {'FINISHED'} def invoke(self, context, event): - if context.mode in {'EDIT_MESH', 'OBJECT'}: - pass - else: + if context.mode not in {'EDIT_MESH', 'OBJECT'}: return {'CANCELLED'} return self.execute(context) -- cgit v1.2.3