May 15, 2011

Display by frame

Little C.O.F.F.E.E script that allow to change objects every frame.

It's quite simple :
It compares the name of the group with the number of the frame and if it matches, the group is displayed.

Simply create a C.O.F.F.E.E tag with the following code on Nulls (groups) witch name are corresponding to the frame during witch they'll be activated (!?!)


var dirframe = op->GetName();               //gets group name
var test = int(evaluate(dirframe));            //converts group name to int
var t = doc->GetTime();                           //get current frame
var frame = t->GetFrame(doc->GetFps()); //get current frame

if(test==frame){   //if group's name = frame number ---> group is active
else{                   //else group is disabled

Check example file here ---> DISPLAY BY FRAME

Might be used or tweaked for other uses.


No comments:

Post a Comment