[Bf-extensions-cvs] [75ebeaf] master: Modifier Tools: Update to version 0.2.2
lijenstina
noreply at git.blender.org
Tue Nov 8 01:54:12 CET 2016
Commit: 75ebeaff4c90b1b74cfcb4a15db509d82d9e04b2
Author: lijenstina
Date: Tue Nov 8 01:53:01 2016 +0100
Branches: master
https://developer.blender.org/rBA75ebeaff4c90b1b74cfcb4a15db509d82d9e04b2
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
===================================================================
M space_view3d_modifier_tools.py
===================================================================
diff --git a/space_view3d_modifier_tools.py b/space_view3d_modifier_tools.py
index e34963b..0aa56be 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'}
More information about the Bf-extensions-cvs
mailing list