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
b25958d1
Commit
b25958d1
authored
5 years ago
by
Mikhail Rachinskiy
Browse files
Options
Downloads
Patches
Plain Diff
3D-Print: Cleanup convert docstrings to bl_description
parent
4d3b1dcc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
object_print3d_utils/operators.py
+26
-22
26 additions, 22 deletions
object_print3d_utils/operators.py
with
26 additions
and
22 deletions
object_print3d_utils/operators.py
+
26
−
22
View file @
b25958d1
...
...
@@ -49,9 +49,9 @@ def clean_float(text):
# Mesh Info
class
MESH_OT_print3d_info_volume
(
Operator
):
"""
Report the volume of the active mesh
"""
bl_idname
=
"
mesh.print3d_info_volume
"
bl_label
=
"
3D-Print Info Volume
"
bl_description
=
"
Report the volume of the active mesh
"
def
execute
(
self
,
context
):
scene
=
context
.
scene
...
...
@@ -78,9 +78,9 @@ class MESH_OT_print3d_info_volume(Operator):
class
MESH_OT_print3d_info_area
(
Operator
):
"""
Report the surface area of the active mesh
"""
bl_idname
=
"
mesh.print3d_info_area
"
bl_label
=
"
3D-Print Info Area
"
bl_description
=
"
Report the surface area of the active mesh
"
def
execute
(
self
,
context
):
scene
=
context
.
scene
...
...
@@ -127,9 +127,9 @@ def multiple_obj_warning(self, context):
class
MESH_OT_print3d_check_solid
(
Operator
):
"""
Check for geometry is solid (has valid inside/outside) and correct normals
"""
bl_idname
=
"
mesh.print3d_check_solid
"
bl_label
=
"
3D-Print Check Solid
"
bl_description
=
"
Check for geometry is solid (has valid inside/outside) and correct normals
"
@staticmethod
def
main_check
(
obj
,
info
):
...
...
@@ -153,9 +153,9 @@ class MESH_OT_print3d_check_solid(Operator):
class
MESH_OT_print3d_check_intersections
(
Operator
):
"""
Check geometry for self intersections
"""
bl_idname
=
"
mesh.print3d_check_intersect
"
bl_label
=
"
3D-Print Check Intersections
"
bl_description
=
"
Check geometry for self intersections
"
@staticmethod
def
main_check
(
obj
,
info
):
...
...
@@ -167,10 +167,12 @@ class MESH_OT_print3d_check_intersections(Operator):
class
MESH_OT_print3d_check_degenerate
(
Operator
):
"""
Check for degenerate geometry that may not print properly
"""
\
"""
(zero area faces, zero length edges)
"""
bl_idname
=
"
mesh.print3d_check_degenerate
"
bl_label
=
"
3D-Print Check Degenerate
"
bl_description
=
(
"
Check for degenerate geometry that may not print properly
"
"
(zero area faces, zero length edges)
"
)
@staticmethod
def
main_check
(
obj
,
info
):
...
...
@@ -195,9 +197,9 @@ class MESH_OT_print3d_check_degenerate(Operator):
class
MESH_OT_print3d_check_distorted
(
Operator
):
"""
Check for non-flat faces
"""
bl_idname
=
"
mesh.print3d_check_distort
"
bl_label
=
"
3D-Print Check Distorted Faces
"
bl_description
=
"
Check for non-flat faces
"
@staticmethod
def
main_check
(
obj
,
info
):
...
...
@@ -224,10 +226,12 @@ class MESH_OT_print3d_check_distorted(Operator):
class
MESH_OT_print3d_check_thick
(
Operator
):
"""
Check geometry is above the minimum thickness preference
"""
\
"""
(relies on correct normals)
"""
bl_idname
=
"
mesh.print3d_check_thick
"
bl_label
=
"
3D-Print Check Thickness
"
bl_description
=
(
"
Check geometry is above the minimum thickness preference
"
"
(relies on correct normals)
"
)
@staticmethod
def
main_check
(
obj
,
info
):
...
...
@@ -242,9 +246,9 @@ class MESH_OT_print3d_check_thick(Operator):
class
MESH_OT_print3d_check_sharp
(
Operator
):
"""
Check edges are below the sharpness preference
"""
bl_idname
=
"
mesh.print3d_check_sharp
"
bl_label
=
"
3D-Print Check Sharp
"
bl_description
=
"
Check edges are below the sharpness preference
"
@staticmethod
def
main_check
(
obj
,
info
):
...
...
@@ -268,9 +272,9 @@ class MESH_OT_print3d_check_sharp(Operator):
class
MESH_OT_print3d_check_overhang
(
Operator
):
"""
Check faces don
'
t overhang past a certain angle
"""
bl_idname
=
"
mesh.print3d_check_overhang
"
bl_label
=
"
3D-Print Check Overhang
"
bl_description
=
"
Check faces don
'
t overhang past a certain angle
"
@staticmethod
def
main_check
(
obj
,
info
):
...
...
@@ -305,9 +309,9 @@ class MESH_OT_print3d_check_overhang(Operator):
class
MESH_OT_print3d_check_all
(
Operator
):
"""
Run all checks
"""
bl_idname
=
"
mesh.print3d_check_all
"
bl_label
=
"
3D-Print Check All
"
bl_description
=
"
Run all checks
"
check_cls
=
(
MESH_OT_print3d_check_solid
,
...
...
@@ -334,9 +338,9 @@ class MESH_OT_print3d_check_all(Operator):
class
MESH_OT_print3d_clean_isolated
(
Operator
):
"""
Cleanup isolated vertices and edges
"""
bl_idname
=
"
mesh.print3d_clean_isolated
"
bl_label
=
"
3D-Print Clean Isolated
"
bl_label
=
"
3D-Print Clean Isolated
"
bl_description
=
"
Cleanup isolated vertices and edges
"
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
}
def
execute
(
self
,
context
):
...
...
@@ -396,9 +400,9 @@ class MESH_OT_print3d_clean_isolated(Operator):
class
MESH_OT_print3d_clean_distorted
(
Operator
):
"""
Tessellate distorted faces
"""
bl_idname
=
"
mesh.print3d_clean_distorted
"
bl_label
=
"
3D-Print Clean Distorted
"
bl_description
=
"
Tessellate distorted faces
"
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
}
def
execute
(
self
,
context
):
...
...
@@ -422,9 +426,9 @@ class MESH_OT_print3d_clean_distorted(Operator):
class
MESH_OT_print3d_clean_non_manifold
(
Operator
):
"""
Cleanup problems, like holes, non-manifold vertices, and inverted normals
"""
bl_idname
=
"
mesh.print3d_clean_non_manifold
"
bl_label
=
"
3D-Print Clean Non-Manifold and Inverted
"
bl_description
=
"
Cleanup problems, like holes, non-manifold vertices, and inverted normals
"
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
}
threshold
:
bpy
.
props
.
FloatProperty
(
...
...
@@ -550,7 +554,7 @@ class MESH_OT_print3d_clean_non_manifold(Operator):
@classmethod
def
fill_non_manifold
(
cls
,
sides
):
"""
fill
holes and then fill
in any remnant non-manifolds
"""
"""
fill in any remnant non-manifolds
"""
bpy
.
ops
.
mesh
.
select_all
(
action
=
'
SELECT
'
)
bpy
.
ops
.
mesh
.
fill_holes
(
sides
=
sides
)
...
...
@@ -562,9 +566,9 @@ class MESH_OT_print3d_clean_non_manifold(Operator):
class
MESH_OT_print3d_clean_thin
(
Operator
):
"""
Ensure minimum thickness
"""
bl_idname
=
"
mesh.print3d_clean_thin
"
bl_label
=
"
3D-Print Clean Thin
"
bl_description
=
"
Ensure minimum thickness
"
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
}
def
execute
(
self
,
context
):
...
...
@@ -578,9 +582,9 @@ class MESH_OT_print3d_clean_thin(Operator):
# ... helper function for info UI
class
MESH_OT_print3d_select_report
(
Operator
):
"""
Select the data associated with this report
"""
bl_idname
=
"
mesh.print3d_select_report
"
bl_label
=
"
3D-Print Select Report
"
bl_description
=
"
Select the data associated with this report
"
bl_options
=
{
'
INTERNAL
'
}
index
:
IntProperty
()
...
...
@@ -632,9 +636,9 @@ def _scale(scale, report=None, report_suffix=""):
class
MESH_OT_print3d_scale_to_volume
(
Operator
):
"""
Scale edit-mesh or selected-objects to a set volume
"""
bl_idname
=
"
mesh.print3d_scale_to_volume
"
bl_label
=
"
Scale to Volume
"
bl_description
=
"
Scale edit-mesh or selected-objects to a set volume
"
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
}
volume_init
:
FloatProperty
(
...
...
@@ -679,9 +683,9 @@ class MESH_OT_print3d_scale_to_volume(Operator):
class
MESH_OT_print3d_scale_to_bounds
(
Operator
):
"""
Scale edit-mesh or selected-objects to fit within a maximum length
"""
bl_idname
=
"
mesh.print3d_scale_to_bounds
"
bl_label
=
"
Scale to Bounds
"
bl_description
=
"
Scale edit-mesh or selected-objects to fit within a maximum length
"
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
}
length_init
:
FloatProperty
(
...
...
@@ -737,9 +741,9 @@ class MESH_OT_print3d_scale_to_bounds(Operator):
# Export
class
MESH_OT_print3d_export
(
Operator
):
"""
Export active object using print3d settings
"""
bl_idname
=
"
mesh.print3d_export
"
bl_label
=
"
3D-Print Export
"
bl_description
=
"
Export active object using 3D-Print settings
"
def
execute
(
self
,
context
):
from
.
import
export
...
...
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