public class AnimationHelper extends AbstractBlenderHelper
blenderContext, blenderVersion, fixUpAxis, upAxisRotationQuaternion| Constructor and Description |
|---|
AnimationHelper(java.lang.String blenderVersion,
BlenderContext blenderContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyAnimations(Node node,
BlenderKey.AnimationMatchMethod animationMatchMethod)
The method applies animations to the given node.
|
void |
applyAnimations(Node node,
Skeleton skeleton,
BlenderKey.AnimationMatchMethod animationMatchMethod)
The method applies skeleton animations to the given node.
|
Ipo |
fromIpoStructure(Structure ipoStructure,
BlenderContext blenderContext)
This method creates an ipo object used for interpolation calculations.
|
Ipo |
fromValue(float constValue)
This method creates an ipo with only a single value.
|
int |
getCurveType(Structure structure,
BlenderContext blenderContext)
This method returns the type of the ipo curve.
|
void |
loadAnimations()
Loads all animations that are stored in the blender file.
|
applyProperties, loadLibrary, loadPropertiespublic AnimationHelper(java.lang.String blenderVersion,
BlenderContext blenderContext)
public void loadAnimations()
throws BlenderFileException
BlenderFileException - an exception is thrown when problems with blender file reading occurpublic void applyAnimations(Node node, BlenderKey.AnimationMatchMethod animationMatchMethod)
node - the node to whom the animations will be appliedanimationMatchMethod - the way animation should be matched with nodepublic void applyAnimations(Node node, Skeleton skeleton, BlenderKey.AnimationMatchMethod animationMatchMethod)
node - the node where the animations will be appliedskeleton - the skeleton of the nodeanimationMatchMethod - the way animation should be matched with skeletonpublic Ipo fromIpoStructure(Structure ipoStructure, BlenderContext blenderContext) throws BlenderFileException
ipoStructure - the structure with ipo definitionblenderContext - the blender contextBlenderFileException - this exception is thrown when the blender file is somehow
corruptedpublic Ipo fromValue(float constValue)
constValue - the value of this ipopublic int getCurveType(Structure structure, BlenderContext blenderContext)
structure - the structure must contain the 'rna_path' field and
'array_index' field (the type is not important here)blenderContext - the blender context