This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Animations Class

Warning
The functionality described here is EXPERIMENTAL and is not recommended for production use. Future releases may bring significant changes to API and features. Backward compatibility of the final production-ready version is not guaranteed.
Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScript (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.

Animations Class

Members

getNumObjects() const#

Returns the current total number of animated objects.

Return value

Current number of animated objects.

getNumTracks() const#

Returns the current total number of animation tracks.

Return value

Current number of animation tracks.

getNumPlaybacks() const#

Returns the current total number of animation playbacks.

Return value

Current number of animation playbacks.

static getEventTrackRemoved() const#

The event handler signature is as follows: myhandler()

Usage Example

Source code

Return value

Event reference.

static getEventTrackAdded() const#

The event handler signature is as follows: myhandler()

Usage Example

Source code

Return value

Event reference.

static getEventObjectRemoved() const#

The event handler signature is as follows: myhandler()

Usage Example

Source code

Return value

Event reference.

static getEventObjectAdded() const#

The event handler signature is as follows: myhandler()

Usage Example

Source code

Return value

Event reference.

AnimationObject getObjectByIndex ( int index ) #

Returns an animation object by its index in the common list of animation objects.

Arguments

  • int index - Animation object index.

Return value

Animation object with the specified index

AnimationObject getObjectByID ( int id ) #

Returns an animation object by its ID.

Arguments

  • int id - Animation object ID.

Return value

Animation object with the specified ID.

int containsObject ( int id ) #

Returns a value indicating if an animation object with the specified ID exists.

Arguments

  • int id - Animation object ID.

Return value

1 if the animation object with the specified ID exists; otherwise, 0.

int getObjectIndex ( const AnimationObject obj ) #

Returns an index of the specified animation object in the common list.

Arguments

  • const AnimationObject obj - Animation object for which an index is to be found.

Return value

Animation object index in the common list of animation objects if it is found; otherwise, -1.

void loadTracks ( ) #

Loads all animation tracks.

void unloadTracks ( ) #

Unloads all animation tracks.

void reloadTracks ( ) #

Reloads all animation tracks.

int loadTrack ( string path ) #

Loads an animation track from the specified file path.

Arguments

  • string path - Path to the source track file (.utrack).

Return value

Result of loading operation.

int reloadTrack ( string path ) #

Reloads an animation track from the specified file path.

Arguments

  • string path - Path to the source track file (.utrack).

Return value

Result of reloading operation.

int saveTrack ( AnimationTrack track, string path ) #

Saves the specified animation track to the specified file path.

Arguments

  • AnimationTrack track - Animation track to be saved.
  • string path - Path to which the specified animation track is to be saved.

Return value

Result of saving operation.

int saveTrackPrecomputed ( AnimationTrack track, int num_frames, int is_looped_frames, string path ) #

Saves the precomputed version of the specified animation track to the specified file path.

Arguments

  • AnimationTrack track - Animation track to be saved.
  • int num_frames - Number of frames to be saved.
  • int is_looped_frames - Set 1 if the animation track should be looped; otherwise, 0.
  • string path - Path to which the specified animation track is to be saved.

Return value

Result of saving operation.

AnimationTrack getTrackByIndex ( int index ) #

Returns an animation track by its index in the common list of tracks.

Arguments

  • int index - Animation track index in the common list of tracks.

Return value

Animation track with the specified index.

AnimationTrack getTrackByGUID ( UGUID guid ) #

Returns an animation track by its GUID.

Arguments

  • UGUID guid - GUID of the animation track.

Return value

Animation track with the specified GUID.

AnimationTrack getTrackByFileGUID ( UGUID guid ) #

Returns an animation track by the GUID of the animation track file (.utrack).

Arguments

  • UGUID guid - GUID of the animation track file (.utrack).

Return value

Animation track with the specified file GUID.

AnimationTrack getTrackByPath ( string path ) #

Returns an animation track by the path to the animation track file (.utrack).

Arguments

  • string path - Path to the animation track file (.utrack).

Return value

Animation track with the specified file GUID.

int containsTrack ( UGUID guid ) #

Returns a value indicating if an animation track with the specified GUID exists.

Arguments

  • UGUID guid - GUID of the animation track.

Return value

1 if the animation track with the specified GUID exists; otherwise, 0.

int getTrackIndex ( AnimationTrack track ) #

Returns an index of the specified animation track in the common list.

Arguments

  • AnimationTrack track - Animation track for which an index is to be found.

Return value

Animation track index in the common list of animation tracks if it is found; otherwise, -1.

void loadPlaybacks ( ) #

Loads all animation playbacks.

int loadPlayback ( string path ) #

Loads an animation playback from the specified file path.

Arguments

  • string path - Path to the source animation playback file (.uplay).

Return value

Result of loading operation.

int savePlayback ( AnimationPlayback playback, string path ) #

Saves the specified animation playback to the specified file path.

Arguments

  • AnimationPlayback playback - Animation playback to be saved.
  • string path - Path to which the specified animation playback is to be saved.

Return value

Result of saving operation.

AnimationPlayback getPlaybackByIndex ( int index ) #

Returns an animation playback by its index in the common list of tracks.

Arguments

  • int index - Animation playback index in the common list of playbacks.

Return value

Animation playback with the specified index.

AnimationPlayback getPlaybackByGUID ( UGUID guid ) #

Returns an animation playback by its GUID.

Arguments

  • UGUID guid - GUID of the animation playback.

Return value

Animation playback with the specified GUID.

AnimationPlayback getPlaybackByFileGUID ( UGUID guid ) #

Returns an animation playback by the GUID of the animation track file (.uplay).

Arguments

  • UGUID guid - GUID of the animation playback file (.uplay).

Return value

Animation track with the specified file GUID.

AnimationPlayback getPlaybackByPath ( string path ) #

Returns an animation playback by the path to the animation track file (.uplay).

Arguments

  • string path - Path to the animation playback file (.uplay).

Return value

Animation playback with the specified file GUID.

int containsPlayback ( UGUID guid ) #

Returns a value indicating if an animation playback with the specified GUID exists.

Arguments

  • UGUID guid - GUID of the animation playback.

Return value

1 if the animation playback with the specified GUID exists; otherwise, 0.

int getPlaybackIndex ( AnimationPlayback playback ) #

Returns an index of the specified animation playback in the common list.

Arguments

Return value

Animation track index in the common list of animation tracks if it is found; otherwise, -1.

int getClasses ( Vector<String>& OUT_out_classes ) #

Obtains the list of names of all available classes that can be animated and puts it to the specified output buffer.

Arguments

  • Vector<String>& OUT_out_classes - Output buffer for the list of the Engine's classes that can be animated.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.

Return value

Number of the Engine's classes that can be animated.

int getSingletonClasses ( Vector<String>& OUT_out_classes ) #

Obtains the list of names of all Engine's singleton-classes and puts it to the specified output buffer.

Arguments

  • Vector<String>& OUT_out_classes - Output buffer for the list of the Engine's singleton-classes.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.

Return value

Number of the Engine's singleton-classes.

string getParentClass ( string class_name ) #

Returns the name of the parent class for the specified class.

Arguments

  • string class_name - Name of the class for which the parent class is to be found.

Return value

Name of the parent class.

int getDerivedClasses ( string class_name, Vector<String>& OUT_out_classes ) #

Obtains the list of all classes derived from the specified one and puts it to the specified output buffer.

Arguments

  • string class_name - Name of the class for which derived classes are to be found.
  • Vector<String>& OUT_out_classes - Output buffer for the list of classes derived from the specified class.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.

Return value

Number of derived classes.

int getClassParameters ( string class_name, Vector<int>& OUT_out_parameters ) #

Obtains the list of all animation parameter for the specified class and puts it to the specified output buffer.

Arguments

  • string class_name - Name of the class for which the list of animation parameters is to be found.
  • Vector<int>& OUT_out_parameters - Output buffer for the list of parameters of the specified class.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.

Return value

Number of animation parameters for the specified class.

string getParameterName ( int param ) #

Returns the name of the specified the specified animation parameter.

Arguments

  • int param - Animation parameter.

Return value

Animation parameter name.

int getParameterModifierType ( int param ) #

Returns the type of modifier used for the specified animation parameter.

Arguments

  • int param - Animation parameter.

Return value

Modifier type for the specified parameter.

int getParameterByName ( string param_name ) #

Returns an animation parameter by its name.

Arguments

  • string param_name - Animation parameter name.

Return value

Animation parameter with the specified name.

void convertToUanims ( string folder_path, Vector<String> playbacks ) #

Converts all track-files in the old Tracker format ( .track) from the specfied folder to the new animation formats (.utrack / .uplay).

Arguments

  • string folder_path - Path to the folder containing track-files in the old Tracker format ( .track) to be converted to the new track format (.utrack).
  • Vector<String> playbacks - List of Tracker animation tracks in old format ( .track) to be converted to the new playback format(.uplay).

void convertToUanims ( Vector<String> tracks, Vector<String> playbacks ) #

Converts the specified lists of tracks in the old Tracker format ( .track) to the new animation formats (.utrack / .uplay).

Arguments

  • Vector<String> tracks - List of Tracker animation tracks in old format ( .track) to be converted to the new track format (.utrack).
  • Vector<String> playbacks - List of Tracker animation tracks in old format ( .track) to be converted to the new playback format(.uplay).

void checkUtrackTypes ( ) #

Checks all old-style animation parameter types (used in the Tracker tool) versus their equivalents in the new Animation System and outputs them to the console. In case of unknown parameter types the corresponding message is displayed.

int animToBonesModifier ( string anim_path, AnimationModifierBones out_modifier, float duration ) #

Converts the specified mesh animation file (.anim) to a modifier for ObjectMeshSkinned bones ( AnimationModifierBones) and puts it to the specified AnimationModifierBones instance.

Arguments

  • string anim_path - Math to the mesh animation file (.anim) to be converted.
  • AnimationModifierBones out_modifier - Resulting animation modifier.
  • float duration - Target animation duration, in seconds.

Return value

1 if the specified mesh animation file was successfully converted; otherwise, 0.
Last update: 2024-02-06
Build: ()