Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
CommandSystem::SelectionList Class Reference

#include <SelectionList.h>

Inherits EMotionFX::ActorNotificationBus::Handler, and EMotionFX::ActorInstanceNotificationBus::Handler.

Public Member Functions

 SelectionList ()
 
 ~SelectionList ()
 
MCORE_INLINE size_t GetNumSelectedNodes () const
 
MCORE_INLINE size_t GetNumSelectedActors () const
 
MCORE_INLINE size_t GetNumSelectedActorInstances () const
 
MCORE_INLINE size_t GetNumSelectedMotionInstances () const
 
MCORE_INLINE size_t GetNumSelectedMotions () const
 
MCORE_INLINE size_t GetNumSelectedAnimGraphs () const
 
MCORE_INLINE size_t GetNumTotalItems () const
 
bool GetIsEmpty () const
 
void Clear ()
 
void AddNode (EMotionFX::Node *node)
 
void AddActor (EMotionFX::Actor *actor)
 
void AddActorInstance (EMotionFX::ActorInstance *actorInstance)
 
void AddMotion (EMotionFX::Motion *motion)
 
void AddMotionInstance (EMotionFX::MotionInstance *motionInstance)
 
void AddAnimGraph (EMotionFX::AnimGraph *animGraph)
 
void Add (SelectionList &selection)
 
MCORE_INLINE EMotionFX::NodeGetNode (size_t index) const
 
MCORE_INLINE EMotionFX::NodeGetFirstNode () const
 
MCORE_INLINE EMotionFX::ActorGetActor (size_t index) const
 
MCORE_INLINE EMotionFX::ActorGetFirstActor () const
 
MCORE_INLINE EMotionFX::ActorInstanceGetActorInstance (size_t index) const
 
MCORE_INLINE EMotionFX::ActorInstanceGetFirstActorInstance () const
 
MCORE_INLINE EMotionFX::AnimGraphGetAnimGraph (size_t index) const
 
MCORE_INLINE EMotionFX::AnimGraphGetFirstAnimGraph () const
 
EMotionFX::ActorGetSingleActor () const
 
EMotionFX::ActorInstanceGetSingleActorInstance () const
 
MCORE_INLINE EMotionFX::MotionGetMotion (size_t index) const
 
MCORE_INLINE EMotionFX::MotionGetFirstMotion () const
 
EMotionFX::MotionGetSingleMotion () const
 
MCORE_INLINE EMotionFX::MotionInstanceGetMotionInstance (size_t index) const
 
MCORE_INLINE EMotionFX::MotionInstanceGetFirstMotionInstance () const
 
MCORE_INLINE void RemoveNode (size_t index)
 
MCORE_INLINE void RemoveActor (size_t index)
 
MCORE_INLINE void RemoveActorInstance (size_t index)
 
MCORE_INLINE void RemoveMotion (size_t index)
 
MCORE_INLINE void RemoveMotionInstance (size_t index)
 
MCORE_INLINE void RemoveAnimGraph (size_t index)
 
void RemoveNode (EMotionFX::Node *node)
 
void RemoveActor (EMotionFX::Actor *actor)
 
void RemoveActorInstance (EMotionFX::ActorInstance *actorInstance)
 
void RemoveMotion (EMotionFX::Motion *motion)
 
void RemoveMotionInstance (EMotionFX::MotionInstance *motionInstance)
 
void RemoveAnimGraph (EMotionFX::AnimGraph *animGraph)
 
MCORE_INLINE bool CheckIfHasNode (EMotionFX::Node *node) const
 
MCORE_INLINE bool CheckIfHasActor (EMotionFX::Actor *actor) const
 
MCORE_INLINE bool CheckIfHasActorInstance (EMotionFX::ActorInstance *actorInstance) const
 
MCORE_INLINE bool CheckIfHasMotion (EMotionFX::Motion *motion) const
 
MCORE_INLINE bool CheckIfHasAnimGraph (EMotionFX::AnimGraph *animGraph) const
 
MCORE_INLINE bool CheckIfHasMotionInstance (EMotionFX::MotionInstance *motionInstance) const
 
MCORE_INLINE void ClearActorSelection ()
 
MCORE_INLINE void ClearActorInstanceSelection ()
 
MCORE_INLINE void ClearNodeSelection ()
 
MCORE_INLINE void ClearMotionSelection ()
 
MCORE_INLINE void ClearMotionInstanceSelection ()
 
MCORE_INLINE void ClearAnimGraphSelection ()
 
void Log ()
 
