Forum Replies Created

  • Ramondo Robinson

    March 20, 2019 at 1:06 pm in reply to: sourceRectTime boxes to align horizontally

    code changed… this is tied to a gap slider on original text layer1:

    var layerNum = 1;
    var x_start_pos = 0;
    var y_start_pos = 13.3;

    gapWidth = thisComp.layer(“TeamNickName”).effect(“Gap Width”).slider;
    ​
    textWidth = thisComp.layer(“TeamNickName”).sourceRectAtTime().width + gapWidth;

    textWidth *= layerNum;

    xPos = textWidth;
    yPos = y_start_pos;
    [xPos,yPos];

  • Ramondo Robinson

    March 18, 2019 at 1:33 pm in reply to: sourceRectTime boxes to align horizontally

    layerNum = 1;
    x_start_pos = 0;
    y_start_pos = 50;
    ​
    textLayer = thisComp.layer(“TEXT”);
    width = textLayer.sourceRectAtTime().width+30;
    height = textLayer.sourceRectAtTime().height;
    ​
    xPos = (width * layerNum) + x_start_pos;
    yPos = y_start_pos;
    [xPos, yPos];

  • Ramondo Robinson

    March 18, 2019 at 1:05 pm in reply to: sourceRectTime boxes to align horizontally

    Hmmm where is value[1] defined?

  • That worked!! yeah I have cc 2018….Thanks for the help!

  • Typos*
    So maybe I am not clear enough about the objective. I need to have a text duplicate horizontally…a set amount of times. I also need to update the word from time to time, so I assume this code would go in the source text area….

  • So maybe I am not clear enough about the objective. I have a text duplicate horizontally…a set amount of times. I need the update the word from time to time so I assume this code would go in the source text area….

  • Thanks so much, but it seems phrase.repeat is not being seen as a function…Also it replaces the source text with the number 5…. I assume it is becuase of line 2: num=5; I changed the variable just to check and it updated to that number as well.

  • Ramondo Robinson

    December 1, 2017 at 7:22 pm in reply to: Scaling text to text box expression

    hey Guys,
    This script was a live saver in the past but tried to use this script in a recent project. I noticed that once a stroke is added to the text the point size & leading are not the same. I know this because I duplicated the “Text” layer and did this…the two layers react differently to text being added. I just want to know why does this happen and how could it be fixed? Thanks!

    txt = value;
    margin = effect("margin")("Slider");
    char_count = txt.length;
    lead_ratio = effect("leading ratio")("Slider");
    rect_height = thisComp.layer("Rect").height*thisComp.layer("Rect").scale[1]/100-2*margin;
    rect_width = thisComp.layer("Rect").width*thisComp.layer("Rect").scale[0]/100-2*margin;
    rect_ratio = rect_width/rect_height;
    char_per_line = Math.round(Math.sqrt(char_count*rect_ratio*lead_ratio));
    lines = Math.ceil(char_count/(char_per_line));
    done = 0;
    esc = 0;
    len =0;
    //row = Math.floor(thisComp.layer("Rect").sourceRectAtTime(time).width*thisComp.layer("Rect").scale[0]/1220);//divisor depends on type size
    row = char_per_line;
    while (done == 0){
    esc ++;
    len+=row;
    if (txt.length >= len+1){
    for (i = len; i > len-row; i--) if (txt[i] == " ") break;
    if (i > len-row){
    txt=txt.substr(0,i) + "\r" + txt.substr(i+1,9999);
    }
    }
    len = i;
    if (esc>100){done=1}
    }
    txt

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