Forum Replies Created

Page 3 of 10
  • Steve Sierra

    May 26, 2017 at 12:03 pm in reply to: position Y loop issue

    Hi,

    I think this works (t is the Y animation duration in seconds):

    X=position[0];
    Y=position[1];
    a = thisComp.height;
    t = 4;

    [X,linear(t, -a/2, (1.5*a*time/t)-((a/(2*t))*(t-time)))];

    if(time>=t){
    [X, -a/2]
    };

    Here’s what I think is going on :
    I first wanted to put a linear interpolation and then check the time to send it back to it’s original position.
    Since the final value is in an if statement, it recalculates the value every frame, so a simple linear doesn’t work.
    I then noticed that it was tacking the last value of the linear interpolation in account.
    So I modified that final destination value to “fit” the animation…

    Hope this helps !
    😉

  • Steve Sierra

    May 25, 2017 at 8:19 am in reply to: Expression checkbox to turn EXPRESSION on/off?

    Hi,

    You can transition from shape to shape directly in one shape path.
    You create a path for every shape in your animation, create a key, and copy/past it to your main shape path at the right time. This way, your main shape path is keyframed and your blue layer will follow.

    If the interpolations between the shapes don’t please you, you can copy/past all your main shape path keys to a mask path, use the mask interpolation tool (Window/Mask Interpolation), then copy/paste the newly generated keys back to the main shape path.

    I would also directly reference the main shape layer by name in your blue position expression… That way, you can add layers without having problems :

    delay = 1
    d = delay*thisComp.frameDuration*(index – 1);
    thisComp.layer(“Line”).position.valueAtTime(time – d)

    I hope this helps !
    Good luck 😉

  • Hi,

    I think you should check this out :

    https://www.motionscript.com/design-guide/marker-sync.html

    😉

  • Steve Sierra

    May 16, 2017 at 1:41 pm in reply to: If/Else Conditional with an Array

    Hi,

    I haven’t tested it, but I think this should work too:

    StatsCats = thisComp.layer(“Number of Stats Categories”).text.sourceText;
    NumCol = thisComp.layer(“Number of Columns”).text.sourceText;

    if(StatCats == 1 || StatCats == 3){
    c = 855;
    }else{
    c= 860;
    };

    [1950 – (NumCol * 250), c – (StatsCats * 60)];

    Dan’s solution is way more flexible, though !
    Cheers !;)

  • Steve Sierra

    May 15, 2017 at 10:53 am in reply to: Out of range error with layer index

    Hi again,

    Try putting your clamp in your n variable…

    n = clamp(thisComp.layer(“CONTROLS”).effect(“Focus on layer”)(“Slider”), 5, thisComp.numLayers);
    Z = thisComp.layer(n).transform.position[2];

    Z-(thisComp.layer(“Cam control”).transform.position[2])

    Cheers !

  • Steve Sierra

    May 15, 2017 at 9:20 am in reply to: Out of range error with layer index

    Hi,

    You can’t have n = 0, since it is used as the layer index in Z (indexes start at 1).
    What happens when your (“Focus on Layer”) slider hits 0 ?

    I think you should do an if/else statement to set a default value to your focal distance when the slider is at 0.

    Hope this helps ????

    Cheers !

  • Steve Sierra

    May 11, 2017 at 10:25 am in reply to: Expression Layer Control On/Off Switch

    Hi everyone,

    I am reviving this thread because I am having the same problem with my script…

    I think what is going on is that every time a value linked to one of the checkboxes is changed, all the checkboxes momentarely use their pre expression value (which is the last state it was in) and therefore ultimately go back to a “default state”.
    (I think this is going on because when I change the value of a slider linked to one of the checkboxes with the mouse and don’t let go of the left click, I can see the other checkboxes last states. When I let go of the left mouse button, the checkboxes have changed.)

    Is it possible to prevent this ?

    Thanks 😉

  • Steve Sierra

    May 10, 2017 at 5:03 pm in reply to: Display the name of the next visible layer below

    Very nice !!
    I didn’t know about the “continue”…
    I see it stops the text layer from seeing the disabled layers.
    Could you please explain how it works ?

    Many thanks 😉

  • Steve Sierra

    May 10, 2017 at 3:17 pm in reply to: Display the name of the next visible layer below

    That’s exactly it !

    The “break” stops the for loop if a layer is found underneath the text layer.

    The second expression also :
    – checks if the outPoint is after time, so it stops displaying the name once the layer is cut.
    – the else part makes the text layer display nothing (“”) if there is no layer underneath.

    Cheers !
    😉

  • Steve Sierra

    May 10, 2017 at 2:29 pm in reply to: Display the name of the next visible layer below

    This is even better :

    a = thisLayer.index;
    b = thisComp.numLayers;
    for(i = a+1; i <= b; i++){
    curLay = thisComp.layer(i);
    if(curLay.inPoint < time && curLay.outPoint > time){
    curLay.name;
    break;
    }else{
    “”
    }
    }

    😉

Page 3 of 10

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