
The default setup comes with a 2x2 grid (2 rows and 2 columns). Let's go through a basic example to get a practical understanding of the grid: A grid of 2x2 with Col - 1 set to 25, and Col - 2 set to 75 would display as Row - 1 taking up 25% of the total grid height, and Row - 2 the remaining 75%. When adjusting the size of the grid, the cells will readjust in size automatically while maintaining the same ratio.įor the ratios to make sense, a 0-100 range is recommended to be considered as percentages of the dimension of the grid. Since the dimensions of a cell are arbitrary, we'll be using ratios instead of pixel values for the row/col sizes.

Those Shape layer masks are constructed using the createPath() method, by specifying the 4 path points coordinates (4 corners) that define the rectangle shape. The Grid Layout is setup using Shape layers, in the form of rectangles - that will act as masks for the precomps. The footage precomp also has to be duplicated in the project panel, and made sure that the layer source matches that duplicate.

All 3 layers of a grid item must be duplicated when creating a new grid item. Comprises of a Footage precomp, a Shape layer that acts as a mask for the precomp, and a Text layer that identifies the grid item position in the comp view.It draws a border around every grid item. This is a shape layer with a stroke applied (no fill).

The grid layout algorithm will be run here.

Note: If you get any expression errors when you open the project, make sure the Expression Engine is set to Javascript in Project Settings > Expressions or CMD/CTRL SHIFT ALT/OPT K.
