Forum Replies Created

  • Ken Kwong

    June 15, 2020 at 10:36 pm in reply to: Text expression selector

    This is totally gorgeous.
    Thank you for the quick help Dan!

  • Ken Kwong

    October 6, 2019 at 9:53 am in reply to: Adjusting line space based on the text layer scale

    Hi Tomas,

    Thank you for the kind help!
    Will definitely try the auto-adjust solution you suggests!

    To illustrate my question better, please see the attached images:
    I have applied the following expression on the Scale of the following text layer

    s=thisLayer;
    scl=500;
    x=s.sourceRectAtTime(time,false).width;
    if (x>scl)
    {[scl/x*value[0],scl/x*value[1]]}
    else
    {value}

    When I type more content to the text layer and exceeds the maximum width I set, it will scale down the whole layer.
    And if there are more than one line of content in a single text layer, it results like this:

    What I hope to achieve is that when the scale expression scales down the whole text layer contains multiple lines,
    the line space can increase itself base on the scaling rate, in order to make the text layer visually remain the same height as before the scale expression:

    which I developed the following expression:
    TextHeight=sourceRectAtTime(time,false).height;
    BeforeHeight=TextHeight;
    AfterHeight=TextHeight*scale[1]/100;
    LineSpace=(BeforeHeight-AfterHeight)/4*100/scale[1];
    [value[0],LineSpace]

    but it leads to the “bug” you mentioned. And I believe the reason is this expression created a dependent loop and messed up the result.

    So I am wondering if theres other expression that can do the same purpose (increase line space in order to keep the text layer height visually the same after the scale expression) without creating this “bug”?

    Greatly appreciate your help!

    Attached with my AE file
    https://dl.dropboxusercontent.com/s/k8fbfsnxmgfuyrp/LineSpaceReactToScaling_Sample.aep

  • Ken Kwong

    June 28, 2019 at 2:18 am in reply to: Problem when using SourceRectAtTime expression

    Simple, direct, and it works perfectly!
    Thanks a lot and this makes me think all the tutorials teach people to use inPoint for SourceRectatTime should correct it…

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