Drag[en]gine Script Module DragonScript
1.21
|
Public Member Functions | |
Constructors | |
AnimatorInstance | new () |
Create animator instance. More... | |
Management | |
Animator | getAnimator () |
animator or null if not set. More... | |
void | setAnimator (Animator animator) |
Set animator or null if not set. More... | |
void | setAnimator (Animator animator, bool keepValues) |
Set animator or null if not set. More... | |
Component | getComponent () |
Component or null if not set. More... | |
void | setComponent (Component component) |
Set component or null if not set. More... | |
Animation | getAnimation () |
Animation or null if not set. More... | |
void | setAnimation (Animation animation) |
Set animation or null if not set. More... | |
AnimatorRuleBlendMode | getBlendMode () |
Blend mode. More... | |
void | setBlendMode (AnimatorRuleBlendMode mode) |
Set blend mode. More... | |
float | getBlendFactor () |
Blend factor in the range from 0 to 1. More... | |
void | setBlendFactor (float factor) |
Set blend factor clamped to the range from 0 to 1. More... | |
bool | getEnableRetargeting () |
Retargeting is enabled. More... | |
void | setEnableRetargeting (bool enableRetargeting) |
Set if retargeting is enabled. More... | |
void | apply () |
Apply animator. More... | |
void | applyDirect () |
Apply animator immediately. More... | |
void | captureState (int identifier) |
Capture current state into snapshot rules matching identifier. More... | |
void | storeFrame (int identifier, String moveName, float moveTime) |
Store animation frame from animation into into rules matching identifier. More... | |
Controllers | |
int | getControllerCount () |
Nnumber of controllers. More... | |
AnimatorController | getControllerAt (int index) |
Get wrapper for controller. More... | |
AnimatorController | getControllerNamed (String name) |
Get wrapper for controller if present. More... | |
int | indexOfControllerNamed (String name) |
Index of named controller or -1 if not found. More... | |
void | copyControllerStates (AnimatorInstance instance, int count) |
Copy the first count controller values and vectors from another animator instance. More... | |
void | copyControllerStates (AnimatorInstance instance, int offset, int count) |
Copy the first count controller values and vectors from another animator instance. More... | |
void | copyNamedControllerStates (AnimatorInstance instance) |
Copy name matching controller values and vectors from another animator instance. More... | |
Animator instance.
Animators define how animation states are calculated. Animator instances carry out the actual calculation of animation states for a specific world element.
Animator instances have a component and animation set. If the component is not null the animation state can be applied to the set component using apply(). If animation is null the animation set in the animator is used. Otherwise the animation set in the animator instance replaces the one defined in the animator. This allows to reuse an animator with different animations.
This is a native class. It can not be subclassed.
void Dragengine.Scenery.AnimatorInstance.apply | ( | ) |
Apply animator.
Starts calculating animator state in a parallel task. Once completed the animation state is applied to the component. You can access the component state any time after this call. If the calculation is not finished by then the affected call waits until it is finished.
void Dragengine.Scenery.AnimatorInstance.applyDirect | ( | ) |
Apply animator immediately.
Calculates animator state and waits for calculation to complete.
void Dragengine.Scenery.AnimatorInstance.captureState | ( | int | identifier | ) |
Capture current state into snapshot rules matching identifier.
void Dragengine.Scenery.AnimatorInstance.copyControllerStates | ( | AnimatorInstance | instance, |
int | count | ||
) |
Copy the first count controller values and vectors from another animator instance.
Bones outside the number of controllers are ignored.
EInvalidParam | count is less than 0. |
void Dragengine.Scenery.AnimatorInstance.copyControllerStates | ( | AnimatorInstance | instance, |
int | offset, | ||
int | count | ||
) |
Copy the first count controller values and vectors from another animator instance.
Offset index of controller to copy from other animator. Bones outside the number of controllers are ignored.
EInvalidParam | count is less than 0. |
void Dragengine.Scenery.AnimatorInstance.copyNamedControllerStates | ( | AnimatorInstance | instance | ) |
Copy name matching controller values and vectors from another animator instance.
Non-matching controllers are ignored.
Animator Dragengine.Scenery.AnimatorInstance.getAnimator | ( | ) |
animator or null if not set.
float Dragengine.Scenery.AnimatorInstance.getBlendFactor | ( | ) |
Blend factor in the range from 0 to 1.
AnimatorRuleBlendMode Dragengine.Scenery.AnimatorInstance.getBlendMode | ( | ) |
Blend mode.
AnimatorController Dragengine.Scenery.AnimatorInstance.getControllerAt | ( | int | index | ) |
Get wrapper for controller.
index | Index of controller. If index is negative controller count is added to it. This allows to get controllers starting from the last controller. |
EOutOfBoundary | controller is less than -getControllerCount() or larger than or equal to getControllerCount(). |
int Dragengine.Scenery.AnimatorInstance.getControllerCount | ( | ) |
Nnumber of controllers.
AnimatorController Dragengine.Scenery.AnimatorInstance.getControllerNamed | ( | String | name | ) |
Get wrapper for controller if present.
name | Name of controller. If no controller with this name is present null is returned. |
bool Dragengine.Scenery.AnimatorInstance.getEnableRetargeting | ( | ) |
Retargeting is enabled.
int Dragengine.Scenery.AnimatorInstance.indexOfControllerNamed | ( | String | name | ) |
Index of named controller or -1 if not found.
AnimatorInstance Dragengine.Scenery.AnimatorInstance.new | ( | ) |
Create animator instance.
void Dragengine.Scenery.AnimatorInstance.setAnimation | ( | Animation | animation | ) |
Set animation or null if not set.
void Dragengine.Scenery.AnimatorInstance.setAnimator | ( | Animator | animator | ) |
Set animator or null if not set.
Initializes all controllers to the value of the animator.
void Dragengine.Scenery.AnimatorInstance.setAnimator | ( | Animator | animator, |
bool | keepValues | ||
) |
Set animator or null if not set.
If keepValues is true keeps all controller values unchanged which have the same name in the old and new animator. Otherwise initializes all controllers to the value of the new animator.
void Dragengine.Scenery.AnimatorInstance.setBlendFactor | ( | float | factor | ) |
Set blend factor clamped to the range from 0 to 1.
void Dragengine.Scenery.AnimatorInstance.setBlendMode | ( | AnimatorRuleBlendMode | mode | ) |
Set blend mode.
void Dragengine.Scenery.AnimatorInstance.setComponent | ( | Component | component | ) |
Set component or null if not set.
void Dragengine.Scenery.AnimatorInstance.setEnableRetargeting | ( | bool | enableRetargeting | ) |
Set if retargeting is enabled.
void Dragengine.Scenery.AnimatorInstance.storeFrame | ( | int | identifier, |
String | moveName, | ||
float | moveTime | ||
) |
Store animation frame from animation into into rules matching identifier.
If moveName does not exist in the animation a default state is captured.
EInvalidParam | moveName is NULL. |