Skip to main content
Lazlo_Hollyfeld
Inspiring
September 9, 2012
Answered

Is there an expression control for entering in a string?

  • September 9, 2012
  • 1 reply
  • 3053 views

Hi There,

Just curious, is there an expression control that allows a user to enter a string that can eventually be read by the expression?  I don't see it on the sub-menu under "Effects > Expression Controls" but thought I'd ask to see if anybody has any ideas how to accomplish this without having to reference an external text file.

Thanks for your time and help!

--Laz

This topic has been closed for replies.
Correct answer Lazlo_Hollyfeld

i'm not sure to follow you perfectly.

maybe you could try accessing layer name using either this.name or thisComp.layer(index).name   [index being the layer #]


Yes, that is possible, for sure, and to make things even less intrusive, I could access a layer's comment attribute instead of having them rename the actual layer. 

But, in my situation I am wanting an AE artist to select from a closed set of strings.  I don't want them to enter in their own data lest there is something wrong with the formatting, etc.  I would prefer to have a drop down of sorts for the selection.  So, by creating null objects in the project panel, naming them with unique names, then dragging them into the comp, and applying a "Layer Control" expression control to the layer in quesiton, the AE artist can choose one of those layers, and then my script can read the name value of the Layer Control.

1 reply

Legend
September 9, 2012

You could assign a variable in the expression to a text layer's source text in the same composition or another composition. The user could double click the text layer and type what ever and the expression would use what they type. Would that work?

Lazlo_Hollyfeld
Inspiring
September 18, 2012

Yes, it would work, but I'm not entirely sure it would be the most obvious way for a motion designer to go about it.  I'm trying to make it as easy as possible for a non-advanced AE user to change a string.  So, I though of using the Layer Select expression control, then have a null object resting in the comp with a placeholder name.  Then, the user could change the layer name of the null object, and select that layer from the drop down in the expression control. Then my script could read the value of the name for that selected layer. 

I just wanted to avoid having anything actually in the comp layer.  Your suggestion would mean they would have to unhide something, type out the string, then hide it again so it wouldn't render.  Thank you for your suggestion, it got me thinking of alternative ways to handle it

Best,

Laz

Inspiring
September 18, 2012

i'm not sure to follow you perfectly.

maybe you could try accessing layer name using either this.name or thisComp.layer(index).name   [index being the layer #]