Skip to content
Snippets Groups Projects
Commit c924e2d5 authored by Campbell Barton's avatar Campbell Barton
Browse files

Cleanup: minor changes & simplification to Align-XY

Also shorten text which didn't fit in the UI.
parent e648555e
Branches
Tags
No related merge requests found
...@@ -757,8 +757,7 @@ class MESH_OT_print3d_align_to_xy(Operator): ...@@ -757,8 +757,7 @@ class MESH_OT_print3d_align_to_xy(Operator):
else: else:
faces = [p for p in obj.data.polygons if p.select] faces = [p for p in obj.data.polygons if p.select]
face_count = len(faces) if not faces:
if face_count < 1:
skip_invalid.append(obj.name) skip_invalid.append(obj.name)
continue continue
...@@ -788,9 +787,7 @@ class MESH_OT_print3d_align_to_xy(Operator): ...@@ -788,9 +787,7 @@ class MESH_OT_print3d_align_to_xy(Operator):
return {'FINISHED'} return {'FINISHED'}
def invoke(self, context, event): def invoke(self, context, event):
if context.mode in {'EDIT_MESH', 'OBJECT'}: if context.mode not in {'EDIT_MESH', 'OBJECT'}:
pass
else:
return {'CANCELLED'} return {'CANCELLED'}
return self.execute(context) return self.execute(context)
......
...@@ -116,7 +116,7 @@ class VIEW3D_PT_print3d_transform(View3DPrintPanel, Panel): ...@@ -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_volume", text="Volume")
row.operator("mesh.print3d_scale_to_bounds", text="Bounds") row.operator("mesh.print3d_scale_to_bounds", text="Bounds")
row = layout.row(align=True) 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") row.prop(print_3d, "use_alignxy_face_area")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment