Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Setting a sourceText.style overrides value from CSV

  • Setting a sourceText.style overrides value from CSV

    Posted by Liran Tabib on July 4, 2023 at 10:10 am

    Hi to all!

    A weird issue try to use text layer size along with data from an outer CSV source- trying to get both changes bet only one is shown according to the order of this example code:

    text.sourceText.text="custom data from CSV";
    text.sourceText.style.setFont("Custom Font-Regular");

    In this order the font changes but not the text

    text.sourceText.style.setFont("Custom Font-Regular");
    text.sourceText.text="custom data from CSV";

    In this order the text changes but not the font

    Can I have them both in the same expression?

    Thanks!

    Brie Clayton replied 2 years, 10 months ago 3 Members · 3 Replies
  • 3 Replies
  • Filip Vandueren

    July 4, 2023 at 11:33 am

    Hello Liran,

    the solution is this:

    text.sourceText.style.setFont("Custom Font-Regular").setText("custom text from CSV");
  • Liran Tabib

    July 4, 2023 at 12:08 pm

    Works perfectly, and learned something new

    Thanks Filip!

  • Brie Clayton

    July 4, 2023 at 1:37 pm

    Thanks for the solve, Filip!

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