Forum Replies Created

Page 1 of 2
  • Yes, it works! Thank you so much for that help! It´s just mean that the expressions works seperately..I need to code for work and it´s so long ago that I did this. The brain is a sieve…or more precise,

    my brain 🤣

    Yours, Matthias

  • OMG- that is exactly what I need! And without any coding! I´ve never heard about paragraph text, so I learned
    a lot from all you!

    I send all of you a very warm thank you!

    Yours, Matthias

  • To answer your questions:

    1. I have discarded the idea of limiting the second line to the first, it makes no sense any longer. Now with the centered lines
    it looks pretty well, even if the second line is longer than the first one.

    2. Yes, I have restrictments-no scaling is allowed.

    What remains is that I need to stop the user(mogrt-template for premiere cc) from breaking the rules of the title safe area.

  • I know that a look up table is too much work…And some hours ago I tried a loop and I didn´t succeed.

    But the idea of generating a mask is worth to test- but I guess it won´t work too, because you alway get pixel lengths with a comma via sourceRectAtTime, that means it´s possible that maybe a letter is partly visible after setting the mask to a specific value(in this case 1500).

  • The goal is a lower third with two lines(centered text), the first upper line and a second, smaller, lower line. The first lines´ length defines the maximum length of the second line.

    But in the end both have a limit-the title safe area(1920 pixels horizontally minus 400 pixels approximately..)

    But the length of the strings depends on what is written down, capital letters have more pixels than others letters.
    In some cases, the pixel-limit is reached with 40 letters, in other cases I have 50 letters-that is the main problem.

  • That helps a lot, but it´s not the solution. There is another fact I didn´t mentioned yet.

    I´m planning to let a centered text(the first line of text) grow until it reaches a specific pixel-amount(it´s needed to stay in the title safe area). So when the string is more than 1500 pixels in length, the input needs to be stopped.
    So I try to find a way to make a condition like that:
    if “thisComp.layer(“First line”).sourceRectAtTime().width>1500″
    …then “text.sourceText.substr(0,”remain at the actual text.sourceText.length”)

    I hope you understand what I try to reach. I can´t see a way to bring these two parameters together.

  • Sam, thank you so much for this Idea of changing the width of the text, I just tried it and it works fine. I´ll try this with further adjustments!
    For the moment I have found a solution that deals with some imperfections, but it works as I want it. I read out the length of the text and scale it down in two steps while reposition it approximately.
    For the Position I wrote this expression:

    textweite = thisComp.layer(“Filmausschnitt: “).sourceRectAtTime().width;
    x = thisComp.width-textweite;
    y = position[1];
    if ((transform.scale[0]<100) && (transform.scale[0]>69)) {[2000-textweite,y]} ;
    if (thisComp.layer(“Filmausschnitt: “).sourceRectAtTime().width>700) {[2080-textweite,y]} ;
    if (thisComp.layer(“Filmausschnitt: “).sourceRectAtTime().width>800) {[2100-textweite,y]} ;
    [x,y];

    For the Scale I wrote the following:

    if ((thisComp.layer(“Filmausschnitt: “).sourceRectAtTime().width>540) && (thisComp.layer(“Filmausschnitt: “).sourceRectAtTime().width<800)) {[80,80]} ;
    else if (thisComp.layer(“Filmausschnitt: “).sourceRectAtTime().width>800) {[65,65]};
    else value;

    Your code works fine for the scaling, but the issue with the fixed position still remains…

    Yours, Matthias

  • Now I found the correct syntax to nail the text to the middle of the screen(it is 1343 pixels):

    textweite = thisComp.layer(“Filmausschnitt: “).sourceRectAtTime().width;
    x = thisComp.width-textweite;
    y = position[1];
    if (x<1343) {x=1343} else value;
    [x,y];

    So now: When the middle-position is reached, the written text runs out of screen at the right. At this point I need an idea how to scale down this text more and more with every extra-letter so that it doesn´t leave the screen.


    textweite = thisComp.layer("Filmausschnitt: ").sourceRectAtTime().width;
    x = thisComp.width-textweite;
    y = position[1];
    if (x&lt;1343) {x=1343} else value;
    [x,y];

  • Matthias Schwarz

    November 8, 2017 at 11:57 pm in reply to: Change layer visibility via Essential Graphics

    That´s a good way to safe time! So that´s enough knowledge for the moment. I thank you so much for all the time you spent on helping me! All thumbs up!

    Yours, Matthias

  • Matthias Schwarz

    November 8, 2017 at 1:38 pm in reply to: Change layer visibility via Essential Graphics

    Wow, that works fine!

    I´ll start to learn now all the different commands, it´s very exciting. But one last question about this particular case.
    When I put all the pictures in a pre-comp, for the sake of usability(e.g. put more/other pictures inside)-is there a way(I guess so) to let the code

    if (thisComp.layer(“Controller”).effect(“Slider”)(“Schieberegler”) == thisLayer.index) 100 else 0;

    work “global” in the precomp without the need to copy this expression to all the opacity-properties in the pre-comp?
    It should work if there is a way to give it a name, I guess, e.g. “pre-comp.layer” instead of “thisComp.layer”. Does this work? I´ve learned Basic and TurboPascal 20 years ago but there are only a few similarities between JavaScript and these “old school” languages. So I try to understand, but every hint like yours here are so precious for me…

    Yours, Matthias

Page 1 of 2

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