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>2017-06-21 05:17:35 +0300
committerlijenstina <lijenstina@gmail.com>2017-06-21 05:17:35 +0300
commit0e2011dfdae7656ce9ee57d75075e7409bae3d7e (patch)
treefde7e0e13abbdb7f261a10dc4c22328c180eb6d3 /space_view3d_display_tools
parenta173dd41c783118c9f8e045ee5006dce82482dd5 (diff)
Display Tools: Update to version 1.6.3
Pep8 cleanup Some minor UI changes for better alignement Useless Tools: Refactor the messaging system
Diffstat (limited to 'space_view3d_display_tools')
-rw-r--r--space_view3d_display_tools/__init__.py122
-rw-r--r--space_view3d_display_tools/select_tools.py140
-rw-r--r--space_view3d_display_tools/shading_menu.py15
-rw-r--r--space_view3d_display_tools/useless_tools.py85
4 files changed, 181 insertions, 181 deletions
diff --git a/space_view3d_display_tools/__init__.py b/space_view3d_display_tools/__init__.py
index 072b6ba4..03df6a32 100644
--- a/space_view3d_display_tools/__init__.py
+++ b/space_view3d_display_tools/__init__.py
@@ -1,7 +1,7 @@
# space_view_3d_display_tools.py Copyright (C) 2014, Jordi Vall-llovera
# Multiple display tools for fast navigate/interact with the viewport
-# ***** BEGIN GPL LICENSE BLOCK *****
+# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -17,22 +17,24 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-# ***** END GPL LICENCE BLOCK *****
-# Contributed to by Jasperge, Pixaal, Meta-androcto, Lapineige, lijenstina
+# ##### END GPL LICENCE BLOCK #####
+# Contributed to by:
+# Jasperge, Pixaal, Meta-androcto, Lapineige, lijenstina,
+# Felix Schlitter, Ales Sidenko, Jakub Belcik
bl_info = {
"name": "Display Tools",
"author": "Jordi Vall-llovera Medina, Jhon Wallace",
- "version": (1, 6, 1),
+ "version": (1, 6, 3),
"blender": (2, 7, 0),
"location": "Toolshelf",
"description": "Display tools for fast navigation/interaction with the viewport",
"warning": "",
- "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/"
- "3D_interaction/Display_Tools",
- "tracker_url": "",
+ "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
+ "Py/Scripts/3D_interaction/Display_Tools",
"category": "3D View"}
+
# Import From Files
if "bpy" in locals():
import importlib
@@ -78,16 +80,18 @@ class DisplayToolsPanel(Panel):
bl_category = "Display"
bl_options = {'DEFAULT_CLOSED'}
- draw_type_icons = {'BOUNDS': 'BBOX',
- 'WIRE': 'WIRE',
- 'SOLID': 'SOLID',
- 'TEXTURED': 'POTATO'
- }
- bounds_icons = {'BOX': 'MESH_CUBE',
- 'SPHERE': 'MATSPHERE',
- 'CYLINDER': 'MESH_CYLINDER',
- 'CONE': 'MESH_CONE'
- }
+ draw_type_icons = {
+ 'BOUNDS': 'BBOX',
+ 'WIRE': 'WIRE',
+ 'SOLID': 'SOLID',
+ 'TEXTURED': 'POTATO'
+ }
+ bounds_icons = {
+ 'BOX': 'MESH_CUBE',
+ 'SPHERE': 'MATSPHERE',
+ 'CYLINDER': 'MESH_CYLINDER',
+ 'CONE': 'MESH_CONE'
+ }
def draw(self, context):
scene = context.scene
@@ -307,6 +311,7 @@ class DisplayToolsPanel(Panel):
col = box1.column(align=True)
row = col.row(align=True)
row.prop(display_tools, "UiTabDrop", index=3, text="Modifiers", icon=icon_active_3)
+
if not MODIFIERDROP:
mod_all_hide = row.operator("ut.subsurf_show_hide", icon="MOD_SOLIDIFY", text="")
mod_all_hide.show = False
@@ -387,11 +392,12 @@ class DisplayToolsPanel(Panel):
col = box1.column(align=True)
row = col.row(align=True)
row.prop(display_tools, "UiTabDrop", index=4, text="Selection", icon=icon_active_4)
+
if not SELECT2DROP:
- row.operator("view3d.select_border", icon="MESH_PLANE", text="",)
- row.operator("view3d.select_circle",icon="MESH_CIRCLE", text="")
+ row.operator("view3d.select_border", text="", icon="MESH_PLANE")
+ row.operator("view3d.select_circle", text="", icon="MESH_CIRCLE")
+ row.label(text="", icon="BLANK1")
else:
- col = layout.column(align=True)
if obj and obj.mode == 'OBJECT':
col = layout.column(align=True)
col.label(text="Render Visibility:")
@@ -400,44 +406,41 @@ class DisplayToolsPanel(Panel):
col.label(text="Show/Hide:")
col.operator("opr.show_hide_object", text="Show/Hide", icon="GHOST_ENABLED")
col.operator("opr.show_all_objects", text="Show All", icon="RESTRICT_VIEW_OFF")
- col.operator("opr.hide_all_objects", text="Hide All", icon="RESTRICT_VIEW_ON")
+ col.operator("opr.hide_all_objects", text="Hide Inactive", icon="RESTRICT_VIEW_ON")
if obj:
if obj.mode == 'OBJECT':
- layout.operator_menu_enum("object.show_by_type", "type", text="Show By Type")
- layout.operator_menu_enum("object.hide_by_type", "type", text="Hide By Type")
+ col = layout.column(align=True)
+ col.operator_menu_enum("object.show_by_type", "type", text="Show By Type")
+ col.operator_menu_enum("object.hide_by_type", "type", text="Hide By Type")
layout.label(text="Selection:")
- layout.operator_menu_enum("object.select_by_type", "type", text="Select All by Type...")
col = layout.column(align=True)
- col.operator("opr.select_all", icon="MOD_MESHDEFORM")
- col.operator("opr.inverse_selection", icon="MOD_REMESH")
+ col.operator_menu_enum("object.select_by_type", "type",
+ text="Select All by Type...")
if obj_type == 'MESH' and obj.mode == 'EDIT':
col = layout.column(align=True)
- col.operator("opr.select_all", icon="MOD_MESHDEFORM")
- col.operator("opr.inverse_selection", icon="MOD_REMESH")
-
- col = layout.column(align=True)
col.operator("mesh.select_linked", icon="ROTATECOLLECTION")
col.operator("opr.loop_multi_select", icon="OUTLINER_DATA_MESH")
- else:
- col = layout.column(align=True)
- col.operator("opr.select_all", icon="MOD_MESHDEFORM")
- col.operator("opr.inverse_selection", icon="MOD_REMESH")
-
+ col = layout.column(align=True)
+ col.operator("opr.select_all", icon="MOD_MESHDEFORM")
+ col.operator("opr.inverse_selection", icon="MOD_REMESH")
# fast nav options
- col.separator()
box1 = layout.box()
col = box1.column(align=True)
row = col.row(align=True)
row.prop(display_tools, "UiTabDrop", index=5, text="Fast Nav", icon=icon_active_5)
- if FASTNAVDROP:
+ if not FASTNAVDROP:
+ row.operator("view3d.fast_navigate_operator", text="", icon="NEXT_KEYFRAME")
+ row.operator("view3d.fast_navigate_stop", text="", icon="PANEL_CLOSE")
+ row.label(text="", icon="BLANK1")
+ else:
col = layout.column(align=True)
- col.operator("view3d.fast_navigate_operator")
- col.operator("view3d.fast_navigate_stop")
+ col.operator("view3d.fast_navigate_operator", icon="NEXT_KEYFRAME")
+ col.operator("view3d.fast_navigate_stop", icon="PANEL_CLOSE")
layout.label("Settings:")
layout.prop(display_tools, "OriginalMode")
@@ -537,23 +540,23 @@ class display_tools_scene_props(PropertyGroup):
description="Enter an integer"
)
ScreenStart = IntProperty(
- name="Left Limit",
- default=0,
- min=0,
- max=1024,
- subtype='PIXEL',
- description="Limit the screen active area width from the left side\n"
- "Changed values will take effect on the next run",
- )
+ name="Left Limit",
+ default=0,
+ min=0,
+ max=1024,
+ subtype='PIXEL',
+ description="Limit the screen active area width from the left side\n"
+ "Changed values will take effect on the next run",
+ )
ScreenEnd = IntProperty(
- name="Right Limit",
- default=0,
- min=0,
- max=1024,
- subtype='PIXEL',
- description="Limit the screen active area width from the right side\n"
- "Changed values will take effect on the next run",
- )
+ name="Right Limit",
+ default=0,
+ min=0,
+ max=1024,
+ subtype='PIXEL',
+ description="Limit the screen active area width from the right side\n"
+ "Changed values will take effect on the next run",
+ )
# Define the UI drop down prop
UiTabDrop = BoolVectorProperty(
name="Tab",
@@ -571,9 +574,9 @@ class display_tools_scene_props(PropertyGroup):
# Addons Preferences Update Panel
# Define Panels for updating
-panels = [
- DisplayToolsPanel
- ]
+panels = (
+ DisplayToolsPanel,
+ )
def update_panel(self, context):
@@ -622,6 +625,7 @@ def DRAW_hide_by_type_MENU(self, context):
"type", text="Show By Type"
)
+
# register the classes and props
def register():
bpy.utils.register_module(__name__)
@@ -635,10 +639,10 @@ def register():
def unregister():
- del bpy.types.Scene.display_tools
selection_restrictor.unregister()
bpy.types.VIEW3D_MT_object_showhide.remove(DRAW_hide_by_type_MENU)
bpy.utils.unregister_module(__name__)
+ del bpy.types.Scene.display_tools
if __name__ == "__main__":
diff --git a/space_view3d_display_tools/select_tools.py b/space_view3d_display_tools/select_tools.py
index 5327ba7f..eb5c0aaa 100644
--- a/space_view3d_display_tools/select_tools.py
+++ b/space_view3d_display_tools/select_tools.py
@@ -1,4 +1,4 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
+# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -14,39 +14,45 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-# ***** END GPL LICENCE BLOCK *****
+# ##### END GPL LICENCE BLOCK #####
bl_info = {
"name": "Select Tools",
"author": "Jakub Belcik",
- "version": (1, 0, 1),
+ "version": (1, 0, 2),
"blender": (2, 7, 3),
"location": "3D View > Tools",
"description": "Selection Tools",
"warning": "",
"wiki_url": "",
- "tracker_url": "",
"category": ""
}
import bpy
from bpy.types import Operator
+from bpy.props import (
+ BoolProperty,
+ EnumProperty,
+ )
class ShowHideObject(Operator):
bl_idname = "opr.show_hide_object"
bl_label = "Show/Hide Object"
- bl_description = "Show/Hide all objects in the Data"
+ bl_description = ("Flip the viewport visibility for all objects in the Data\n"
+ "(Hidden to Visible and Visible to Hidden)")
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if context.object is None:
- self.report({'INFO'}, "Show/Hide: No Object found. Operation Cancelled")
+ self.report({'INFO'},
+ "Show/Hide: No Object found. Operation Cancelled")
return {'CANCELLED'}
if context.object.mode != 'OBJECT':
- self.report({'INFO'}, "Show/Hide: This operation can be performed only in object mode")
+ self.report({'INFO'},
+ "Show/Hide: This operation can be performed only in object mode")
return {'CANCELLED'}
for i in bpy.data.objects:
@@ -87,7 +93,7 @@ class ShowAllObjects(Operator):
class HideAllObjects(Operator):
bl_idname = "opr.hide_all_objects"
- bl_label = "Hide All Objects"
+ bl_label = "Hide All Inactive"
bl_description = "Hide all inactive objects"
bl_options = {'REGISTER', 'UNDO'}
@@ -210,26 +216,29 @@ class HideRenderAllSelected(Operator):
return {'FINISHED'}
+
class OBJECT_OT_HideShowByTypeTemplate():
- bl_options = {'UNDO','REGISTER'}
-
- type = bpy.props.EnumProperty(items=(
- ('MESH', 'Mesh', ''),
- ('CURVE', 'Curve', ''),
- ('SURFACE', 'Surface', ''),
- ('META', 'Meta', ''),
- ('FONT', 'Font', ''),
- ('ARMATURE', 'Armature', ''),
- ('LATTICE', 'Lattice', ''),
- ('EMPTY', 'Empty', ''),
- ('CAMERA', 'Camera', ''),
- ('LAMP', 'Lamp', ''),
- ('ALL', 'All', '')),
- name='Type',
- description='Type',
+ bl_options = {'UNDO', 'REGISTER'}
+
+ type = EnumProperty(
+ items=(
+ ('MESH', 'Mesh', ''),
+ ('CURVE', 'Curve', ''),
+ ('SURFACE', 'Surface', ''),
+ ('META', 'Meta', ''),
+ ('FONT', 'Font', ''),
+ ('ARMATURE', 'Armature', ''),
+ ('LATTICE', 'Lattice', ''),
+ ('EMPTY', 'Empty', ''),
+ ('CAMERA', 'Camera', ''),
+ ('LAMP', 'Lamp', ''),
+ ('ALL', 'All', '')),
+ name="Type",
+ description="Type",
default='LAMP',
- options={'ANIMATABLE'})
+ options={'ANIMATABLE'}
+ )
def execute(self, context):
@@ -245,7 +254,7 @@ class OBJECT_OT_HideShowByTypeTemplate():
# Only Specific Types? + Filter layers
for obj in objects:
- for i in range(0,20):
+ for i in range(0, 20):
if obj.layers[i] & scene.layers[i]:
if self.type == 'ALL' or obj.type == self.type:
if obj not in eligible_objects:
@@ -253,7 +262,6 @@ class OBJECT_OT_HideShowByTypeTemplate():
objects = eligible_objects
eligible_objects = []
-
# Only Render Restricted?
if self.hide_render_restricted:
for obj in objects:
@@ -272,46 +280,50 @@ class OBJECT_OT_HideShowByTypeTemplate():
return self.execute(context)
-## show hide by type ## by Felix Schlitter
+# show hide by type # by Felix Schlitter
class OBJECT_OT_HideByType(OBJECT_OT_HideShowByTypeTemplate, Operator):
- bl_idname = 'object.hide_by_type'
- bl_label = 'Hide By Type'
- hide_or_show = bpy.props.BoolProperty(
- name="Hide",
- description="Inverse effect",
- options={'HIDDEN'},
- default=1
- )
- hide_selected = bpy.props.BoolProperty(
- name="Selected",
- description="Hide only selected objects",
- default=0
- )
- hide_render_restricted = bpy.props.BoolProperty(
- name="Only Render-Restricted",
- description="Hide only render restricted objects",
- default=0
- )
+ bl_idname = "object.hide_by_type"
+ bl_label = "Hide By Type"
+
+ hide_or_show = BoolProperty(
+ name="Hide",
+ description="Inverse effect",
+ options={'HIDDEN'},
+ default=1
+ )
+ hide_selected = BoolProperty(
+ name="Selected",
+ description="Hide only selected objects",
+ default=0
+ )
+ hide_render_restricted = BoolProperty(
+ name="Only Render-Restricted",
+ description="Hide only render restricted objects",
+ default=0
+ )
+
class OBJECT_OT_ShowByType(OBJECT_OT_HideShowByTypeTemplate, Operator):
- bl_idname = 'object.show_by_type'
- bl_label = 'Show By Type'
- hide_or_show = bpy.props.BoolProperty(
- name="Hide",
- description="Inverse effect",
- options={'HIDDEN'},
- default=0
- )
- hide_selected = bpy.props.BoolProperty(
- name="Selected",
- options={'HIDDEN'},
- default=0
- )
- hide_render_restricted = bpy.props.BoolProperty(
- name="Only Renderable",
- description="Show only non render restricted objects",
- default=0
- )
+ bl_idname = "object.show_by_type"
+ bl_label = "Show By Type"
+
+ hide_or_show = BoolProperty(
+ name="Hide",
+ description="Inverse effect",
+ options={'HIDDEN'},
+ default=0
+ )
+ hide_selected = BoolProperty(
+ name="Selected",
+ options={'HIDDEN'},
+ default=0
+ )
+ hide_render_restricted = BoolProperty(
+ name="Only Renderable",
+ description="Show only non render restricted objects",
+ default=0
+ )
+
# Register
def register():
diff --git a/space_view3d_display_tools/shading_menu.py b/space_view3d_display_tools/shading_menu.py
index 12718a9f..c537f54b 100644
--- a/space_view3d_display_tools/shading_menu.py
+++ b/space_view3d_display_tools/shading_menu.py
@@ -1,9 +1,7 @@
# space_view_3d_display_tools.py Copyright (C) 2014, Jordi Vall-llovera
-#
# Multiple display tools for fast navigate/interact with the viewport
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
+
+# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -19,7 +17,7 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-# ***** END GPL LICENCE BLOCK *****
+# ##### END GPL LICENCE BLOCK #####
bl_info = {
"name": "shade Tools",
@@ -29,10 +27,9 @@ bl_info = {
"location": "Toolshelf",
"description": "Display tools for fast navigate/interact with the viewport",
"warning": "",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/"
- "3D_interaction/Display_Tools",
- "tracker_url": "",
- "category": "Addon Factory"}
+ "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
+ "Py/Scripts/3D_interaction/Display_Tools",
+ "category": "3D View"}
import bpy
diff --git a/space_view3d_display_tools/useless_tools.py b/space_view3d_display_tools/useless_tools.py
index 1ff2d99f..512fcf2d 100644
--- a/space_view3d_display_tools/useless_tools.py
+++ b/space_view3d_display_tools/useless_tools.py
@@ -20,12 +20,11 @@ bl_info = {
"name": "Useless Tools",
"description": "Just a little collection of scripts and tools I use daily",
"author": "Greg Zaal",
- "version": (1, 2, 1),
+ "version": (1, 2, 2),
"blender": (2, 75, 0),
"location": "3D View > Tools",
"warning": "",
"wiki_url": "",
- "tracker_url": "",
"category": "Tools"}
@@ -34,9 +33,14 @@ from bpy.types import Operator
from bpy.props import BoolProperty
-def print_errors(lists, operators="useless_tools.py"):
- if lists:
- print("\n[%s]\n\n%s\n" % (operators, "\n".join(lists)))
+def error_handlers(self, op_name, errors, reports="ERROR"):
+ if self and reports:
+ self.report({'INFO'},
+ reports + ": some operations could not be performed "
+ "(See Console for more info)")
+
+ str_errors = "\n".join(errors)
+ print("\n[Display Tools]\nOperator: {}\nErrors: {}\n".format(op_name, str_errors))
class UTSetSelectable(Operator):
@@ -58,9 +62,7 @@ class UTSetSelectable(Operator):
name = getattr(obj, "name", "Nameless")
errors.append("Error on {} - {}".format(name, k))
if errors:
- print_errors(errors, "Operator: ut.set_selectable")
- self.report({'INFO'},
- "Set Selectable: some operations could not be performed (See console for more info)")
+ error_handlers(self, "ut.set_selectable", errors, "Set Selectable")
return {'FINISHED'}
@@ -84,9 +86,7 @@ class UTSetRenderable(Operator):
name = getattr(obj, "name", "Nameless")
errors.append("Error on {} - {}".format(name, k))
if errors:
- print_errors(errors, "Operator: ut.set_renderable")
- self.report({'INFO'},
- "Set Renderable: some operations could not be performed (See console for more info)")
+ error_handlers(self, "ut.set_renderable", errors, "Set Renderable")
return {'FINISHED'}
@@ -105,9 +105,7 @@ class UTAllSelectable(Operator):
name = getattr(obj, "name", "Nameless")
errors.append("Error on {} - {}".format(name, k))
if errors:
- print_errors(errors, "Operator: ut.all_selectable")
- self.report({'INFO'},
- "All Selectable: some operations could not be performed (See console for more info)")
+ error_handlers(self, "ut.all_selectable", errors, "All Selectable")
return {'FINISHED'}
@@ -126,9 +124,8 @@ class UTAllRenderable(Operator):
name = getattr(obj, "name", "Nameless")
errors.append("Error on {} - {}".format(name, k))
if errors:
- print_errors(errors, "Operator: ut.all_renderable")
- self.report({'INFO'},
- "All Renderable: some operations could not be performed (See console for more info)")
+ error_handlers(self, "ut.all_renderable", errors, "All Renderable")
+
return {'FINISHED'}
@@ -151,9 +148,7 @@ class UTSelNGon(Operator):
except Exception as k:
errors.append("Error - {}".format(k))
if errors:
- print_errors(errors, "Operator: ut.select_ngons")
- self.report({'INFO'},
- "Select NGons: some operations could not be performed (See console for more info)")
+ error_handlers(self, "ut.select_ngons", errors, "Select NGons")
return {'FINISHED'}
@@ -164,11 +159,11 @@ class UTWireShowHideSelAll(Operator):
bl_description = "Change the status of the Wire display on Selected Objects"
show = BoolProperty(
- default=False
- )
+ default=False
+ )
selected = BoolProperty(
- default=False
- )
+ default=False
+ )
@classmethod
def poll(cls, context):
@@ -184,9 +179,8 @@ class UTWireShowHideSelAll(Operator):
name = getattr(e, "name", "Nameless")
errors.append("Error on {} - {}".format(name, k))
if errors:
- print_errors(errors, "Operator: ut.wire_show_hide")
- self.report({'INFO'},
- "Show/Hide Wire: some operations could not be performed (See console for more info)")
+ error_handlers(self, "ut.wire_show_hide", errors,
+ "Show / Hide Wire Selected or All")
return {'FINISHED'}
@@ -199,11 +193,11 @@ class UTSubsurfHideSelAll(Operator):
"Hide All and Show All operate on All Objects in the data")
show = BoolProperty(
- default=False
- )
+ default=False
+ )
selected = BoolProperty(
- default=False
- )
+ default=False
+ )
def execute(self, context):
errors = []
@@ -217,9 +211,7 @@ class UTSubsurfHideSelAll(Operator):
errors.append(
"No subsurf on {} or it is not named Subsurf\nError: {}".format(name, k))
if errors:
- print_errors(errors, "Operator: ut.subsurf_show_hide")
- self.report({'INFO'},
- "Subsurf Show/Hide: some operations could not be performed (See console for more info)")
+ error_handlers(self, "ut.subsurf_show_hide", errors, "Subsurf Show/Hide")
return {'FINISHED'}
@@ -230,11 +222,11 @@ class UTOptimalDisplaySelAll(Operator):
bl_description = "Disables Optimal Display for all Subsurf modifiers on objects"
on = BoolProperty(
- default=False
- )
+ default=False
+ )
selected = BoolProperty(
- default=False
- )
+ default=False
+ )
def execute(self, context):
errors = []
@@ -248,9 +240,7 @@ class UTOptimalDisplaySelAll(Operator):
errors.append(
"No subsurf on {} or it is not named Subsurf\nError: {}".format(name, k))
if errors:
- print_errors(errors, "Operator: ut.optimaldisplay")
- self.report({'INFO'},
- "Optimal Display: some operations could not be performed (See console for more info)")
+ error_handlers(self, "ut.optimaldisplay", errors, "Optimal Display")
return {'FINISHED'}
@@ -274,9 +264,7 @@ class UTAllEdges(Operator):
errors.append(
"Enabling All Edges on {} \nError: {}".format(name, k))
if errors:
- print_errors(errors, "Operator: ut.all_edges")
- self.report({'INFO'},
- "Enable All Edges: some operations could not be performed (See console for more info)")
+ error_handlers(self, "ut.all_edges", errors, "All Edges")
return {'FINISHED'}
@@ -287,8 +275,8 @@ class UTDoubleSided(Operator):
bl_description = "Disables Double Sided Normals for all objects"
on = BoolProperty(
- default=False
- )
+ default=False
+ )
def execute(self, context):
errors = []
@@ -300,9 +288,8 @@ class UTDoubleSided(Operator):
errors.append(
"Applying Double Sided Normals on {} \nError: {}".format(name, k))
if errors:
- print_errors(errors, "Operator: ut.double_sided")
- self.report({'INFO'},
- "Double Sided Normals: some operations could not be performed (See console for more info)")
+ error_handlers(self, "ut.double_sided", errors, "Double Sided Normals")
+
return {'FINISHED'}