-
1. Re: global array variables? , transfer data from one layer expression to another
Dan Ebberts Feb 12, 2014 10:15 AM (in response to zipkiev)There's no way for an expression to create data that persists from frame to frame. Your expression can go back in time using valueAtTime() to recalculate previous values, but you can't store them.
Dan
-
2. Re: global array variables? , transfer data from one layer expression to another
sinious Mar 19, 2014 6:09 PM (in response to Dan Ebberts)Is using valueAtTime to get the values in a layer at a specific time the best practice means of a global variable? I'd like to move hundreds of objects to pre-calculated size/scales and I can calculate that all at once while randomizing (the seed) start position of these layers. I just need to continuously make sure they end where I want. Is a global in this way the best practice?
-
3. Re: global array variables? , transfer data from one layer expression to another
Dan Ebberts Mar 19, 2014 11:43 PM (in response to sinious)It's not clear from your question if you know this, but valueAtTime() is read-only, you can't use it to set values. Also, an expression can only alter the value of the property hosting the exrpession--it can't affect other properties. So each property you want to control would need its own expression.
Dan
-
4. Re: global array variables? , transfer data from one layer expression to another
sinious Mar 20, 2014 8:25 AM (in response to Dan Ebberts)Thanks for the tip. First to answer you, yes it would be a read-only requirement, but in AE I'm probably way off course on the best way to do what I'd like to.
Imagine building a brick wall (literally) from the bottom of the screen to the top. I'd like the bricks to start 'pooled' in a few different specific positions far off in the distance. Over time each brick flies toward the screen, building the wall brick by brick from the bottom up.
I figured to do this, expressions might be able to take some of the pain away. Thinking very linear and probably not very AE-like, I imagined I'd create a multi-dimensional array containing the starting and ending positions of every brick. As each frame ticks away I'd run the same expression on every brick, using layer number and 'time' as the only unique things I can use to control the order in which bricks move. So I would need continual read-only access to that multi-dimensional array on every frame.
I'm probably going about this entirely wrong however. Since I'd need to actually make every single brick layer manually (silly), perhaps what I'm looking for is to be pointed away from expressions and to the AE JavaScript API. Does this sound like a job much better suited to that? I know expressions can't generate layers so for that reason alone it seems like AE JS API is the way to go. If so, what are some good resources for this? I see one on wikia but it's not very reference like. I can't seem to locate the AE equivalent of Flash's JSFL API. I found the PDF version for CS6 but I'd really like the online resource, more reference like so you can click methods/properties/etc for more information rather than one gigantic static page.
Thanks for any tips! (BTW I do have Trapcode Echospace. It's great but I find organic looking "randomized" animation a bit difficult with it. It's great if everything is uniform, which isn't what I'm looking for.)


