Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
c924e2d5
Commit
c924e2d5
authored
3 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup: minor changes & simplification to Align-XY
Also shorten text which didn't fit in the UI.
parent
e648555e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
object_print3d_utils/operators.py
+2
-5
2 additions, 5 deletions
object_print3d_utils/operators.py
object_print3d_utils/ui.py
+1
-1
1 addition, 1 deletion
object_print3d_utils/ui.py
with
3 additions
and
6 deletions
object_print3d_utils/operators.py
+
2
−
5
View file @
c924e2d5
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
object_print3d_utils/ui.py
+
1
−
1
View file @
c924e2d5
...
@@ -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
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment