Skip to main content
Inspiring
June 9, 2019
Question

Linking to a CSV file

  • June 9, 2019
  • 1 reply
  • 479 views

Currently I am able to link a mask path from another layer to my current layer by adding the following expression:

For the mask 1 expression

thisComp.layer("Keyframes_master").mask("mask_1").maskPath

For the mask 2 expression

thisComp.layer("Keyframes_master").mask("mask_2").maskPath

For the mask 3 expression

thisComp.layer("Keyframes_master").mask("mask_3").maskPath

I was trying to achieve the same results by linking to a CSV using the expressions below, but I'm getting an error. Any help on how I can correct this would be appreciated. !

Thanks!!

For the mask 1 expression

thisComp.layer("Keyframe_ref").footage("Keyframe_ref.csv").dataValue([1,1])

For the mask 2 expression

thisComp.layer("Keyframe_ref").footage("Keyframe_ref.csv").dataValue([1,2])

For the mask 3 expression

thisComp.layer("Keyframe_ref").footage("Keyframe_ref.csv").dataValue([1,3])

For reference, here is what is in the CSV file

0,1,,,,,,,

1,thisComp.layer("Keyframes_master").mask(“mask_1”).maskPath,,,,,,,

2,thisComp.layer("Keyframes_master").mask(“mask_2”).maskPath,,,,,,,

3,thisComp.layer("Keyframes_master").mask(“mask_3”).maskPath,,,,,,,

    This topic has been closed for replies.

    1 reply

    Mylenium
    Legend
    June 10, 2019

    You cannot address mask points this way. I would suggest you actually read the help on the subject:

    Expression language in After Effects

    Mylenium

    persystAuthor
    Inspiring
    June 10, 2019

    Could you please be more specific on where to find the error?

    The expression does work correctly when I write them for each mask.

    thisComp.layer("Keyframes_master").mask("mask_1").maskPath          <------ WORKS

    The error occurs when I try linking to a CSV file which contain the expression above

    thisComp.layer("Keyframe_ref").footage("Keyframe_ref.csv").dataValue([1,1])          <------ DOES NOT WORK

    dataValue([1,1] = thisComp.layer("Keyframes_master").mask("mask_1").maskPath     

    Mylenium
    Legend
    June 10, 2019

    Please read the help page I linked. You cannot just address mask points directly, you have to encapsulate your code to "reconstruct" the mask based on your data.

    Mylenium