[Closed] Enable / Disable modifier?
Hi guys
im searching for a maxscript command to disable / enable my flex modifier.
I will not change the Flex value itself because it is animated.
Is there an option to disable modifiers? Like switching off the little lamp
symbol in the modifier stack?
cheers
NAIK
<modifier>.enabled ?
$foo.modifiers[2].enabled = false -- turn off 2nd modifier
Turn off all flex modifiers in the scene…
(getClassInstances flex).enabled=false
good to know that Paul, it´s a really simple line and works fine.
how can i collect the nodes that has this class (or modifier) ?
e.g.
TS_Class = (getClassInstances TurboSmooth)
for o in TS_Class where refs.dependents o do
(
print o
)
–returns
#(TurboSmooth:TurboSmooth)
– Error occurred in o loop; filename: ; position: 286
– Frame:
– o: TurboSmooth:TurboSmooth
– Type error: if-test requires BooleanClass, got: #(ReferenceTarget:ModApp, ReferenceTarget: DerivedObject, $Editable_Mesh:Sphere_Test_Mesh @ [15.044880,10.443705,114.659752] …)
OK
what am i missing ?
Thanks Paul!
Its kinda strange that when i enable all modifiers at once that Max hangs for 15 secs…
I mean my scene is not heavy, just four letters animated with the Flex mod…
cheers
NAIK
Flex modifiers are history dependent. It could be that the lag is from max having to recalculate all of the flex data on every frame up until the frame that the time slider is set at. Try this: goto frame 0 (or whatever frame you have as the flex reference frame for your objects, or anytime prior to that value) and try disabling/enabling the modifiers again. Do you still experience the lag?
Flex modifiers are history dependent. It could be that the lag is from max having to recalculate all of the flex data on every frame up until the frame that the time slider is set at. Try this: goto frame 0 (or whatever frame you have as the flex reference frame for your objects, or anytime prior to that value) and try disabling/enabling the modifiers again. Do you still experience the lag?
Yeah Tyson, i just read that the Flex mod is history dependent
therefore going back to Frame 0 and switching the mods on / off
will bring no lags anymore…
Thanks guys, i appreciate it
cheers
NAIK
theNodes = #()
for o in getClassInstances TurboSmooth do
(
for n in refs.dependentNodes o where isValidNode n do
(
appendIfUnique theNodes n
)
)
print theNodes
-Johan