Highlighted

Linking Source Text and Tracking and Character size via expressions

New Here ,
Apr 01, 2020

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. 

 

Topics

Expressions

Views

305

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Linking Source Text and Tracking and Character size via expressions

New Here ,
Apr 01, 2020

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. 

 

Topics

Expressions

Views

306

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 01, 2020 0
New Here ,
Apr 01, 2020

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

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 01, 2020 0
Adobe Community Professional ,
Apr 01, 2020

Copy link to clipboard

Copied

Can you post a screenshot of your setup, of which expressions go on which text layers?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 01, 2020 0
New Here ,
May 13, 2020

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 13, 2020 0
New Here ,
May 13, 2020

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)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 13, 2020 0