Bake the attachTo verb into the child object's follow clip, the per-frame realisation of a rigid coupling to a parent's bone (a sword in a hand, a prop on a saddle). The child is not a rig, so, like a projectile, it moves by a node clip of translation and rotation tracks, not a pose motion.
Each sample resolves the parent's posed skeleton at that instant through resolveAttachment, which runs the parent's FK, to compose the child's bone-local offset into the parent's model space, then composes that onto the parent's world frame: its staged placement, or, when the parent itself rides a coupling this shot, its ridden frame from parentTransformAt (#1140):
The parent's scale is not applied, which matches the renderer for the unit-scale actors staging places. Pass the same jointAxes the renderer poses the parent with (HUMANOID_JOINT_AXES), plus the same restFrames when parent clips are authored in clinical space, or the child follows a bone where the renderer does not draw it. A parent with no motion holds its rest pose.
The clip is shot-local: N = max(1, round(duration × fps)) equal intervals give N + 1 keys including both ends of [start, start + duration], with duration set to shotDuration, the same convention as cameraMotion. Read alone through sampleClip it clamps to the child's first frame before start; playback reads it through sampleClipSequence, where it writes nothing before start and holds its last frame after the coupling ends. The clip id is attach:<child>; a caller baking several couplings of one child suffixes repeats. Throws a RangeError for nonfinite/nonpositive duration or fps, or an unsafe rounded interval count that cannot support an advancing indexed loop. This representability gate is not a workload cap; callers still own feasible memory use and representable distinct key times.
Bake the
attachToverb into the child object's follow clip, the per-frame realisation of a rigid coupling to a parent's bone (a sword in a hand, a prop on a saddle). The child is not a rig, so, like a projectile, it moves by a node clip of translation and rotation tracks, not a pose motion.Each sample resolves the parent's posed skeleton at that instant through resolveAttachment, which runs the parent's FK, to compose the child's bone-local offset into the parent's model space, then composes that onto the parent's world frame: its staged placement, or, when the parent itself rides a coupling this shot, its ridden frame from
parentTransformAt(#1140):translation = parentPos + parentRot · childLocal.translationrotation = parentRot ∘ childLocal.rotationThe parent's scale is not applied, which matches the renderer for the unit-scale actors staging places. Pass the same
jointAxesthe renderer poses the parent with (HUMANOID_JOINT_AXES), plus the samerestFrameswhen parent clips are authored in clinical space, or the child follows a bone where the renderer does not draw it. A parent with no motion holds its rest pose.The clip is shot-local: N = max(1, round(duration × fps)) equal intervals give N + 1 keys including both ends of [start, start + duration], with duration set to
shotDuration, the same convention ascameraMotion. Read alone throughsampleClipit clamps to the child's first frame beforestart; playback reads it throughsampleClipSequence, where it writes nothing beforestartand holds its last frame after the coupling ends. The clip id isattach:<child>; a caller baking several couplings of one child suffixes repeats. Throws aRangeErrorfor nonfinite/nonpositive duration or fps, or an unsafe rounded interval count that cannot support an advancing indexed loop. This representability gate is not a workload cap; callers still own feasible memory use and representable distinct key times.