Notifications
Clear all
[Closed] Turning off modifier
Aug 21, 2014 4:41 am
How do you temporarily turn off a modifier with code?
‘Enabled = false ’ doesn’t work .
1 Reply
1 Reply
Works for me. Just doesn’t update the lightbulb icon in the Modify panel (unless you force an update by reselecting the object or something similar), but otherwise it seems to work right.
For example,
t = teapot()
b = bend angle:90
addModifier t b
b.enabled = false
max modify mode
select t
You can turn on and off in various ways, and it works each time:
t.bend.enabled = true
t.modifiers[1].enabled = false
t.modifiers[#Bend].enabled = true