Replace with layer by time

papou

··'
Hi,
This lscript replace an incremental object by its layers at corresponding frame.

Code:
@version 2.3
@script motion
// replace with Layers

Done = 0;
path = "S:\_PROJECTS\TEST_REPLACEMENT\Objects\Test_000.lwo";

create
{
}

process: ma, frame, time
{
    Frame = Scene().currenttimeScene().fps;
    if(Done != Frame)
    {
        selected = Scene().getSelect();
        layernumber = selected[1].layerloaded;    // return the layer nbr of selected mesh in Layout

        totallayers = selected[1].totallayers;

        if(Frame<=totallayers){
            CommandInput("ReplaceObjectLayer "+ (Scene().currenttimeScene().fps) +" " +path); 
            RefreshNow();
            }
        Done = Frame;
    }
}

But, it's a motion script. I'd prefer if it's a Replacement script...
Somebody can explain me how to do a replacement script. There isn't any on the net...
 
Well, I'm going to leave it as a Motion Script because the replacement refresh is still buggy. I thought it had been fixed. .... as if...
 
Back
Top