PDA

View Full Version : animation frames


chrleon
01-09-2003, 02:25 PM
Hi folks.

I seem to always get the help I need in this forum, so here we go again.

Is there a way for cinema to automatically do a 'CurrentStateToObject' in an animation? I don't want to do it by hand..

No project or nothing, but I need to do it for import in another program.

Perhaps a script or something?

Oh, btw, I'm on r7.

Christian C.

H. Ikeda
01-10-2003, 11:56 AM
Sure, COFFEE might do that, e.g. read time of each key on a sequence and set document time and do "CStoO."

The first key of the first sequence of the first track about an object (obj) is given by
var trck = obj->GetFirstTrack();
var seq = trck->GetFirstSequence();
var key = seq->GetFirstKey();

And you could set doc time as
var time = key->GetTime();
doc->SetTime(time);

Finally execute "CStoO" like
var data;
SendModelingCommand(MCOMMAND_CURRENTSTATETOOBJECT, NULL, obj, data, MODIFY_ALL);
('data' is a dummy variable, I'm not sure NULL works instead of it...)

hope this helps

CGTalk Moderation
01-14-2006, 02:00 AM
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.