Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Transform a String value into Object

$
0
0

Hi everyone !

 

Here is a tricky one : I made a script to get the keys property by property in a layer. If I enter a full property name by hand like this

 

myProp = app.project.item(55).layer("titre").property("Transform").property("Position"); 
alert(myProp.numKeys); 

 

It gives me the number of keys on my property... But, if I get the exact same property path by another way (text file, script...) it doesn't work anymore.

 

myProp = myTextFileDataArray; //the exact property path is entered in the text file 
alert(myProp[0].numKeys); 

 

Returns "undefined".

My program has to scan all the layers and properties in a comp, so I need to have a myProp value dynamically.

 

Hope my ask is clear :/


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>