TorqueScript Reference
AnimationAsset Class Reference

#include <AnimationAsset_ScriptBinding.h>

Inherits AssetBase.

Public Member Functions

Boolean getAnimationCycle ()
Integer getAnimationFrameCount ([bool validatedFrames])
String getAnimationFrames ([bool validatedFrames])
Float getAnimationTime ()
Integer getFrameCount ([bool validatedFrames])
String getImage ()
String getMissingFrames ()
Integer getNamedAnimationFrameCount ([bool validatedFrames])
String getNamedAnimationFrames ([bool validatedFrames])
Boolean getNamedCellsMode ()
void setAnimationCycle (bool animationCycle)
void setAnimationFrames (animationFrames)
void setAnimationTime (float animationTime)
void setImage (assetId)
void setNamedAnimationFrames (animationFrames)
Public Member Functions inherited from AssetBase
Integer createStateSnapshot ()
String getAssetId ()
Boolean isAssetDirty ()
void refreshAsset ()
Boolean restoreStateSnapshot (snapshot)
Boolean revertAsset ()
Boolean saveAsset ()
Public Member Functions inherited from SimObject
void assignFieldsFrom (SimObject)
Integer clone ([copyDynamicFields=false]?)
Integer deepClone ()
void delete ()
Integer getId ()
void setName (newName)
String getName ()
String getClassNamespace ()
String getSuperClassNamespace ()
void setClassNamespace (nameSpace)
void setSuperClassNamespace ()
Boolean isMethod (string methodName)
String call (methodName, [args] *)
void dumpClassHierarchy ()
void dump ()
Boolean isMemberOfClass (string classname)
String getClassName ()
String getFieldValue (fieldName)
Boolean setFieldValue (fieldName, value)
Boolean setEditFieldValue (fieldName, value)
Integer getDynamicFieldCount ()
String getDynamicField (index)
Integer getFieldCount ()
String getField (int index)
void setProgenitorFile (file)
String getProgenitorFile ()
Integer getType ()
String getFieldType (fieldName)
void setInternalName (string InternalName)
String getInternalName ()
Boolean isChildOfGroup (groupID)
Integer getGroup ()
Boolean startTimer (callbackFunction, float timePeriod, [repeat]?)
void stopTimer ()
Boolean isTimerActive ()
Integer schedule (time, command, [arg] *)
void startListening (SimObject)
void stopListening (SimObject)
void addListener (SimObject)
void removeListener (SimObject)
void removeAllListeners ()
void postEvent (String eventName, String data)
Boolean save (fileName, [selectedOnly]?)
void addFieldFilter (fieldName)
void removeFieldFilter (fieldName)

Member Function Documentation

◆ getAnimationCycle()

Boolean getAnimationCycle ( )

Gets whether the animation cycles or not.

Returns
Whether the animation cycles or not.

◆ getAnimationFrameCount()

Integer getAnimationFrameCount ( )

Gets the count of frame that compose the animation or optionally only the ones validated against the image asset.

Parameters
validatedFrames- Whether to return only the validated frames or not. Optional: Default is false.
Returns
The image frames that compose the animation or optionally only the ones validated against the image asset.

◆ getAnimationFrames()

String getAnimationFrames ( )

Gets the frames that compose the animation or optionally only the ones validated against the image asset.

Parameters
validatedFrames- Whether to return only the validated frames or not. Optional: Default is false.
Returns
The image frames that compose the animation or optionally only the ones validated against the image asset.

◆ getAnimationTime()

Float getAnimationTime ( )

Gets the total time to cycle through all animation frames.

Returns
The total time to cycle through all animation frames.

◆ getFrameCount()

Integer getFrameCount ( )

Gets the count of frames that compose the animation, whether it is using named cells or numbered ones.

Parameters
validatedFrames- Whether to count only the validated frames or not. Optional: Default is false.
Returns
The number of frames that compose the animation.

◆ getImage()

String getImage ( )

Gets the image asset Id.

Returns
The image asset Id.

◆ getMissingFrames()

String getMissingFrames ( )

Gets the named frames that no cell of the image answers to.

Empty when every frame resolves, and empty for an animation using numbered frames, which cannot have this problem – an out-of-range number is clamped.

Returns
The space separated names of the frames that cannot be found.

◆ getNamedAnimationFrameCount()

Integer getNamedAnimationFrameCount ( )

Gets the count of named frames that compose the animation or optionally only the ones validated against the image asset.

Parameters
validatedFrames- Whether to return only the validated frames or not. Optional: Default is false.
Returns
The named image frames that compose the animation or optionally only the ones validated against the image asset.

◆ getNamedAnimationFrames()

String getNamedAnimationFrames ( )

Gets the named frames that compose the animation or optionally only the ones validated against the image asset.

Parameters
validatedFrames- Whether to return only the validated frames or not. Optional: Default is false.
Returns
The named image frames that compose the animation or optionally only the ones validated against the image asset.

◆ getNamedCellsMode()

Boolean getNamedCellsMode ( )

Gets whether the animation is using names for its cells.

This is not a setting. It is read from the image asset: an image in explicit mode cuts itself into named cells, so an animation on it addresses them by name, and an image cut into a grid has no names to address. Change the image, or change that image's explicit mode, to change this.

Returns
True if the animation is using named cells.

◆ setAnimationCycle()

void setAnimationCycle ( bool animationCycle)

Sets whether the animation cycles or not.

Parameters
animationCycleWhether the animation cycles or not.
Returns
No return value.

◆ setAnimationFrames()

void setAnimationFrames ( animationFrames )

Sets the image frames that compose the animation.

Parameters
animationFramesA set of image frames that compose the animation.
Returns
No return value.

◆ setAnimationTime()

void setAnimationTime ( float animationTime)

Sets the total time to cycle through all animation frames.

Parameters
animationTimeThe total time to cycle through all animation frames.
Returns
No return value.

◆ setImage()

void setImage ( assetId )

Sets the image asset Id.

Returns
No return value.

◆ setNamedAnimationFrames()

void setNamedAnimationFrames ( animationFrames )

Sets the named image frames that compose the animation.

Parameters
animationFramesA set of named image frames that compose the animation.
Returns
No return value.