Ramondo Robinson
Forum Replies Created
-
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]; -
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]; -
Hmmm where is value[1] defined?
-
Ramondo Robinson
March 15, 2019 at 2:57 pm in reply to: Duplicating a source text horizontally a (number) of timesThat worked!! yeah I have cc 2018….Thanks for the help!
-
Ramondo Robinson
March 15, 2019 at 2:06 pm in reply to: Duplicating a source text horizontally a (number) of timesTypos*
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…. -
Ramondo Robinson
March 15, 2019 at 2:03 pm in reply to: Duplicating a source text horizontally a (number) of timesSo 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….
-
Ramondo Robinson
March 15, 2019 at 1:58 pm in reply to: Duplicating a source text horizontally a (number) of timesThanks 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.
-
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