PDA

View Full Version : collapse controller


Floating_Inkpot
01-29-2009, 10: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,

Polimeno
01-29-2009, 11:19 PM
do you mean bake your animation into key frames ?

if yes, check:
http://www.scriptspot.com/search/node/bake+animation

Floating_Inkpot
02-08-2009, 07: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
controllerTo
) -- end fn collapseController2Controller

CGTalk Moderation
02-08-2009, 07: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.