Skip to content

Cell ​

Extract one cell and the remaining cells, or read its width, height, size, centre and rectangle.

Category: Utility Menu path: Utility > Cell

Ports ​

PortTypeDirectionDescription
cellspointsinputPoints carrying a cellSize Vec2, such as Layout's cells
selectedpointsoutputThe selected original cell, with its id and attributes
remainingpointsoutputAll other cells, in their incoming order
widthscalaroutputThe cell's width in comp pixels
heightscalaroutputThe cell's height
sizevec2output(width, height) as one vec2
centervec2outputThe cell's centre, in origin-centred comp pixels
rectshapeoutputThe cell as one closed rectangle

Every output is in origin-centred composition pixels — (0, 0) is the centre of the frame — the same space shapes and points are authored in, so center drops straight into a Transform2D position and size straight into a Rectangle or a Text box.

Parameters ​

ParamTypeDefaultDescription
cellscalar0Which cell to read, counting from 0 in the incoming stream (a root Layout starts in reading order). Same number a nested Layout's Split Cell takes

Expose Channels ​

None. Cell produces values; there is nothing to drive.

How It Works ​

Layout emits every cell as one stream of points, which is what you want when one node fills all of them — DrawInstances stamps an image in each, CloneToPoints a shape. Cell is for the other case: one thing, sized and placed by one cell. A headline that reflows as its cell narrows. A plate drawn at exactly that cell. A video parked on the feature tile.

It reads the point at position cell and reports the cellSize it carries as the size, its position as the centre, and builds the rectangle from the two. Selected extracts that original row; Remaining excludes exactly that row. Both preserve ids and attributes; an explicit index column renumbers to match each output’s order. This is CPU geometry, not a GPU operation.

Select it and Properties shows the Size and Center it read, live, the same way Measure does.

A cell that is not there — nothing wired, a number past the end, or a row without a finite, positive two-axis cellSize Vec2 — publishes zeros and an empty rectangle, so a shape driven from it disappears rather than drawing at some other size. Selected is then empty and Remaining is unchanged. With nothing wired, both streams are empty. A collapsed Layout track emits no row at all, so later cell numbers close up.

Usage Examples ​

Text that reflows with its cell ​

The demo this node exists for.

Layout ── Cell(0) ── size ── Text.boxSize_in
                              Text ── Transform2D ── DrawText ── Output
             └──── center ── Transform2D.position_in

Wire Layout.cells → Cell.cells, then Cell.size → Text.boxSize_in and Cell.center → Transform2D.position_in. Now keyframe the Layout's columns from 1 1 to 3 1: the cell widens, the box widens with it, and the copy rewraps on every frame — a paragraph that goes from three lines to one as its tile grows. No keyframes on the text at all.

A plate on one tile ​

Cell.rect → RoundCorners → DrawShape. The rectangle is the cell; rounding it and filling it gives you one tile of a bento drawn on its own, so it can have its own colour, its own stroke, or its own timing — Merge it over the rest.

Something parked on the feature cell ​

Cell.center → Transform2D.position_in on any chain — an image, a nested comp, a shape — puts that element on the middle of the cell and keeps it there while the layout animates. Add Cell.size into a Measure-style fit if it should also scale.

Split A and D independently, without duplicates ​

Start with a root 2×2 Layout: A, B, C, D.

  1. Root cells → Cell A.cells, Cell 0. Its selected → Layout A.cells_in; split that one cell into 2×2 pieces.
  2. Cell A.remaining → Cell D.cells. This stream is B, C, D, so select 2, not 3.
  3. Cell D.selected → Layout D.cells_in, also 2×2. Leave each child Layout's Split Cell at 0: it receives only one row, so it emits only its four pieces.
  4. Connect Layout A's cells, Cell D's remaining B/C, and Layout D's cells to MergePoints, in that slot order. The result is 10 cells: A1–A4, B, C, D1–D4.
  5. Feed the merge to DrawInstances, or CloneToPoints with Cell Fit enabled.

MergePoints appends; it does not deduplicate or restore reading order. Do not also merge the original A/D cells. Cell preserves identity, but generic MergePoints assigns sequential ids; changing an earlier branch's count can change later ids and their random variations.

Tips ​

  • Count in reading order. Cell 0 is top-left; the numbering runs across the top row, then the next. When Layouts are nested the LAST Layout in the chain holds the whole layout, so wire Cell to that one and count its cells.
  • Any positive finite Vec2 cellSize works, regardless of producer. A bare Grid has no box. PointAttributes Custom + a vector field can write Vec2; Custom + Value writes a scalar and is not a box.
  • For the whole layout at once, skip this node and wire Layout.cells straight into DrawInstances or CloneToPoints.
  • Layout — where the cells come from
  • Measure — the same outputs, for the extent of anything else
  • Text — boxSize_in takes size for text that reflows with its cell
  • Rectangle — width_in / height_in take the cell's dimensions
  • Transform2D — position_in takes center
  • DrawInstances — fills every cell at once, when that is what you want