Forum Replies Created

Page 1 of 2
  • <div>
    </div>

    Thank you Dan!

  • I do like the quiet confidence in your posts. I know when I’ve found a post with your name it will work!

    Thank you Dan, spot on.

    Is there a line I can add to turn the slider into seconds, so on the slider; 1 = second, 60 represents a minute etc..

  • I actually freaking did it, it’s a Christmas miracle..

    p = thisComp.layer(index-1).transform.opacity; 
    d = thisComp.layer(index-3).transform.opacity;
    if (p==0 && d==100){
    z=thisComp.layer(index-1).transform.position[1];
    [value[0], z];
    }
    else if (p==0 && d==0){
    z=thisComp.layer(index-3).transform.position[1];
    [value[0], z];
    }
    else {
    value;
    }

  • Thank you.

    I’ve been working for hours to try and simplify the setup, I’m hoping this is an easier/more stable solution….

    The user is now presented with a dropdown menu with an option of list consisting of 1, 2, or 3 text layers. The layer below those text layers needs to move up or down on the Y axis depending on how many text layers the user has selected so there are no line spaces when a text layer is turned off.


    I tried this, but kept getting the error unexpected token ‘else’.

    I want it to basically work as…

    • is index-1 100 opacity? if yes, stay in your position, if no, move to index-1 position

    • then is index-3 100 opacity? if yes, stay in index-1 position, if no, move to index-3 position

    End.

    (It’s index-3 as there is another text layer in-between which I need it to ignore).

    p = thisComp.layer(index-1).transform.opacity;

    d = thisComp.layer(index-3).transform.opacity;

    if (p ==0) z = thisComp.layer(index-1).position[1];

    [value[0], z];

    else if (d == 0) f = thisComp.layer(index-3).position[1];

    [value[0], f];

    else {

    value;

    }

    Thank you – I’m hoping I was close….

  • Thank you for the reply Filip. I appreciate your time.

    For the life of me I can’t get this to work.

    I currently have a “Null 1” with 9 checkboxes to activate/deactivate each layer.

    As a test, I pasted the opacity expression (in the text layer opacity), but get the error “couldn’t turn result into a numeric value”.

    I also pasted the position expression (in the text layer position) and it piles each text layer on top of each other at the top of the list.

    I’m obviously doing everything wrong, can you please let me know how to correctly apply these expressions?

    Thanks again,

  • Thank you Kevin,

    I was just typing up a reply with a solution – I reached out to Tim at Motion Developer (link above) and he came back with this code which nails it. Hopefully someone will find this amazing too!

    const sourceRect = thisLayer.sourceRectAtTime(0, false);

    let { width, height, top, left } = sourceRect;

    const { fontSize, leading, autoLeading } = thisLayer.text.sourceText.style;

    const lineGap = autoLeading ? fontSize * 1.2 : leading;

    const textSize = fontSize / 2;

    const numLines = Math.max(

    text.sourceText.value.split(/[^\r\n\3]*/gm).length - 1,

    0

    );

    height = lineGap * (numLines - 1) + textSize;

    topLeft = [left, -textSize];

    thisLayer.add(topLeft, [width / 2, height]);

  • Henry Gaunt

    May 24, 2021 at 11:47 am in reply to: ‘Align to’ destroying my project

    Thank you – didn’t know these existed.

  • Henry Gaunt

    May 24, 2021 at 11:46 am in reply to: ‘Align to’ destroying my project

    I’ve only got one, but it is on animated text layer. I’ve already started rebuilding! Thanks.

  • Henry Gaunt

    January 17, 2017 at 6:41 am in reply to: Automatically Centre Dynamic Precomp with an Expression

    I should note, the fundamental action I need to do is to…

    Is there an expression version of the Align Panel’s Horizontal Centre Alignment which will execute once the layer has been created?

  • Henry Gaunt

    August 28, 2013 at 2:47 am in reply to: Motion blur colour outline

    Thank you Walter. That’s exactly what I was after.

Page 1 of 2

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