Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions get an property address dynamically

  • get an property address dynamically

    Posted by Phil Largilliere on October 18, 2017 at 2:44 pm

    Hi everyone,

    I wrote a script from a script by David Torno. It look like this :

    myProp1 = app.project.item(6).layer("Dark Lime Green Solid 1").property("ADBE Transform Group").property("ADBE Position");
    myProp2 = app.project.item(6).layer("Black Solid 1").property("Transform").property("Position");

    var a = collectKeyFrames(myProp1);
    var b = transferKeyframes(myProp2, a);

    In this case, my 2 functions work perfectly well, BUT… How can I get property informations dynamically ?

    I wrote them into a doc file, I can get the info, but my variables become texts, not objects, and the functions don’t work anymore. How can I get that ?

    Phil Largilliere replied 8 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Xavier Gomez

    October 18, 2017 at 9:31 pm

    You can use eval.
    myPath being the string stored in the file:

    var myProperty;
    try{myProperty = eval(myPath);}
    catch(e){alert(e);};

    Xavier

  • Phil Largilliere

    October 19, 2017 at 8:42 am

    Perfect !! Thank you so much

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