Forum Replies Created

  • Jovan Mikonjic

    December 23, 2014 at 5:09 pm in reply to: Conditionally offsetting a value

    Dear Dan,

    thanks for the tip,
    I will report if it does the trick.

    Maybe you can also help me with understanding how to approach this problem:

    I have set up an expression that will forward the position of a layer
    from one side of the comp to the other, if the layer position value is smaller or greater than the comp width.

    But the problem comes when it travels like this multiple times
    The expression is not self aware,
    it is returning a new value to the layer position.
    And this new value is not affected by the expression again and again.

    In this case:

    when the expression does its thing – the layer position goes from 0 to 3072, that is the right end of the comp

    If the layer would then go again to the left end of the comp, so the new value is -3072 (value in yellow)
    and the value affected by the expression is 0 (value in red)

    The expression will not work on the red value.

    How could I overcome this limit of the expression?

    My best idea is to have the if clause for every instance
    0, -3072, -6144.. and so on?

    Is it possible to have it address the ‘red value’ in some way?

    Thank you!!

    X=position[0];
    Y=position[1];
    if (X <= 0)
    {
    [X+thisComp.width,Y];
    }
    else if (X >= 3072)
    {
    [X-thisComp.width,Y];}
    else
    [X,Y]

  • Jovan Mikonjic

    December 22, 2014 at 9:56 pm in reply to: Conditionally offsetting a value

    I got this working, but it will only move the layer to the opposite side once,
    while input for the movement comes from a rotation value of another layer that will turn multiple circles… maybe theres a solution here..

    I am actually animating an panoramic projection, this is why I am trying to have left and right sides of the comp ‘meet’.

    X=position[0];
    Y=position[1];
    if (X < thisComp.width-thisComp.width)
    {
    [X+thisComp.width,Y];
    }
    else if (X >thisComp.width)
    {
    [X-thisComp.width,Y];}
    else
    [X,Y]

  • Jovan Mikonjic

    December 22, 2014 at 8:48 pm in reply to: Conditionally offsetting a value

    Thanks Kevin,

    But this situation is more complex because value will vary depending on an external controller.

  • I had this issue in CSS. The new shape layer hasn’t disappeared it was displaced. If you zoom out all the way in the preview window you will probably see it in the up right corner some 15000 pixels away from the comp center.
    For some reason the new shape layer gets a new anchor point from the .ai file.
    You can bring it back to the comp center and reposition the anchor manualy or using reposition anchor point script (if you have many layers to convert 🙂

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