retargetClips beta
Function of @v12-engine/editor
export declare function retargetClips(source: Document, target: Document, into: Document, options: RetargetOptions): RetargetedClip[];Clips of source put on the bones of target, added to into (a document with the model's nodes, by their names; the model's own, or what emptyClipsFile makes of it). A pose reads the same on both: for a bone at the end of a chain of bones mapped, it points in the world where the file's bone points, however each rig's bones lie and whatever pose each was made in (arms straight out onto arms hanging: the clip's keys are poses, and are kept). The model is first stood in the file's rest (restInFile), and a turn is taken from the file's rest and put on that. So a key at the file's rest is the model's own rest only where their bones point alike at rest; on a model of another rest, it is the file's pose. A bone's place stays the model's own, so its proportions stay; only the topmost bones mapped go where the clip takes them (a walk's bounce), as far as the model is big against the file's. What sizes a bone is left out. Every other bone hangs as it does at rest, so that a clip leaves nothing as the last one left it. Both skeletons are to face the same way in their files.