Forum Replies Created

Page 17 of 65
  • Andrei Popa

    June 27, 2021 at 6:21 am in reply to: Styles for dynamic SourceText

    You need to assign the text the same way as the tracking. Instead of your two lines, you can use this

    style.setTracking(-100).setText(any_function_like_concat(t1, t2));

  • Andrei Popa

    June 10, 2021 at 8:17 pm in reply to: Count the number of glyphs in a text layer

    I cant remember exactly the name, but I found a forum post which gave some indications towards a light, free software that shows fonts “architecture”. All the glyphs, ligatures and such. I wish I didn’t close that tab 😀

  • Andrei Popa

    June 10, 2021 at 3:48 pm in reply to: Align image scale to multiple Objects

    I think you should calculate the top point of the first element and the bottom point of the last and size your image according to the difference between these two.

  • I assume this expression is written in the x position after you separated dimensions?

    You have tituloverticalpos and titulo.height in the newBoxHeight calculations that does not seem to be declared anywhere.

  • Andrei Popa

    May 31, 2021 at 11:37 am in reply to: Count the number of glyphs in a text layer

    Thanks for the answer Filip.

    Disabling ligatures does not work for Arabic text. I think the only solution is to check the font and get all the “required” ligatures in an array and then subtract the number of occurrences of any of those ligature from the main text.

  • Andrei Popa

    May 29, 2021 at 8:07 am in reply to: Get text changes from CSV/TSV table

    You can’t modify property values like that via expressions. The way expressions work is the property takes the last value from the expression. Try this.

    if (timeToFrames() >= 0){val = '96';}
    if (timeToFrames() >= 75){val = '96';}
    if (timeToFrames() >= 650){val = '95';}
    if (timeToFrames() >= 800){val = '95';}
    val
  • This should do the trick:

    Add an animator based on tracking. Set the tracking you need for those characters. Add an expression selector to this animator and set the “Amount” to this.

    function getIndexes(txt, arr) {
    var indexes = [];
    for (let i = 0; i < arr.length; i++) {
    let idx = txt.indexOf(arr[i]);
    if (idx != -1) {
    for (let j = 1; j <= arr[i].length; j++) {
    indexes.push(idx + j);
    }
    }
    }
    return indexes;
    }
    var cases = ["11", "12", "13", "14"];
    var indexes = getIndexes(text.sourceText, cases);
    indexes.includes(textIndex) ? 100 : 0;

    You need to modify the cases variable to all the combinations you need.

  • Andrei Popa

    May 24, 2021 at 9:12 am in reply to: Expression from animator behaving awkwardly

    The problem seems to be with the eval argument. If I manually write the text instead of the link, it works. If I try to force the link to a string, using var arr = eval(thisComp.layer(2).text.sourceText.valueAtTime(0).toString()); it still does not work.


    LE:

    I used this for the selector to be able to run a few tests:

    var str = thisComp.layer(2).text.sourceText.valueAtTime(0);
    var arr = eval(str);
    typeof(str) == "string" ? 100 : 0;

    I tested the length and typeof() from the str in the first line. They both match to the correct length and

    “string”.


    Finally, I have tested this and the string is correct. I really don’t know what goes wrong…

    var str = thisComp.layer(2).text.sourceText.valueAtTime(0);
    str === "[12,11,10,9,8]" ? 100 : 0;
  • Andrei Popa

    May 24, 2021 at 7:10 am in reply to: Adding Time offset to Marker expression

    I guess what you are looking for is changing t = m.key(n).time; to t = m.key(n).time-0.5;.

  • I think that you need to link the same event that makes the z layer grow in size. Let’s name these times t1,t2 and t3(I don’t know how you got these for the Z size, but use the same for ABC). Then, on A, B or C opacity write this:

    dur = 0.5
    (time >=t1 && time <= t1+dur) ? 100 : 0;
Page 17 of 65

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