View Full Version : collapse controller

01 January 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 ?


01 January 2009, 12:19 AM
do you mean bake your animation into key frames ?

if yes, check:

02 February 2009, 08:56 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
) -- end fn collapseController2Controller

CGTalk Moderation
02 February 2009, 08:56 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.