Notifications
Clear all
[Closed] collapse controller
Jan 29, 2009 11:26 pm
Hi ,
i did’nt find any info about the “collapse controller” utility found in
TrackView -> Controller -> Collapse Controller
I need to collapse a float_script controller animation into 1 keyframe per frame.
I can do this operation by hand, but i need to automate this process by making it with Maxscript.
Is there a function to call this “utility” ?
i searched “Collapse” / “Controller”, in this forum, and in the maxscript reference but i did’nt find anything. How should i search to find that type of information ?
Thanks,
2 Replies
Jan 29, 2009 11:26 pm
do you mean bake your animation into key frames ?
if yes, check:
http://www.scriptspot.com/search/node/bake+animation
Jan 29, 2009 11:26 pm
I finally found the function wich is executed in the TrackView -> Controller -> Collapse Controller.
fn collapseController ControllerFrom ControllerTo Start End Samples =
(
-- function handles everything in ticks, to ensure flexibility and precision
local starttick = start*ticksPerFrame, endtick = end*ticksPerFrame, sampletick = samples*ticksPerFrame
for i in starttick to endtick by sampletick do
(
tmpKey = addNewKey controllerTo ((i/ticksPerFrame) as time)
tmpKey.value = at time ((i/ticksPerFrame) as time) controllerFrom.value
) -- end for
controllerTo
) -- end fn collapseController2Controller