[Bf-extensions-cvs] [c924e2d5] master: Cleanup: minor changes & simplification to Align-XY
Campbell Barton
noreply at git.blender.org
Tue Feb 15 06:02:21 CET 2022
Commit: c924e2d52affcf12f23951ec7ec7adf843ac1d65
Author: Campbell Barton
Date: Tue Feb 15 16:01:40 2022 +1100
Branches: master
https://developer.blender.org/rBAc924e2d52affcf12f23951ec7ec7adf843ac1d65
Cleanup: minor changes & simplification to Align-XY
Also shorten text which didn't fit in the UI.
===================================================================
M object_print3d_utils/operators.py
M object_print3d_utils/ui.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)
diff --git a/object_print3d_utils/ui.py b/object_print3d_utils/ui.py
index b5d69214..e000544c 100644
--- a/object_print3d_utils/ui.py
+++ b/object_print3d_utils/ui.py
@@ -116,7 +116,7 @@ class VIEW3D_PT_print3d_transform(View3DPrintPanel, Panel):
row.operator("mesh.print3d_scale_to_volume", text="Volume")
row.operator("mesh.print3d_scale_to_bounds", text="Bounds")
row = layout.row(align=True)
- row.operator("mesh.print3d_align_to_xy", text="Align to XY Plane")
+ row.operator("mesh.print3d_align_to_xy", text="Align XY")
row.prop(print_3d, "use_alignxy_face_area")
More information about the Bf-extensions-cvs
mailing list