Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2022-02-15 08:01:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2022-02-15 08:01:40 +0300
commitc924e2d52affcf12f23951ec7ec7adf843ac1d65 (patch)
treea44dc6b4e10e65c714633fce22139491487bcace
parente648555eb6b11be56b08f2d10a16c3782271df92 (diff)
Cleanup: minor changes & simplification to Align-XY
Also shorten text which didn't fit in the UI.
-rw-r--r--object_print3d_utils/operators.py7
-rw-r--r--object_print3d_utils/ui.py2
2 files changed, 3 insertions, 6 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)
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")