void MakeValid ()
 
const AZStd::vector< EMotionFX::MotionInstance * > & GetSelectedMotionInstances ()
 Collect all motion instances of selected motions played on any of the selected actor instances.
 

Detailed Description

A selection list stores links to objects which are selected at a specific time stamp in a scene.

Constructor & Destructor Documentation

◆ SelectionList()

CommandSystem::SelectionList::SelectionList ( )

The default constructor. Creates an empty selection list.

◆ ~SelectionList()

CommandSystem::SelectionList::~SelectionList ( )

The destructor.

Member Function Documentation

◆ Add()

void CommandSystem::SelectionList::Add ( SelectionList selection)

Add a complete selection list to this one. Select motionobjects without replacing the old selection.

Parameters
selectionThe selection list which will be added to the selection.

◆ AddActor()

void CommandSystem::SelectionList::AddActor ( EMotionFX::Actor actor)

Add actor

◆ AddActorInstance()

void CommandSystem::SelectionList::AddActorInstance ( EMotionFX::ActorInstance actorInstance)

Add an actor instance to the selection list. Select actor instance without replacing the old selection.

Parameters
actorInstanceThe actor which will be added to the selection.

◆ AddAnimGraph()

void CommandSystem::SelectionList::AddAnimGraph ( EMotionFX::AnimGraph animGraph)

Add an anim graph to the selection list. Selects anim graph without replacing the old selection.

Parameters
animGraphThe anim graph which will be added to the selection.

◆ AddMotion()

void CommandSystem::SelectionList::AddMotion ( EMotionFX::Motion motion)

Add a motion to the selection list. Select motion without replacing the old selection.

Parameters
motionThe motion which will be added to the selection.

◆ AddMotionInstance()

void CommandSystem::SelectionList::AddMotionInstance ( EMotionFX::MotionInstance motionInstance)

Add a motion instance to the selection list. Select motion instance without replacing the old selection.

Parameters
motionThe motion instance which will be added to the selection.

◆ AddNode()

void CommandSystem::SelectionList::AddNode ( EMotionFX::Node node)

Add a node to the selection list. Select node without replacing the old selection.

Parameters
nodeThe node which will be added to the selection.

◆ CheckIfHasActor()

MCORE_INLINE bool CommandSystem::SelectionList::CheckIfHasActor ( EMotionFX::Actor actor) const
inline

Has actor

◆ CheckIfHasActorInstance()

MCORE_INLINE bool CommandSystem::SelectionList::CheckIfHasActorInstance ( EMotionFX::ActorInstance actorInstance) const
inline

Check if a given actor instance is selected / is in this selection list.

Parameters
nodeA pointer to the actor instance to be checked.
Returns
True if the actor instance is inside this selection list, false if not.

◆ CheckIfHasAnimGraph()

MCORE_INLINE bool CommandSystem::SelectionList::CheckIfHasAnimGraph ( EMotionFX::AnimGraph animGraph) const
inline

Check if a given anim graph is in this selection list.

Parameters
animGraphThe anim graph to check for.
Returns
True if the anim graph is selected inside the selection list, otherwise false is returned.

◆ CheckIfHasMotion()

MCORE_INLINE bool CommandSystem::SelectionList::CheckIfHasMotion ( EMotionFX::Motion motion) const
inline

Check if a given motion is selected / is in this selection list.

Parameters
nodeA pointer to the motion to be checked.
Returns
True if the motion is inside this selection list, false if not.

◆ CheckIfHasMotionInstance()

MCORE_INLINE bool CommandSystem::SelectionList::CheckIfHasMotionInstance ( EMotionFX::MotionInstance motionInstance) const
inline

Check if a given motion instance is selected / is in this selection list.

Parameters
nodeA pointer to the motion instance to be checked.
Returns
True if the motion instance is inside this selection list, false if not.

◆ CheckIfHasNode()

MCORE_INLINE bool CommandSystem::SelectionList::CheckIfHasNode ( EMotionFX::Node node) const
inline

Check if a given node is selected / is in this selection list.

Parameters
nodeA pointer to the node to be checked.
Returns
True if the node is inside this selection list, false if not.

◆ Clear()

void CommandSystem::SelectionList::Clear ( )

Clear the selection list. This will unselect all objects.

◆ GetActor()

MCORE_INLINE EMotionFX::Actor * CommandSystem::SelectionList::GetActor ( size_t  index) const
inline

Get the given actor from the selection list.

Parameters
indexThe index of the actor to get from the selection list.
Returns
A pointer to the given actor from the selection list.

