-
Grid based format for images but only along separate dimensions for x-axis
I’m very stuck on this. I found on this forum a thread from a user named John Cuevas back in 2012 in which he explained how to make grid-based placements of hundreds of images in a comp from this expression:
var columns = 10; var spaceBetweenLayers = thisLayer.width + 10; var x = ((index-1) % columns) * spaceBetweenLayers; var y = Math.floor((index-1) / columns) * spaceBetweenLayers; var origin = [40,50]; origin + [x,y]
Found here: https://creativecow.net/forums/thread/zoom-out-to-show-hundreds-of-images-or-layersae/
However, this does not work for the project I am working on. I have about 470+ images in 3D space that I have falling downwards into a white background through ‘z-position’ via “Separate Dimensions”. I set it up this way so I could just copy and past the z-position keyframe animation of all the images falling via their z-position and not have to manually change the x and y coordinates each time. The problem is this code doesn’t work for just x or y positions as separated dimensions. I receive this error: “Error: expression result must be of dimension 1, not 2.” for this line of code: “var columns = 10;”
Is there any way around this, or any other way to accomplish this?
Thank you so much for any help you can give me!