Forum Replies Created

Page 1062 of 1081
  • Dan Ebberts

    August 30, 2005 at 10:06 pm in reply to: What expression would I research to do this?

    Yup, split is what you want. Assuming your words are separated by carriage returns, you could use something like this to pick out the word “cat” from your example:

    s = thisComp.layer(“layer 2”).text.sourceText.split(String.fromCharCode(13));
    s[1]

    Dan

  • Dan Ebberts

    August 30, 2005 at 8:14 pm in reply to: Z pass using expressions

    Like this:

    p = thisComp.layer(“object B”).position;
    [value[0],value[1],p[2]]

    Dan

  • Dan Ebberts

    August 30, 2005 at 8:14 pm in reply to: Z pass using expressions

    Like this:

    p = thisComp.layer(“object B”).position;
    [value[0],value[1],p[2]]

    Dan

  • Dan Ebberts

    August 30, 2005 at 7:42 pm in reply to: Z pass using expressions

    Try this:

    start = 0;
    vanish = 1000;
    linear(position[2],start,vanish,100,0)

    Adjust start and vanish to suit.

    Dan

  • Dan Ebberts

    August 30, 2005 at 7:42 pm in reply to: Z pass using expressions

    Try this:

    start = 0;
    vanish = 1000;
    linear(position[2],start,vanish,100,0)

    Adjust start and vanish to suit.

    Dan

  • Dan Ebberts

    August 29, 2005 at 3:18 pm in reply to: Lower layers appearing over top layer

    Are the layers 3D?

    Dan

  • Dan Ebberts

    August 29, 2005 at 3:16 pm in reply to: Help – LookAt not working with parented camera

    This should work:

    C = thisComp.layer(“Camera 1”);
    lookAt(C.toWorld([0,0,0]),position)

    But did you try just turning on Auto Orient > Orient Towards Camera?

    Dan

  • Dan Ebberts

    August 29, 2005 at 3:16 pm in reply to: Help – LookAt not working with parented camera

    This should work:

    C = thisComp.layer(“Camera 1”);
    lookAt(C.toWorld([0,0,0]),position)

    But did you try just turning on Auto Orient > Orient Towards Camera?

    Dan

  • Dan Ebberts

    August 29, 2005 at 12:37 am in reply to: quick script help

    I’m not sure what you’re after exactly, but here’s a clock expression (for a text layer’s source text) that might help:

    
    beginTime = 0; // beginning time (seconds)
    mult = 1; // clock speed multiplier
    
    function digits(myVal,myNumDigits){
      var s = myVal.toString();
      while (s.length < myNumDigits) s = '0' + s;
      return s;
    }
    
    currTime = beginTime + time*mult;
    
    hr = digits(Math.floor(currTime/3600),2);
    min = digits(Math.floor((currTime%3600)/60),2);
    sec = digits(Math.floor(currTime)%60,2);
    ms = digits(Math.floor(currTime%1*1000),3);
    hr + ":" + min + ":" + sec + "." + ms
    
    

    If you want it to start at a time other than 0, set beginTime.
    If you want it to count faster or slower than comp time, modify mult.
    (mult = -1 will count down).

    Dan

  • Dan Ebberts

    August 29, 2005 at 12:37 am in reply to: quick script help

    I’m not sure what you’re after exactly, but here’s a clock expression (for a text layer’s source text) that might help:

    
    beginTime = 0; // beginning time (seconds)
    mult = 1; // clock speed multiplier
    
    function digits(myVal,myNumDigits){
      var s = myVal.toString();
      while (s.length < myNumDigits) s = '0' + s;
      return s;
    }
    
    currTime = beginTime + time*mult;
    
    hr = digits(Math.floor(currTime/3600),2);
    min = digits(Math.floor((currTime%3600)/60),2);
    sec = digits(Math.floor(currTime)%60,2);
    ms = digits(Math.floor(currTime%1*1000),3);
    hr + ":" + min + ":" + sec + "." + ms
    
    

    If you want it to start at a time other than 0, set beginTime.
    If you want it to count faster or slower than comp time, modify mult.
    (mult = -1 will count down).

    Dan

Page 1062 of 1081

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy