Copy link to clipboard
Copied
I'm a novice at expressions, but using them to build a mogrt template and trying to get over this last hurdle.
I have a text layer that has the character size and tracking linked to a slider "Control" in my main compositoin.
tracking = thisComp.layer("Control").effect("Tracking")("Slider");
fontSize = thisComp.layer("Control").effect("Font Size")("Slider");
newStyle = style.setTracking(tracking);
newStyle.setFontSize(fontSize);
I have this text layer duplicated (for different layer styles) and I want to match the source text and tracking/ character size in the duplicates.
Usually I would just pick whip for source text, but when I do that, my character size and tracking expression doesn't work.
I've been stumbling aroudn trying to figure out how to combine the two... Any help would be greatly appreciated.
Copy link to clipboard
Copied
I'm trying to pull source text from "Text 2"
If I have "sourceText = thisComp.layer("Text 2").text.sourceText" above
tracking = thisComp.layer("Control").effect("Tracking")("Slider");
fontSize = thisComp.layer("Control").effect("Font Size")("Slider");
newStyle = style.setTracking(tracking);
newStyle.setFontSize(fontSize);
It will read tracking and character size, but not update source text.
If it's pasted below... It will update source text, but not character size and tracking
Copy link to clipboard
Copied
Can you post a screenshot of your setup, of which expressions go on which text layers?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks for the feedback. I usually post my solutions, but this slipped under the radar.
Here was what I came up with...
txt = thisComp.layer("Title").text.sourceText;
tracking = thisComp.layer("Control").effect("Tracking")("Slider");
fontSize = thisComp.layer("Control").effect("Font Size")("Slider");
createStyle().setFontSize(fontSize).setTracking(tracking).setText(txt)