Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Link Master Properties to CSV file

  • Link Master Properties to CSV file

  • Fabio Basone

    September 11, 2020 at 5:37 pm

    Hello,

    I’m trying to build an expression on my Master Properties Text control that links to a CSV file.

    I want to update the text in multiple instances of my TEMPLATE using a CSV file. How would I get the number in the [“TEXT 01”] part of the expression below to update dynamically every time I duplicate the TEMPLATE? I suppose I would somehow link it to the layer index but because it’s a text string I’m not sure how that would work. Any ideas? Many thanks`

    thisComp.layer(“CSV TEST.csv”)(“Data”)(“Outline”)(“TEXT”)(“TEXT 01”).toUpperCase()

  • Rodrigo Aben

    September 11, 2020 at 7:40 pm

    Cant’t you just replace the “TEXT 01” by “TEXT” + thisLayer.index ?

  • Fabio Basone

    September 11, 2020 at 8:10 pm

    Unfortunatley not, because i actually need to update the text inside the ” ”

  • Brendon Murphy

    September 12, 2020 at 1:18 am

    I think you’re looking for something like this:

    textNum = thisLayer.index-2; //change the minus to whatever makes sense for your layers

    param = thisComp.layer(“CSV TEST.csv”)(“Data”)(“Outline”)(“TEXT”)

    textName = param.name+” “+textNum.toString();

    textName.toUpperCase();

  • Brendon Murphy

    September 12, 2020 at 1:53 am

    Wait – I just noticed that you’re referencing another value in “TEXT 0” via expression. This may be closer to what you need:

    textNum = thisLayer.index-2; //change the minus to whatever makes sense for your layers

    param = thisComp.layer(“CSV TEST.csv”)(“Data”)(“Outline”)(“TEXT”)

    subParam = param(textNum);

    subParam.toUpperCase();

  • Fabio Basone

    September 12, 2020 at 11:14 am

    Thanks, Brendon, this is working well. However, i now have a new issue.

    AE seems to be separating each line of text (rather than each ROW) into a new row.

    So i’d like the first HEADLINE template in my timeline to contain multiple lines of text but AE seems to split each line into a new template. Similarly, the CSV inside of AE creates additional ROWS even though the CSV file doesn’t appear that way.

    This is obviously something to do with how CSV files are encoded but if you have any ideas that would be much appreciated

    Cheers

  • Brendon Murphy

    September 12, 2020 at 5:17 pm

    Each cell in a given column has a different index number. If the lines are in separate cells, you need to call both indices in your expression. However, this would break the 1 to 1 relationship between layer number and row number (ie index number).

    If the lines are in the same cell, you can probably split them based on a period or other character and then read them to separate lines using “\r”. There’s some good information here that might help: https://fluxvfx.com/blogs/blog-fluxvfx/data-driven-expressions-for-after-effects-2019

Viewing 1 - 7 of 7 posts

Log in to reply.

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