# Check all objects and switch the state of the
# specified, named modifiers
# ============================================
NAMES = ["S0","S1","S2","voronoi","Decimate"]
USE = 1
# ============================================
import bpy
# ---------------------------------------------
print("Switch modifier state.")
# ---------------------------------------------
for obj in bpy.context.scene.objects:
if len(obj.modifiers)<1: continue
print(obj.name)
for k in obj.modifiers:
if k.name in NAMES:
k.show_viewport = USE
# ---------------------------------------------
print("All modifiers set to "+str(USE))
# ---------------------------------------------
# Copyright TEA DE SOUZA 2014. Free to use and
# modify, do not remove this notice.