Results 1 to 4 of 4

Thread: Replace with layer by time

  1. #1

    Replace with layer by time

    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...

  2. #2
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,211
    At least you can get the description of the data members here:
    http://www.mikegreen.name/Lscript/Lscript%20Index.html

    Also the lsript object replace template in lseditor.

    Denis.

  3. #3
    Quote Originally Posted by dpont View Post
    At least you can get the description of the data members here:
    http://www.mikegreen.name/Lscript/Lscript%20Index.html

    Also the lsript object replace template in lseditor.

    Denis.
    lseditor! i always forget it... Thanks!

  4. #4
    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...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •