diff options
author | Campbell Barton <ideasman42@gmail.com> | 2022-02-15 08:01:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2022-02-15 08:01:40 +0300 |
commit | c924e2d52affcf12f23951ec7ec7adf843ac1d65 (patch) | |
tree | a44dc6b4e10e65c714633fce22139491487bcace /object_print3d_utils/operators.py | |
parent | e648555eb6b11be56b08f2d10a16c3782271df92 (diff) |
Cleanup: minor changes & simplification to Align-XY
Also shorten text which didn't fit in the UI.
Diffstat (limited to 'object_print3d_utils/operators.py')
-rw-r--r-- | object_print3d_utils/operators.py | 7 |
1 files changed, 2 insertions, 5 deletions
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) |