@motion-script/core / createStill
Function: createStill()
createStill(
content):Scene
Defined in: nodes/scene/scene-node.ts:504
Create a single-frame scene — a thumbnail, a poster frame, a still export.
createStill(() => )
Sugar over createScene with a generator body that never yields, which
is already exactly one frame: the priming next() reports done immediately,
but the precomp loop still processes frame 0 in full before it breaks, so the
scene measures frameCount === 1. Nothing about rendering it differs from an
animated scene — it is the same build → layout → render pass, so a still and
frame 0 of the equivalent animation are the same image.
Why a factory, and not a node
A scene body runs more than once per rendered frame: the precomp measures the scene, then the evaluator replays it, and Scene.reset disposes and clears the root's children between passes. A node captured in a closure is therefore disposed before its second use, and re-adding it puts a torn-down tree into layout — which surfaces as an undefined padding/size deep inside the layout engine, not as anything that names the real cause.
So the factory is what makes the still rebuildable, and it is enforced: passing
a node throws immediately rather than failing obscurely later. (It also fixes
the same theme-timing problem a project GlobalLayer has — a node built at
module scope resolves its tokens against whatever registry existed then.)
Scene-level props go through the stage, and may be combined with a returned tree:
createStill(stage => { stage.set({ fill: 'bg' }); return ; });