• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Controlling not only source text, but also font properties in essential graphics centrally

Community Beginner ,
Aug 29, 2020 Aug 29, 2020

Copy link to clipboard

Copied

Hello,

I want to use one composition sourcing Essential Graphics where I gather all properties from colours to text allocated in different other compositions. This works with colours and with sourcing text, but not with with text properties.

So, e.g. I have a Text 1 composition, where I have an expression: comp("Control").layer("New Name").text.sourceText .

In the Control composition, there is the layer New Name, which Source Test, I have dragged into the Essential Graphics menu. There I can change the text, but when I add the features of 'Edit Properties' and change the Font for example, this can only be seen in the Control composition, but it doesn't go through to the Text 1 composition.

How can I change the expression in the Text 1 composition to get also the text properties changes from the Essential Graphics menu?

Many thanks.

TOPICS
Expressions , How to

Views

248

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
community guidelines
Community Expert ,
Aug 29, 2020 Aug 29, 2020

Copy link to clipboard

Copied

I'm having trouble understanding a few of the details in your question, but a good number of the text properties can also be adjusted by using text animators, which have controls that can be fed into the Essential Graphics Panel. Fill color, for example, can easily work like this. 

There are also new-ish text property expressions that can provide other ways of accessing a lot of these options. 

Votes

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
community guidelines
Community Beginner ,
Aug 30, 2020 Aug 30, 2020

Copy link to clipboard

Copied

Many thanks to all who responded  and sorry if it wasn't not clear:

Here's an example: This is what I have in essential graphics for the 'Control' composition, which is

franklond909_0-1598779047284.png

In the control composition window, this looks like as expected:

franklond909_1-1598779489376.png

But,this text is supposed to be used in the composition 'New Exp', where the text is linked via the following

expression to the Example layer in the Control composition:

 

franklond909_2-1598779857087.png

 

The outpout in the 'New Exp' window shows the font Arial, because this is entered in the Character menu.

franklond909_3-1598780612502.png

I would like that the 'Playbill' font entered in the Essential Graphics feeds through to the #New Exp' composition in the same way as the source text changes accordingly. 

The expression currently only addresses the 'sourceText' but I don't know what other expressions can be used either to pull text plus text properties or added to the current one to get the test properties into the 'NewExp' composition.

Votes

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
community guidelines
Community Expert ,
Aug 29, 2020 Aug 29, 2020

Copy link to clipboard

Copied

If you want to change fonts you'll need AE 2020. You'll need to add an Effect/Expression Controls/Drop Down Menu to the control text layer, then you'll need a bunch of If statements like this:

 

 

if (effect("Dropdown Menu Control")("Menu") == 1) 
	style.setFont("Helvetica");
else if (effect("Dropdown Menu Control")("Menu") == 2)
	style.setFont("Luminari");
else if (effect("Dropdown Menu Control")("Menu") == 3)
	style.setFont("Playbill");

 

 

You can get as fancy with the font setup as you can get with the text expressions options. You'll find all of the acceptable items you can describe with the "style" method listed in the Expressions Language/Text menu in the timeline. You'll get a warning that the text layer is controlled by an expression, but you can ignore that.

Screenshot_2020-08-29 19.25.20_g2LejG.png

Votes

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
community guidelines
Community Expert ,
Aug 30, 2020 Aug 30, 2020

Copy link to clipboard

Copied

I've said this way too often. Cropped screenshots are almost useless in diagnosing problems. When you are working with nested comps, flowcharts are also very helpful. To tell you the truth, your workflow doesn't make much sense to me.

 

If you want to control the text and font in a nested comp the efficient workflow is to nest the text layer in a pre-comp. Using an expression to populate a text layer in another comp defeats the purpose of the essential graphics panel. The way you are explaining your project you have two comps and two text layers but only one of the text layers are visible. I'm not sure why that is necessary.

 

If you want to copy everything including style you need a little more complicated expression:

parentText = comp("Control").layer("Parent").text.sourceText;
parentStyle = comp("Control").layer("Parent").text.sourceText.style;
parentStyle.setText( parentText )

That gives you two text layers that are identical in every way except scale and position. If I want to be able to edit the text and the fonts on one visible text layer I would just use one text layer. If I wanted to copy just the style I would point to the text layer and add .style; 

 

Here's a reference from the Adobe Blog that explains it.

 

 

Votes

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
community guidelines
Community Beginner ,
Aug 30, 2020 Aug 30, 2020

Copy link to clipboard

Copied

Hi Rick,

Many thanks. This is exactly the code I needed. So, my problem solved.

Just to explain, however, why I do this ( which might be also I am missing a point):

My aim is to put all elements that are variables alltogether in Essential Graphics, even though these elements will

be applicable in various compostions and pre-comps.

 

As Essential Graphics doesn't seem to allow to reduce the compositions shown in the drop down menu master to the necessary and also the properties shown in Essential graphics to my knowledge are related to the composition selected under master, I try to create this one composition 'Control' where essentially all those variable elements are put together in different layers and feed the Essential Graphics menu.

 

Again, many thanks. This was very helpful.

Votes

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
community guidelines
Community Expert ,
Aug 30, 2020 Aug 30, 2020

Copy link to clipboard

Copied

LATEST

You can put elements from any nested comp (pre-comp) in an Essential Graphics panel. I do it all the time. Most of my motion graphics comps have three or four nested comps, There is one for text, one for backgrounds, one for other graphics like logos. The main comp is where the final composition is assembled and that is the comp that you select when you start using Essential Graphics. You can pull any supported property from any nested comp into the EGP without any problems. When you save a MOGRT the comp (your Controller Comp) is the one that is going to be used to render. That text layer that you are trying to control cam be in any nested comp in the project. There is no need for a duplicate.

 

I also use EGP sometimes in other projects that are not designed to be saved as MOGRT's. Sometimes it is a lot easier to dive into the EGP to make and adjustment than it is to dig through a stack of nested comps that is 8 deep. It makes editing easier. 

Votes

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
community guidelines