This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Basics
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
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::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.
Header: #include <UnigineAnimation.h>

Animations Class

Enums

RESULT#

NameDescription
RESULT_TRACK_ERROR = 0A track-related error has occurred.
RESULT_NEW_TRACK_LOADED = 1A new animation track is loaded.
RESULT_TRACK_IS_ALREADY_LOADED = 2The animation track is already loaded.
RESULT_TRACK_RELOADED = 3The animation track is reloaded.
RESULT_TRACK_SAVED = 4The animation track is saved.
RESULT_TRACK_UNLOADED = 5The animation track is unloaded.
RESULT_PLAYBACK_ERROR = 6A playback-related error has occurred.
RESULT_NEW_PLAYBACK_LOADED = 7A new animation playback is loaded.
RESULT_PLAYBACK_IS_ALREADY_LOADED = 8The animation playback is already loaded.
RESULT_PLAYBACK_SAVED = 9The animation playback is saved.

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 Event<const Ptr<AnimationTrack> &> getEventTrackRemoved() const#

Event triggered when an animation track is removed. You can subscribe to events via connect()  and unsubscribe via disconnect(). You can also use EventConnection  and EventConnections  classes for convenience (see examples below).
Notice
For more details see the Event Handling article.
The event handler signature is as follows: myhandler(const Ptr<AnimationTrack> & anim_track)

Usage Example

Source code (C++)
// implement the TrackRemoved event handler
void trackremoved_event_handler(const Ptr<AnimationTrack> & anim_track)
{
	Log::message("\Handling TrackRemoved event\n");
}


//////////////////////////////////////////////////////////////////////////////
//  1. Multiple subscriptions can be linked to an instance of the EventConnections 
//  class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////

// create an instance of the EventConnections class
EventConnections trackremoved_event_connections;

// link to this instance when subscribing to an event (subscription to various events can be linked)
Animations::getEventTrackRemoved().connect(trackremoved_event_connections, trackremoved_event_handler);

// other subscriptions are also linked to this EventConnections instance 
// (e.g. you can subscribe using lambdas)
Animations::getEventTrackRemoved().connect(trackremoved_event_connections, [](const Ptr<AnimationTrack> & anim_track) { 
		Log::message("\Handling TrackRemoved event (lambda).\n");
	}
);

// ...

// later all of these linked subscriptions can be removed with a single line
trackremoved_event_connections.disconnectAll();

//////////////////////////////////////////////////////////////////////////////
//  2. You can subscribe and unsubscribe via an instance of the EventConnection 
//  class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////

// create an instance of the EventConnection class
EventConnection trackremoved_event_connection;

// subscribe to the TrackRemoved event with a handler function keeping the connection
Animations::getEventTrackRemoved().connect(trackremoved_event_connection, trackremoved_event_handler);

// ...

// you can temporarily disable a particular event connection to perform certain actions
trackremoved_event_connection.setEnabled(false);

// ... actions to be performed

// and enable it back when necessary
trackremoved_event_connection.setEnabled(true);

// ...

// remove subscription to the TrackRemoved event via the connection
trackremoved_event_connection.disconnect();

//////////////////////////////////////////////////////////////////////////////
//  3. You can add EventConnection/EventConnections instance as a member of the
//  class that handles the event. In this case all linked subscriptions will be 
//  automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////

// Class handling the event
class SomeClass
{
public:
	// instance of the EventConnections class as a class member
	EventConnections e_connections;

	// A TrackRemoved event handler implemented as a class member
	void event_handler(const Ptr<AnimationTrack> & anim_track)
	{
		Log::message("\Handling TrackRemoved event\n");
		// ...
	}
};

SomeClass *sc = new SomeClass();

// ...

// specify a class instance in case a handler method belongs to some class
Animations::getEventTrackRemoved().connect(sc->e_connections, sc, &SomeClass::event_handler);

// ...

// handler class instance is deleted with all its subscriptions removed automatically
delete sc;

//////////////////////////////////////////////////////////////////////////////
//  4. You can subscribe and unsubscribe via the handler function directly
//////////////////////////////////////////////////////////////////////////////

// subscribe to the TrackRemoved event with a handler function
Animations::getEventTrackRemoved().connect(trackremoved_event_handler);


// remove subscription to the TrackRemoved event later by the handler function
Animations::getEventTrackRemoved().disconnect(trackremoved_event_handler);


//////////////////////////////////////////////////////////////////////////////
//   5. Subscribe to an event saving an ID and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////

// define a connection ID to be used to unsubscribe later
EventConnectionId trackremoved_handler_id;

// subscribe to the TrackRemoved event with a lambda handler function and keeping connection ID
trackremoved_handler_id = Animations::getEventTrackRemoved().connect([](const Ptr<AnimationTrack> & anim_track) { 
		Log::message("\Handling TrackRemoved event (lambda).\n");
	}
);

// remove the subscription later using the ID
Animations::getEventTrackRemoved().disconnect(trackremoved_handler_id);


//////////////////////////////////////////////////////////////////////////////
//   6. Ignoring all TrackRemoved events when necessary
//////////////////////////////////////////////////////////////////////////////

// you can temporarily disable the event to perform certain actions without triggering it
Animations::getEventTrackRemoved().setEnabled(false);

// ... actions to be performed

// and enable it back when necessary
Animations::getEventTrackRemoved().setEnabled(true);

Return value

Event reference.

static Event<const Ptr<AnimationTrack> &> getEventTrackAdded() const#

Event triggered when a new animation track is added. You can subscribe to events via connect()  and unsubscribe via disconnect(). You can also use EventConnection  and EventConnections  classes for convenience (see examples below).
Notice
For more details see the Event Handling article.
The event handler signature is as follows: myhandler(const Ptr<AnimationTrack> & anim_track)

Usage Example

Source code (C++)
// implement the TrackAdded event handler
void trackadded_event_handler(const Ptr<AnimationTrack> & anim_track)
{
	Log::message("\Handling TrackAdded event\n");
}


//////////////////////////////////////////////////////////////////////////////
//  1. Multiple subscriptions can be linked to an instance of the EventConnections 
//  class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////

// create an instance of the EventConnections class
EventConnections trackadded_event_connections;

// link to this instance when subscribing to an event (subscription to various events can be linked)
Animations::getEventTrackAdded().connect(trackadded_event_connections, trackadded_event_handler);

// other subscriptions are also linked to this EventConnections instance 
// (e.g. you can subscribe using lambdas)
Animations::getEventTrackAdded().connect(trackadded_event_connections, [](const Ptr<AnimationTrack> & anim_track) { 
		Log::message("\Handling TrackAdded event (lambda).\n");
	}
);

// ...

// later all of these linked subscriptions can be removed with a single line
trackadded_event_connections.disconnectAll();

//////////////////////////////////////////////////////////////////////////////
//  2. You can subscribe and unsubscribe via an instance of the EventConnection 
//  class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////

// create an instance of the EventConnection class
EventConnection trackadded_event_connection;

// subscribe to the TrackAdded event with a handler function keeping the connection
Animations::getEventTrackAdded().connect(trackadded_event_connection, trackadded_event_handler);

// ...

// you can temporarily disable a particular event connection to perform certain actions
trackadded_event_connection.setEnabled(false);

// ... actions to be performed

// and enable it back when necessary
trackadded_event_connection.setEnabled(true);

// ...

// remove subscription to the TrackAdded event via the connection
trackadded_event_connection.disconnect();

//////////////////////////////////////////////////////////////////////////////
//  3. You can add EventConnection/EventConnections instance as a member of the
//  class that handles the event. In this case all linked subscriptions will be 
//  automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////

// Class handling the event
class SomeClass
{
public:
	// instance of the EventConnections class as a class member
	EventConnections e_connections;

	// A TrackAdded event handler implemented as a class member
	void event_handler(const Ptr<AnimationTrack> & anim_track)
	{
		Log::message("\Handling TrackAdded event\n");
		// ...
	}
};

SomeClass *sc = new SomeClass();

// ...

// specify a class instance in case a handler method belongs to some class
Animations::getEventTrackAdded().connect(sc->e_connections, sc, &SomeClass::event_handler);

// ...

// handler class instance is deleted with all its subscriptions removed automatically
delete sc;

//////////////////////////////////////////////////////////////////////////////
//  4. You can subscribe and unsubscribe via the handler function directly
//////////////////////////////////////////////////////////////////////////////

// subscribe to the TrackAdded event with a handler function
Animations::getEventTrackAdded().connect(trackadded_event_handler);


// remove subscription to the TrackAdded event later by the handler function
Animations::getEventTrackAdded().disconnect(trackadded_event_handler);


//////////////////////////////////////////////////////////////////////////////
//   5. Subscribe to an event saving an ID and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////

// define a connection ID to be used to unsubscribe later
EventConnectionId trackadded_handler_id;

// subscribe to the TrackAdded event with a lambda handler function and keeping connection ID
trackadded_handler_id = Animations::getEventTrackAdded().connect([](const Ptr<AnimationTrack> & anim_track) { 
		Log::message("\Handling TrackAdded event (lambda).\n");
	}
);

// remove the subscription later using the ID
Animations::getEventTrackAdded().disconnect(trackadded_handler_id);


//////////////////////////////////////////////////////////////////////////////
//   6. Ignoring all TrackAdded events when necessary
//////////////////////////////////////////////////////////////////////////////

// you can temporarily disable the event to perform certain actions without triggering it
Animations::getEventTrackAdded().setEnabled(false);

// ... actions to be performed

// and enable it back when necessary
Animations::getEventTrackAdded().setEnabled(true);

Return value

Event reference.

static Event<const Ptr<AnimationObject> &> getEventObjectRemoved() const#

Event triggered when an animation object is removed. You can subscribe to events via connect()  and unsubscribe via disconnect(). You can also use EventConnection  and EventConnections  classes for convenience (see examples below).
Notice
For more details see the Event Handling article.
The event handler signature is as follows: myhandler(const Ptr<AnimationObject> & anim_object)

Usage Example

Source code (C++)
// implement the ObjectRemoved event handler
void objectremoved_event_handler(const Ptr<AnimationObject> & anim_object)
{
	Log::message("\Handling ObjectRemoved event\n");
}


//////////////////////////////////////////////////////////////////////////////
//  1. Multiple subscriptions can be linked to an instance of the EventConnections 
//  class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////

// create an instance of the EventConnections class
EventConnections objectremoved_event_connections;

// link to this instance when subscribing to an event (subscription to various events can be linked)
Animations::getEventObjectRemoved().connect(objectremoved_event_connections, objectremoved_event_handler);

// other subscriptions are also linked to this EventConnections instance 
// (e.g. you can subscribe using lambdas)
Animations::getEventObjectRemoved().connect(objectremoved_event_connections, [](const Ptr<AnimationObject> & anim_object) { 
		Log::message("\Handling ObjectRemoved event (lambda).\n");
	}
);

// ...

// later all of these linked subscriptions can be removed with a single line
objectremoved_event_connections.disconnectAll();

//////////////////////////////////////////////////////////////////////////////
//  2. You can subscribe and unsubscribe via an instance of the EventConnection 
//  class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////

// create an instance of the EventConnection class
EventConnection objectremoved_event_connection;

// subscribe to the ObjectRemoved event with a handler function keeping the connection
Animations::getEventObjectRemoved().connect(objectremoved_event_connection, objectremoved_event_handler);

// ...

// you can temporarily disable a particular event connection to perform certain actions
objectremoved_event_connection.setEnabled(false);

// ... actions to be performed

// and enable it back when necessary
objectremoved_event_connection.setEnabled(true);

// ...

// remove subscription to the ObjectRemoved event via the connection
objectremoved_event_connection.disconnect();

//////////////////////////////////////////////////////////////////////////////
//  3. You can add EventConnection/EventConnections instance as a member of the
//  class that handles the event. In this case all linked subscriptions will be 
//  automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////

// Class handling the event
class SomeClass
{
public:
	// instance of the EventConnections class as a class member
	EventConnections e_connections;

	// A ObjectRemoved event handler implemented as a class member
	void event_handler(const Ptr<AnimationObject> & anim_object)
	{
		Log::message("\Handling ObjectRemoved event\n");
		// ...
	}
};

SomeClass *sc = new SomeClass();

// ...

// specify a class instance in case a handler method belongs to some class
Animations::getEventObjectRemoved().connect(sc->e_connections, sc, &SomeClass::event_handler);

// ...

// handler class instance is deleted with all its subscriptions removed automatically
delete sc;

//////////////////////////////////////////////////////////////////////////////
//  4. You can subscribe and unsubscribe via the handler function directly
//////////////////////////////////////////////////////////////////////////////

// subscribe to the ObjectRemoved event with a handler function
Animations::getEventObjectRemoved().connect(objectremoved_event_handler);


// remove subscription to the ObjectRemoved event later by the handler function
Animations::getEventObjectRemoved().disconnect(objectremoved_event_handler);


//////////////////////////////////////////////////////////////////////////////
//   5. Subscribe to an event saving an ID and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////

// define a connection ID to be used to unsubscribe later
EventConnectionId objectremoved_handler_id;

// subscribe to the ObjectRemoved event with a lambda handler function and keeping connection ID
objectremoved_handler_id = Animations::getEventObjectRemoved().connect([](const Ptr<AnimationObject> & anim_object) { 
		Log::message("\Handling ObjectRemoved event (lambda).\n");
	}
);

// remove the subscription later using the ID
Animations::getEventObjectRemoved().disconnect(objectremoved_handler_id);


//////////////////////////////////////////////////////////////////////////////
//   6. Ignoring all ObjectRemoved events when necessary
//////////////////////////////////////////////////////////////////////////////

// you can temporarily disable the event to perform certain actions without triggering it
Animations::getEventObjectRemoved().setEnabled(false);

// ... actions to be performed

// and enable it back when necessary
Animations::getEventObjectRemoved().setEnabled(true);

Return value

Event reference.

static Event<const Ptr<AnimationObject> &> getEventObjectAdded() const#

Event triggered when a new animation object is added. You can subscribe to events via connect()  and unsubscribe via disconnect(). You can also use EventConnection  and EventConnections  classes for convenience (see examples below).
Notice
For more details see the Event Handling article.
The event handler signature is as follows: myhandler(const Ptr<AnimationObject> & anim_object)

Usage Example

Source code (C++)
// implement the ObjectAdded event handler
void objectadded_event_handler(const Ptr<AnimationObject> & anim_object)
{
	Log::message("\Handling ObjectAdded event\n");
}


//////////////////////////////////////////////////////////////////////////////
//  1. Multiple subscriptions can be linked to an instance of the EventConnections 
//  class that you can use later to remove all these subscriptions at once
//////////////////////////////////////////////////////////////////////////////

// create an instance of the EventConnections class
EventConnections objectadded_event_connections;

// link to this instance when subscribing to an event (subscription to various events can be linked)
Animations::getEventObjectAdded().connect(objectadded_event_connections, objectadded_event_handler);

// other subscriptions are also linked to this EventConnections instance 
// (e.g. you can subscribe using lambdas)
Animations::getEventObjectAdded().connect(objectadded_event_connections, [](const Ptr<AnimationObject> & anim_object) { 
		Log::message("\Handling ObjectAdded event (lambda).\n");
	}
);

// ...

// later all of these linked subscriptions can be removed with a single line
objectadded_event_connections.disconnectAll();

//////////////////////////////////////////////////////////////////////////////
//  2. You can subscribe and unsubscribe via an instance of the EventConnection 
//  class. And toggle this particular connection off and on, when necessary.
//////////////////////////////////////////////////////////////////////////////

// create an instance of the EventConnection class
EventConnection objectadded_event_connection;

// subscribe to the ObjectAdded event with a handler function keeping the connection
Animations::getEventObjectAdded().connect(objectadded_event_connection, objectadded_event_handler);

// ...

// you can temporarily disable a particular event connection to perform certain actions
objectadded_event_connection.setEnabled(false);

// ... actions to be performed

// and enable it back when necessary
objectadded_event_connection.setEnabled(true);

// ...

// remove subscription to the ObjectAdded event via the connection
objectadded_event_connection.disconnect();

//////////////////////////////////////////////////////////////////////////////
//  3. You can add EventConnection/EventConnections instance as a member of the
//  class that handles the event. In this case all linked subscriptions will be 
//  automatically removed when class destructor is called
//////////////////////////////////////////////////////////////////////////////

// Class handling the event
class SomeClass
{
public:
	// instance of the EventConnections class as a class member
	EventConnections e_connections;

	// A ObjectAdded event handler implemented as a class member
	void event_handler(const Ptr<AnimationObject> & anim_object)
	{
		Log::message("\Handling ObjectAdded event\n");
		// ...
	}
};

SomeClass *sc = new SomeClass();

// ...

// specify a class instance in case a handler method belongs to some class
Animations::getEventObjectAdded().connect(sc->e_connections, sc, &SomeClass::event_handler);

// ...

// handler class instance is deleted with all its subscriptions removed automatically
delete sc;

//////////////////////////////////////////////////////////////////////////////
//  4. You can subscribe and unsubscribe via the handler function directly
//////////////////////////////////////////////////////////////////////////////

// subscribe to the ObjectAdded event with a handler function
Animations::getEventObjectAdded().connect(objectadded_event_handler);


// remove subscription to the ObjectAdded event later by the handler function
Animations::getEventObjectAdded().disconnect(objectadded_event_handler);


//////////////////////////////////////////////////////////////////////////////
//   5. Subscribe to an event saving an ID and unsubscribe later by this ID
//////////////////////////////////////////////////////////////////////////////

// define a connection ID to be used to unsubscribe later
EventConnectionId objectadded_handler_id;

// subscribe to the ObjectAdded event with a lambda handler function and keeping connection ID
objectadded_handler_id = Animations::getEventObjectAdded().connect([](const Ptr<AnimationObject> & anim_object) { 
		Log::message("\Handling ObjectAdded event (lambda).\n");
	}
);

// remove the subscription later using the ID
Animations::getEventObjectAdded().disconnect(objectadded_handler_id);


//////////////////////////////////////////////////////////////////////////////
//   6. Ignoring all ObjectAdded events when necessary
//////////////////////////////////////////////////////////////////////////////

// you can temporarily disable the event to perform certain actions without triggering it
Animations::getEventObjectAdded().setEnabled(false);

// ... actions to be performed

// and enable it back when necessary
Animations::getEventObjectAdded().setEnabled(true);

Return value

Event reference.

Ptr<AnimationObject> getObjectByIndex ( int index ) const#

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

Ptr<AnimationObject> getObjectByID ( int id ) const#

Returns an animation object by its ID.

Arguments

  • int id - Animation object ID.

Return value

Animation object with the specified ID.

bool containsObject ( int id ) const#

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

Arguments

  • int id - Animation object ID.

Return value

true if the animation object with the specified ID exists; otherwise, false.

int getObjectIndex ( const Ptr<AnimationObject> & obj ) const#

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

Arguments

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.

Animations::RESULT loadTrack ( const char * path ) #

Loads an animation track from the specified file path.

Arguments

  • const char * path - Path to the source track file (.utrack).

Return value

Result of loading operation.

Animations::RESULT reloadTrack ( const char * path ) #

Reloads an animation track from the specified file path.

Arguments

  • const char * path - Path to the source track file (.utrack).

Return value

Result of reloading operation.

Animations::RESULT saveTrack ( const Ptr<AnimationTrack> & track, const char * path ) #

Saves the specified animation track to the specified file path.

Arguments

  • const Ptr<AnimationTrack> & track - Animation track to be saved.
  • const char * path - Path to which the specified animation track is to be saved.

Return value

Result of saving operation.

Animations::RESULT saveTrackPrecomputed ( const Ptr<AnimationTrack> & track, int num_frames, bool is_looped_frames, const char * path ) #

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

Arguments

  • const Ptr<AnimationTrack> & track - Animation track to be saved.
  • int num_frames - Number of frames to be saved.
  • bool is_looped_frames - Set true if the animation track should be looped; otherwise, false.
  • const char * path - Path to which the specified animation track is to be saved.

Return value

Result of saving operation.

Ptr<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.

Ptr<AnimationTrack> getTrackByGUID ( const UGUID & guid ) #

