Copy link to clipboard
Copied
Hello!
I feel like there must be a real simple way to do this - but I'm having trouble figuring out how to display the actual expression text in a comp. I figure for tutorials it'd be super helpful to have the text in the comp update in real time as I'm typing it in!
Attached pic is the result I'm looking for - but to have the text in the comp update without me having to copy and paste everytime! I hope this is possible 🙂
Thanks!
Copy link to clipboard
Copied
You could always simply link it with a
thisComp.layer("XYZ").text.sourceText.toString()
and similar. Realtime updating as you type is not possible, though. It's inherent in how AE evaluates property streams. As long as the expression editor is open the evaluation is suspended and the stream will expose it's default values or the last valid state it was in when it was entered.
Mylenium
Copy link to clipboard
Copied
Hello,
Thank you so much for taking the time to reply 🙂
I'm a bit confused as to where to put that code - in the Source Text parameter, or in the parameter of the expression I'm trying to copy? When I put it in the Source Text parameter, it returns that it can't read the property 'sourceText of undefined'. I tried getting it to reference:
"thisComp.layer(""layer with expression I want to display").position.text.toString()"
I must be misreading your help!
Also, thank you for the clarification about the realtime updating as I type!
Copy link to clipboard
Copied
Of course you will need to adapt the code depending on what properties you reference. Position is always a value, so it's .value.toString(). Invoking other funktions like parseInt() to process numbers correctly or toFixed() to shorten decimals for beautification may also be required.
Mylenium
Copy link to clipboard
Copied
Thanks for replying! 🙂
I'm not trying to display the result of the expression - rather I'm trying to display the actual text of the expression itself.
Copy link to clipboard
Copied
Then rejig it - apply the code to a text layer, parse it in the actual property where it needs to go using eval() and at the same time also link it to your actual visible text layer.
Mylenium