◆ GetActorInstance()

MCORE_INLINE EMotionFX::ActorInstance * CommandSystem::SelectionList::GetActorInstance ( size_t  index) const
inline

Get the given actor instance from the selection list.

Parameters
indexThe index of the actor instance to get from the selection list.
Returns
A pointer to the given actor instance from the selection list.

◆ GetAnimGraph()

MCORE_INLINE EMotionFX::AnimGraph * CommandSystem::SelectionList::GetAnimGraph ( size_t  index) const
inline

Get the given anim graph from the selection list.

Parameters
indexThe index of the anim graph to get from the selection list.
Returns
A pointer to the given anim graph from the selection list.

◆ GetFirstActor()

MCORE_INLINE EMotionFX::Actor * CommandSystem::SelectionList::GetFirstActor ( ) const
inline

Get the first actor from the selection list.

Returns
A pointer to the first actor from the selection list. nullptr is there is no actor selected.

◆ GetFirstActorInstance()

MCORE_INLINE EMotionFX::ActorInstance * CommandSystem::SelectionList::GetFirstActorInstance ( ) const
inline

Get the first actor instance from the selection list.

Returns
A pointer to the first actor instance from the selection list. nullptr if there is no actor instance selected.

◆ GetFirstAnimGraph()

MCORE_INLINE EMotionFX::AnimGraph * CommandSystem::SelectionList::GetFirstAnimGraph ( ) const
inline

Get the first anim graph from the selection list.

Returns
A pointer to the first anim graph from the selection list. nullptr if there is no anim graph selected.

◆ GetFirstMotion()

MCORE_INLINE EMotionFX::Motion * CommandSystem::SelectionList::GetFirstMotion ( ) const
inline

Get the first motion from the selection list.

Returns
A pointer to the first motion from the selection list. nullptr is there is no motion selected.

◆ GetFirstMotionInstance()

MCORE_INLINE EMotionFX::MotionInstance * CommandSystem::SelectionList::GetFirstMotionInstance ( ) const
inline

Get the first motion instance from the selection list.

Returns
A pointer to the first motion instance from the selection list. nullptr is there is no motion instance selected.

◆ GetFirstNode()

MCORE_INLINE EMotionFX::Node * CommandSystem::SelectionList::GetFirstNode ( ) const
inline

Get the first node from the selection list.

Returns
A pointer to the first node from the selection list. nullptr is there is no node selected.

◆ GetIsEmpty()

bool CommandSystem::SelectionList::GetIsEmpty ( ) const

Check whether or not the selection list contains any objects.

Returns
True if the selection list is empty / if there are no selected objects, false if not.

◆ GetMotion()

MCORE_INLINE EMotionFX::Motion * CommandSystem::SelectionList::GetMotion ( size_t  index) const
inline

Get the given motion from the selection list.

Parameters
indexThe index of the motion to get from the selection list.
Returns
A pointer to the given motion from the selection list.

◆ GetMotionInstance()

MCORE_INLINE EMotionFX::MotionInstance * CommandSystem::SelectionList::GetMotionInstance ( size_t  index) const
inline

Get the given motion instance from the selection list.

Parameters
indexThe index of the motion instance to get from the selection list.
Returns
A pointer to the given motion instance from the selection list.

◆ GetNode()

MCORE_INLINE EMotionFX::Node * CommandSystem::SelectionList::GetNode ( size_t  index) const
inline

Get the given node from the selection list.

Parameters
indexThe index of the node to get from the selection list.
Returns
A pointer to the given node from the selection list.

◆ GetNumSelectedActorInstances()

MCORE_INLINE size_t CommandSystem::SelectionList::GetNumSelectedActorInstances ( ) const
inline

Get the number of selected actor instances.

Returns
The number of selected actor instances.

◆ GetNumSelectedActors()

MCORE_INLINE size_t CommandSystem::SelectionList::GetNumSelectedActors ( ) const
inline

Get the number of selected actors

◆ GetNumSelectedAnimGraphs()

MCORE_INLINE size_t CommandSystem::SelectionList::GetNumSelectedAnimGraphs ( ) const
inline

Get the number of selected anim graphs.

Returns
The number of selected anim graphs.

◆ GetNumSelectedMotionInstances()

MCORE_INLINE size_t CommandSystem::SelectionList::GetNumSelectedMotionInstances ( ) const
inline

Get the number of selected motion instances.

Returns
The number of selected motion instances.

◆ GetNumSelectedMotions()

