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-08 03:53:01 +0300
committerlijenstina <lijenstina@gmail.com>2016-11-08 03:53:01 +0300
commit75ebeaff4c90b1b74cfcb4a15db509d82d9e04b2 (patch)
treed7aa96bc4f244cd37f08307c899018fe5cfd6877 /space_view3d_modifier_tools.py
parent5dd197cebed93f4f6bc5d8960fd77a7e0628e805 (diff)
Modifier Tools: Update to version 0.2.2
Add Viewport Visibility toggle for the active object (fixes the toggle not doing anything if there is no selection) Rephrase Visibility messages Clean up the cmd/ terminal failure message
Diffstat (limited to 'space_view3d_modifier_tools.py')
-rw-r--r--space_view3d_modifier_tools.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/space_view3d_modifier_tools.py b/space_view3d_modifier_tools.py
index e34963bd..0aa56beb 100644
--- a/space_view3d_modifier_tools.py
+++ b/space_view3d_modifier_tools.py
@@ -20,7 +20,7 @@
bl_info = {
"name": "Modifier Tools",
"author": "Meta Androcto, saidenka",
- "version": (0, 2, 1),
+ "version": (0, 2, 2),
"blender": (2, 77, 0),
"location": "Properties > Modifiers",
"description": "Modifiers Specials Show/Hide/Apply Selected",
@@ -84,8 +84,8 @@ class ApplyAllModifiers(Operator):
"Applying modifiers failed for {}".format(message_obj)))
if (collect_names and message_obj == "some objects (Check System Console)"):
- print("\n** MODIFIER SPECIALS REPORT **\n Applying failed on:\n",
- ", ".join(collect_names))
+ print("\n** MODIFIERS TOOLS REPORT **\n\nApplying failed on:"
+ "\n\n{} \n".format(", ".join(collect_names)))
return {'FINISHED'}
@@ -126,7 +126,7 @@ class DeleteAllModifiers(Operator):
class ToggleApplyModifiersView(Operator):
bl_idname = "object.toggle_apply_modifiers_view"
bl_label = "Hide Viewport"
- bl_description = "Shows/Hide modifier of the selected object(s) in 3d View"
+ bl_description = "Shows/Hide modifiers of the active / selected object(s) in 3d View"
bl_options = {'REGISTER'}
def execute(self, context):
@@ -134,17 +134,22 @@ class ToggleApplyModifiersView(Operator):
message_a = ""
for mod in context.active_object.modifiers:
- if (mod.show_viewport):
+ if mod.show_viewport:
is_apply = False
break
+
+ # active object - no selection
+ for mod in context.active_object.modifiers:
+ mod.show_viewport = is_apply
+
for obj in context.selected_objects:
for mod in obj.modifiers:
mod.show_viewport = is_apply
if is_apply:
- message_a = "Applying modifiers to view"
+ message_a = "Displaying modifiers in the 3d View"
else:
- message_a = "Unregistered modifiers apply to the view"
+ message_a = "Hiding modifiers in the 3d View"
self.report(type={"INFO"}, message=message_a)
return {'FINISHED'}