Returns an animation track by its GUID.

Arguments

  • const UGUID & guid - GUID of the animation track.

Return value

Animation track with the specified GUID.

Ptr<AnimationTrack> getTrackByFileGUID ( const UGUID & guid ) #

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

Arguments

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

Return value

Animation track with the specified file GUID.

Ptr<AnimationTrack> getTrackByPath ( const char * path ) #

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

Arguments

  • const char * path - Path to the animation track file (.utrack).

Return value

Animation track with the specified file GUID.

bool containsTrack ( const UGUID & guid ) #

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

Arguments

  • const UGUID & guid - GUID of the animation track.

Return value

true if the animation track with the specified GUID exists; otherwise, false.

int getTrackIndex ( const Ptr<AnimationTrack> & track ) #

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

Arguments

  • const Ptr<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.

Animations::RESULT loadPlayback ( const char * path ) #

Loads an animation playback from the specified file path.

Arguments

  • const char * path - Path to the source animation playback file (.uplay).

Return value

Result of loading operation.

Animations::RESULT savePlayback ( const Ptr<AnimationPlayback> & playback, const char * path ) #

Saves the specified animation playback to the specified file path.

Arguments

  • const Ptr<AnimationPlayback> & playback - Animation playback to be saved.
  • const char * path - Path to which the specified animation playback is to be saved.

Return value

Result of saving operation.

Ptr<AnimationPlayback> getPlaybackByIndex ( int index ) const#

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.

Ptr<AnimationPlayback> getPlaybackByGUID ( const UGUID & guid ) const#

Returns an animation playback by its GUID.

Arguments

  • const UGUID & guid - GUID of the animation playback.

Return value

Animation playback with the specified GUID.

Ptr<AnimationPlayback> getPlaybackByFileGUID ( const UGUID & guid ) const#

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

Arguments

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

Return value

Animation track with the specified file GUID.

Ptr<AnimationPlayback> getPlaybackByPath ( const char * path ) const#

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

Arguments

  • const char * path - Path to the animation playback file (.uplay).

Return value

Animation playback with the specified file GUID.

bool containsPlayback ( const UGUID & guid ) const#

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

Arguments

  • const UGUID & guid - GUID of the animation playback.

Return value

true if the animation playback with the specified GUID exists; otherwise, false.

int getPlaybackIndex ( const Ptr<AnimationPlayback> & playback ) const#

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.

const char * getParentClass ( const char * class_name ) const#

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

Arguments

  • const char * class_name - Name of the class for which the parent class is to be found.

Return value

Name of the parent class.

int getDerivedClasses ( const char * class_name, Vector<String> & OUT_out_classes ) const#

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

Arguments

  • const char * 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 ( const char * class_name, Vector<int> & OUT_out_parameters ) const#

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

Arguments

  • const char * 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.

const char * getParameterName ( AnimParams::PARAM param ) const#

Returns the name of the specified the specified animation parameter.

Arguments

  • AnimParams::PARAM param - Animation parameter.

Return value

Animation parameter name.

AnimationModifier::TYPE getParameterModifierType ( AnimParams::PARAM param ) const#

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

Arguments

  • AnimParams::PARAM param - Animation parameter.

Return value

Modifier type for the specified parameter.

AnimParams::PARAM getParameterByName ( const char * param_name ) const#

Returns an animation parameter by its name.

Arguments

  • const char * param_name - Animation parameter name.

Return value

Animation parameter with the specified name.

void convertToUanims ( const char * folder_path, const 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

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

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

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

Arguments

  • const Vector<String> & tracks - List of Tracker animation tracks in old format ( .track) to be converted to the new track format (.utrack).
  • const 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.

bool animToBonesModifier ( const char * anim_path, const Ptr<AnimationModifierBones> & out_modifier, float duration ) const#

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

Arguments

  • const char * anim_path - Math to the mesh animation file (.anim) to be converted.
  • const Ptr<AnimationModifierBones> & out_modifier - Resulting animation modifier.
  • float duration - Target animation duration, in seconds.

Return value

true if the specified mesh animation file was successfully converted; otherwise, false.
Last update: 2024-04-19
Build: ()