AutoMovie API
    Preparing search index...

    Bake the object couplings a shot carries, the per-beat attachTo handoffs and the persistent staged mounts (#674), into follow clips once the parents' poses have compiled.

    attachTo, already validated by performShot's action scan, rides the child on the parent's bone in scene space and emits the grab, attach, detach and release handoffEvents. Each staged mount descends through the same baker, compileAttach, spanning the whole shot, so a rider rides every beat without re-issuing attachTo; an explicit attachTo for the same child this shot replaces its mount, and a mount emits no handoff events because it is standing scene state. A mount's parent rig and bone are validated here, since staging placed the parent without skeletons, and returned as violations.

    Couplings chain (#1140): a parent that is itself a coupled child this shot, such as a rider mounted on an animal and carrying a pole, is baked first, and its riders compose onto its baked frame per sample through any depth. That frame is read from all of the parent's baked clips through bakedTransformFromClipsAt, the channel authority playback uses, so before the parent's first coupling starts its riders follow its staged placement and across a handoff they follow whichever coupling is in effect. A coupling cycle has no world composition, so its members are reported in one violation and never baked.

    Returns the baked clips in bake order, parents before riders, with a child's attach clips in start order and repeats suffixed attach:<child>:2, ...; the handoff events; and the violations.

    type IProps = {
        attachments: readonly IAutoMovieAttachJob[];
        duration: number;
        jointAxes?: (
            node: string,
        ) =>
            | Partial<Record<AutoMovieHumanoidBone, IAutoMovieJointAxes>>
            | undefined;
        motions: Record<string, IAutoMovieMotion>;
        mounts: readonly IMount[];
        restFrames?: (
            node: string,
        ) =>
            | Partial<Record<AutoMovieHumanoidBone, IAutoMovieRestFrame>>
            | undefined;
        scene: IAutoMovieScene;
        skeleton: (node: string) => IAutoMovieSkeleton | null;
    }

    Hierarchy (View Summary)

    Index
    attachments: readonly IAutoMovieAttachJob[]

    Validated attachTo jobs of this shot.

    duration: number

    Finite positive shot duration in seconds, admitted by performShot. Mounts span [0, duration]; explicit attachment ends are clipped to this boundary.

    jointAxes?: (
        node: string,
    ) => Partial<Record<AutoMovieHumanoidBone, IAutoMovieJointAxes>> | undefined

    Synchronous per-parent clinical axis lookup. Missing callback or undefined answer uses HUMANOID_JOINT_AXES; returned records are borrowed and exceptions propagate.

    motions: Record<string, IAutoMovieMotion>

    Borrowed pose motions keyed by scene node. A missing parent's motion holds its rest pose; the table is not changed by coupling.

    mounts: readonly IMount[]

    Staged persistent mounts; an attachTo for the same child replaces one.

    restFrames?: (
        node: string,
    ) => Partial<Record<AutoMovieHumanoidBone, IAutoMovieRestFrame>> | undefined

    Synchronous per-parent rest-frame lookup matching the renderer. Missing callback or undefined answer uses the rig's own frames; records are borrowed only during baking and exceptions propagate.

    The staged scene, whose nodes hold every parent's placement.

    skeleton: (node: string) => IAutoMovieSkeleton | null

    Synchronous borrowed rig lookup, stable for each node throughout the call. Null rejects a persistent mount; attachment jobs require a previously admitted nonnull answer. Exceptions propagate.