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:
authorlijenstina <lijenstina@gmail.com>2016-11-12 17:55:34 +0300
committerlijenstina <lijenstina@gmail.com>2016-11-12 17:55:34 +0300
commit3b9cbaa44efb03e768219edb2d0427d478233691 (patch)
treef01ae3b8318286536912e1d23ec1702efc28f9f1 /object_print3d_utils/operators.py
parent7df41339ae89c3281cb8d81f0b9d09c11aa266ae (diff)
Print3D: cleanup unused variables and imports, fix unused operator
Pep8 cleanup Remove unused variables and imports Print3DCleanThin was registered even though it was just a stub It would crash when called from the search menu (TODO was not commented out) Added an info message about multiple object selection - only the active object is checked
Diffstat (limited to 'object_print3d_utils/operators.py')
-rw-r--r--object_print3d_utils/operators.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/object_print3d_utils/operators.py b/object_print3d_utils/operators.py
index 0ede00df..47d1f58b 100644
--- a/object_print3d_utils/operators.py
+++ b/object_print3d_utils/operators.py
@@ -24,13 +24,8 @@ import bpy
import bmesh
from bpy.types import Operator
from bpy.props import (
- StringProperty,
- BoolProperty,
IntProperty,
FloatProperty,
- FloatVectorProperty,
- EnumProperty,
- PointerProperty,
)
from . import (
@@ -102,7 +97,7 @@ class Print3DInfoArea(Operator):
info.append(("Area: %s \"²" % clean_float("%.4f" % ((area * (scale ** 2.0)) / (0.0254 ** 2.0))), None))
else:
info.append(("Area: %s²" % clean_float("%.8f" % area), None))
-
+
report.update(*info)
return {'FINISHED'}
@@ -117,9 +112,16 @@ def execute_check(self, context):
self.main_check(obj, info)
report.update(*info)
+ multiple_obj_warning(self, context)
+
return {'FINISHED'}
+def multiple_obj_warning(self, context):
+ if len(context.selected_objects) > 1:
+ self.report({"INFO"}, "Multiple selected objects. Only the active one will be evaluated")
+
+
class Print3DCheckSolid(Operator):
"""Check for geometry is solid (has valid inside/outside) and correct normals"""
bl_idname = "mesh.print3d_check_solid"
@@ -333,6 +335,8 @@ class Print3DCheckAll(Operator):
report.update(*info)
+ multiple_obj_warning(self, context)
+
return {'FINISHED'}
@@ -594,7 +598,7 @@ class Print3DCleanThin(Operator):
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
- TODO
+ # TODO
return {'FINISHED'}
@@ -644,7 +648,7 @@ class Print3DSelectReport(Operator):
self.report({'WARNING'}, "Report is out of date, re-run check")
# cool, but in fact annoying
- #~ bpy.ops.view3d.view_selected(use_all_regions=False)
+ # bpy.ops.view3d.view_selected(use_all_regions=False)
return {'FINISHED'}
@@ -768,8 +772,6 @@ class Print3DExport(Operator):
bl_label = "Print3D Export"
def execute(self, context):
- scene = bpy.context.scene
- print_3d = scene.print_3d
from . import export
info = []