BlendToAnim
A function added by the kNVSE Plugin.
Description
Performs a blend transition from the specified source animation sequence to the specified offset in the destination animation sequence over the specified duration (given in seconds). The source sequence must be an actively playing animation. If fDestFrame is 0.0, the blend will be to the first frame of the destination sequence.
iPriority specifies the priority at which to (re)activate both sequences. fSourceWeight and fDestWeight specify the final weights to assign to the source and destination NiControllerSequence objects. If a time sync sequence is provided, the destination NiControllerSequence is synchronized to it.
This function returns 0 if the blend cannot be successfully started.
Syntax
actor.BlendToAnim source sequence path:string dest sequence path:string bFirstPerson:0/1 fDuration:float fDestFrame:float fSourceWeight:float fDestWeight:float iPriority:integer time sync sequence path:string
Example
BlendToAnim "Characters\SequenceA.kf" "Characters\SequenceB.kf"
Blend Transitions
A blend transition moves between static frames in two sequences and is activated with the BlendToAnim function. The source sequence is eased out while the destination sequence is eased in over the duration of the blend, with each sequence being locked to a particular frame. Blend transitions are good for smoothly transitioning between two sequences with very different styles of movement (e.g. between an idle animation and a walk animation). Note that when accumulating transformations for the character, using a blend transition will cause all forward movement to stop for the duration of the blend, since only a static frame in each sequence is used.
An alternate type of blend is one that blends from the current scene graph pose of the character to a specified frame in some destination sequence. This type of blend is activated with the BlendToAnimFromPose function. This can be useful when the character is in a random position (e.g. after a physics simulation) and a smooth transition is needed back to a sequence. Note, however, that a temporary sequence is created for BlendFromPose that contains current scene graph data for the character, such as bone transforms, so there is some processing and memory overhead associated with this type of blend. Whenever possible, it is recommended that BlendToAnim be used instead. BlendToAnimFromPose should only be used if the character is not currently in a position corresponding to a frame in another sequence.