MCORE_INLINE size_t CommandSystem::SelectionList::GetNumSelectedMotions ( ) const
inline

Get the number of selected motions.

Returns
The number of selected motions.

◆ GetNumSelectedNodes()

MCORE_INLINE size_t CommandSystem::SelectionList::GetNumSelectedNodes ( ) const
inline

Get the number of selected nodes.

Returns
The number of selected nodes.

◆ GetNumTotalItems()

MCORE_INLINE size_t CommandSystem::SelectionList::GetNumTotalItems ( ) const

Get the total number of selected objects.

Returns
The number of selected nodes, actors and motions.

◆ GetSingleActor()

EMotionFX::Actor * CommandSystem::SelectionList::GetSingleActor ( ) const

Get the single selected actor.

Returns
A pointer to the only selected actor. nullptr is there if no actor selected at all or if there are multiple, so more than one, actor instances selected.

◆ GetSingleActorInstance()

EMotionFX::ActorInstance * CommandSystem::SelectionList::GetSingleActorInstance ( ) const

Get the single selected actor instance.

Returns
A pointer to the only selected actor instance. nullptr is there if no actor instance selected at all or if there are multiple, so more than one, actor instances selected.

◆ GetSingleMotion()

EMotionFX::Motion * CommandSystem::SelectionList::GetSingleMotion ( ) const

Get the single selected motion.

Returns
A pointer to the only selected motion. nullptr is there if no motion selected at all or if there are multiple, so more than one, motions selected.

◆ RemoveActor() [1/2]

void CommandSystem::SelectionList::RemoveActor ( EMotionFX::Actor actor)

Remove the given actor instance from the selection list.

Parameters
actorInstanceThe actor instance to be removed from the selection list.

◆ RemoveActor() [2/2]

MCORE_INLINE void CommandSystem::SelectionList::RemoveActor ( size_t  index)
inline

Remove the given actor instance from the selection list.

Parameters
indexThe index of the actor instance to be removed from the selection list.

◆ RemoveActorInstance() [1/2]

void CommandSystem::SelectionList::RemoveActorInstance ( EMotionFX::ActorInstance actorInstance)

Remove the given actor instance from the selection list.

Parameters
actorInstanceThe actor instance to be removed from the selection list.

◆ RemoveActorInstance() [2/2]

MCORE_INLINE void CommandSystem::SelectionList::RemoveActorInstance ( size_t  index)
inline

Remove the given actor instance from the selection list.

Parameters
indexThe index of the actor instance to be removed from the selection list.

◆ RemoveAnimGraph() [1/2]

void CommandSystem::SelectionList::RemoveAnimGraph ( EMotionFX::AnimGraph animGraph)

Remove the given anim graph from the selection list.

Parameters
animGraphThe anim graph to be removed from the list.

◆ RemoveAnimGraph() [2/2]

MCORE_INLINE void CommandSystem::SelectionList::RemoveAnimGraph ( size_t  index)
inline

Remove the given anim graph from the selection list.

Parameters
indexThe index of the anim graph to remove from the selection list.

◆ RemoveMotion() [1/2]

void CommandSystem::SelectionList::RemoveMotion ( EMotionFX::Motion motion)

Remove the given motion from the selection list.

Parameters
motionThe motion to be removed from the selection list.

◆ RemoveMotion() [2/2]

MCORE_INLINE void CommandSystem::SelectionList::RemoveMotion ( size_t  index)
inline

Remove the given motion from the selection list.

Parameters
indexThe index of the motion to be removed from the selection list.

◆ RemoveMotionInstance() [1/2]

void CommandSystem::SelectionList::RemoveMotionInstance ( EMotionFX::MotionInstance motionInstance)

Remove the given motion instance from the selection list.

Parameters
motionInstanceThe motion instance to be removed from the selection list.

◆ RemoveMotionInstance() [2/2]

MCORE_INLINE void CommandSystem::SelectionList::RemoveMotionInstance ( size_t  index)
inline

Remove the given motion instance from the selection list.

Parameters
indexThe index of the motion instance to be removed from the selection list.

◆ RemoveNode() [1/2]

void CommandSystem::SelectionList::RemoveNode ( EMotionFX::Node node)

Remove the given node from the selection list.

Parameters
nodeThe node to be removed from the selection list.

◆ RemoveNode() [2/2]

MCORE_INLINE void CommandSystem::SelectionList::RemoveNode ( size_t  index)
inline

Remove the given node from the selection list.

Parameters
indexThe index of the node to be removed from the selection list.

The documentation for this class was generated from the following file: