Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Text Expression

  • Posted by Bilal Arif on May 15, 2022 at 6:42 am

    Hi,

    I’m trying to write different parameters into my Source Text like this:

    thisComp.layer(“a”).text.sourceText.getStyleAt(0,0)
    +
    thisComp.layer(“b”).text.sourceText.getStyleAt(0,0);

    But It shows [object][object] instead of showing text of two layers a and b.

    What should I do?

    Filip Vandueren replied 4 years, 3 months ago 2 Members · 1 Reply
  • 1 Reply
  • Filip Vandueren

    May 15, 2022 at 9:42 am

    Hi Bilal,

    to get the sourceTexts’ strings you use sourceText.value,

    getStyle() will return indeed a style object at that character, but for which after effects doesn’t expose the source properties and methods, you can only get values out of the style object using further methods like .fontSize() etc.

    But as you probably know, you cannot _set_ multiple styles in 1 textlayer via expressions nor scripting.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy