diff --git a/space_view3d_modifier_tools.py b/space_view3d_modifier_tools.py index e34963bd60d4af893fddfdaa7d8e4875e2a1099b..0aa56beb6c6a7bcfef724b9e236e82c47b594544 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'}