Toggle modifier On/Off for certain frames
Hi,
I've figured out how to toggle modifier for an object so far, i.e.
$Box001.TurboSmooth.enabled = false/true
yaay! But here's a thing - I need to switch this modifier only for frame 3, 4, 5
I'm a complete noob with the maxcript so I'm asking for help. I tried to dig myself but with no result.
Any ideas?
Comments
Using render and viewport callbacks
Hope this helps...
Hi Krzysztof
Hi Krzysztof,
I might be wrong but i think that you can't animate modifiers state,
you can animate the iteration value instead, i would do something like that:
(
for obj in selection do
(
obj.modifiers[#TurboSmooth].iterations = 0
obj.modifiers[#TurboSmooth].useRenderIterations = on
with animate on
(
at time 0 obj.modifiers[#TurboSmooth].renderIterations = 0
at time 2 obj.modifiers[#TurboSmooth].renderIterations = 0
at time 3 obj.modifiers[#TurboSmooth].renderIterations = 2
at time 5 obj.modifiers[#TurboSmooth].renderIterations = 2
at time 6 obj.modifiers[#TurboSmooth].renderIterations = 0
)
)
)
----------------------------------------------------------------------------------------
Sadly the viewport Iteration doesn't animate well with turbosmooth, though it works well with meshsmooth:
(
for obj in selection do
with animate on
(
at time 0 obj.modifiers[#meshsmooth].Iterations = 0
at time 2 obj.modifiers[#meshsmooth].Iterations = 0
at time 3 obj.modifiers[#meshsmooth].Iterations = 2
at time 5 obj.modifiers[#meshsmooth].Iterations = 2
at time 6 obj.modifiers[#meshsmooth].Iterations = 0
)
)
---------------------------------------------------------------------------
there might be better ways, i am also a noob at maxscript...