Brian Nishii
Forum Replies Created
-
Brian Nishii
April 2, 2019 at 4:18 am in reply to: Building Expressions Workflow: multiple layers referencing single code?Well, I’ll be darned!!
eval() seems to work, if you reference a text layer’s actual text field, and not the Source Text, per this post answer by Dan the Great here. Kinda wonky you have to deal with formatting to actually see the code, but I guess you can cut and paste from a text document as you work.
Of course, as Vera pointed out, copying just the expression of the parameter and pasting works easily enough without having to trash and re-duplicate all 100 layers.
Thank you all!
-
Brian Nishii
July 18, 2014 at 9:53 pm in reply to: $evalfile, Stylizing external text on the same line.Thank you Dan for your response.
I tried using your script posted elsewhere to retrieve text layer coordinates by the sampleImage method, but kept on getting time-out errors so I gave up.
In the end, I figured out a not so precise but perfectly acceptable solution: because the text layer styling is constant, I pulled the character index of the first text layer, multiplied it by an appropriate number of pixels, to get an X position offset for the second layer.
In case any non-smart amateur out there like me is curious, here’s what I did for dynamically spacing variables for my Lower Thirds off of a text file, and my workflow:
1) Create a text file, with a line for each LowerThird:
var L3_1 = [“Variable0text”, “Variable1text”, “Variable2text”,”Variable3text”];
2) In AE, design Lower Third comp. In my case, I wanted two “text lines” with 2 variables each being pulled in to look like:
Variable0 Variable1
Variable2 Variable33) For the position value of Variable1:
pos=thisComp.layer("Variable0TextLayer").transform.position;
st=thisComp.layer("Variable0TextLayer").text.sourceText;
ix=st.length;
X=pos[0]+(ix*22);
Y=pos[1];
Z=pos[2];
[X,Y,Z]So in my case, 22 pixels was the right amount of offset per character of Variable 0 to give an offset for Variable1.
4) For the Source text field of each Variable:
myPath = "/Volumes/myPath/L3source.txt" ;
$.evalFile(myPath);
try{
eval(thisComp.name) [1];
}catch (err){
"Missing";
}
5) Once design is set, Duplicate L3_1 the number of times you have LowerThirds, and move renders into a designated folder. Any time you need to make design changes, change L3_1, duplicate, batch render, replace into said folder, and NLE relinks…..
Awesome workflow for a wishy washy client. GOLDEN!!
If it weren’t for geniuses like Dan Ebberts, what would us dumb folk do?
-
Thanks for the response. FINALLY figured it out.
You’r right – simplify what you’re doing to confirm paths are working, and then check, re-check, and re-re-check code….
For anyone working on a Mac, it really behooves you to write the .txt file in a code-friendly text program like TextWrangler. (in a large font …he he)
Thanks!
-
@Andrew Riebe,
Did you ever figure this problem out working on Adobe CC and Mavericks with regards to $.evalFile(myPath) ?
I’m in the same predicament right now and pulling out what little hair I have left….
Everything I do returns either a file does not exist or syntax error.Playing with path names fixes “file does not exist” but then I get a syntax error on line 1 – with or without the “var”:
var myPath = “~/Desktop/source.txt”;
$.evalFile (myPath);
try {
eval (thisComp.name) [0];
}catch (err){
“Missing”;
}If you found a fix, please share.
Thanks!
-
Brian Nishii
April 3, 2013 at 10:19 pm in reply to: Ray Trace Mode, Render shadows onto Particular particles – workaround?Perfect!
I had to ctrl-click the parameter to get it to move into “only” on Accepts Shadows.Thank you so much!
Brian
-
Brian Nishii
October 22, 2010 at 1:15 am in reply to: 30P footage – converting field dominance in FCP timeline?Thanks Jeremy!
Took a while to see what you meant, but now the task at hand at went from unbearable to tolerable.
Wish I had the knowledge to write myself a script or something….
Thanks again!