Activity › Forums › Adobe After Effects Expressions › Linking various text attributes to “master” text layer…???
-
Linking various text attributes to “master” text layer…???
Ron Anderson replied 12 years, 3 months ago 4 Members · 17 Replies
-
Doug Nash
April 16, 2013 at 11:22 pmThanks so much for the help, Dan. But yes, you’re right about the text formatting. And to be honest, that is actually the main problem. In the (far too rare) times where I just have a plain line of text, using the expression pick-whip from the “text” channel to the children layers works perfectly. It’s when I do something even as simple as kerning one letter space, that the plan goes out the window.
What I don’t get, is why there isn’t a way to access the additional formatting, like letter and line spacing, from the basic expression set for text.
-
Dan Ebberts
April 16, 2013 at 11:53 pmJust in case you wanted to tackle it, here’s a snippet that creates 3 clones from the master, stacks the clones under the master, adds a Fast Blur of 50 to clone 1, and makes clone 3 an adjustment layer:
var master = app.project.activeItem.layer(“master”);
var clone3 = master.duplicate();
clone3.name = “clone 3”;
clone3.moveAfter(master);var clone2 = master.duplicate();
clone2.name = “clone 2”;
clone2.moveAfter(master);var clone1 = master.duplicate();
clone1.name = “clone 1”;
clone1.moveAfter(master);clone1.property(“Effects”).addProperty(“Fast Blur”);
clone1.property(“Effects”).property(“Fast Blur”).property(“Blurriness”).setValue(50);clone3.adjustmentLayer = true;
Dan
-
Kevin Camp
April 17, 2013 at 12:03 amif you do a straight copy/paste of the source text of one layer into another layer’s source text, it will also contain the kerning, tracking, line spacing, size and even font style.
double-click a text layer and choose edit>copy, then double click another text layer and paste. it should have the same font, size, kerning etc…
it will also copy the face and stroke color (from the character palette) and possibly the paragraph styles, so if you were using any of those to format the child layers, then you’d need to set that another way (like fill effect or layer styles).
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Doug Nash
April 17, 2013 at 2:13 amThanks, Dan!
I copied and pasted your script into the Script Editor inside AE. I’m not entirely sure (to put it lightly) what I do from there. I saved out the .jsx file, but when I tried to open it to run, it re-opened the script editor program, and tried to debug.I clearly am not doing things correctly.
-
Dan Ebberts
April 17, 2013 at 3:38 amIf the debugger launches, it should highlight the line that’s causing the problem (and there should be a little error message in the lower left corner). The only thing I can think of would be that either you didn’t have your comp selected, or it doesn’t have a layer named “master”. Hard to say for sure.
Dan
-
Doug Nash
April 17, 2013 at 1:41 pmYes, thanks. This is a fantastic starting point for me to kick myself in the rear and learn more about how these scripts work. Again, I appreciate you going far and beyond to help!
-
Ron Anderson
February 5, 2014 at 12:15 amI realize this is an old thread, but I think the problem sounds like it might be better solved with careful pre-comping than scripts… Have a master comp containing just the typeset text, and reuse it throughout whatever setup you have. There is an AE Script called “Real Comp Duplicator” that does a great job of making duplicate hierarchies for versioning.
Reply to this Discussion! Login or Sign Up