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
This commit is contained in:
parent
5dd197cebe
commit
75ebeaff4c
|
@ -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'}
|
||||
|
|
Loading…
Reference in New Issue