Classes | |
struct | Statistics |
Public Member Functions | |
void | RecursiveReinit () |
bool | InitAfterLoading () |
void | RecursiveInvalidateUniqueDatas () |
Recursive invalidate unique data for all corresponding anim graph instances. | |
const char * | GetFileName () const |
const AZStd::string & | GetFileNameString () const |
void | SetFileName (const char *fileName) |
AnimGraphStateMachine * | GetRootStateMachine () const |
void | SetRootStateMachine (AnimGraphStateMachine *stateMachine) |
AnimGraphNode * | RecursiveFindNodeByName (const char *nodeName) const |
bool | IsNodeNameUnique (const AZStd::string &newNameCandidate, const AnimGraphNode *forNode) const |
AnimGraphNode * | RecursiveFindNodeById (AnimGraphNodeId nodeId) const |
AnimGraphStateTransition * | RecursiveFindTransitionById (AnimGraphConnectionId transitionId) const |
void | RecursiveCollectNodesOfType (const AZ::TypeId &nodeType, AZStd::vector< AnimGraphNode * > *outNodes) const |
void | RecursiveCollectTransitionConditionsOfType (const AZ::TypeId &conditionType, AZStd::vector< AnimGraphTransitionCondition * > *outConditions) const |
void | RecursiveCollectObjectsOfType (const AZ::TypeId &objectType, AZStd::vector< AnimGraphObject * > &outObjects) |
void | RecursiveCollectObjectsAffectedBy (AnimGraph *animGraph, AZStd::vector< AnimGraphObject * > &outObjects) |
size_t | RecursiveCalcNumNodes () const |
void | RecursiveCalcStatistics (Statistics &outStatistics) const |
size_t | RecursiveCalcNumNodeConnections () const |
AZStd::string | GenerateNodeName (const AZStd::unordered_set< AZStd::string > &nameReserveList, const char *prefix="Node") const |
size_t | GetNumParameters () const |
size_t | GetNumValueParameters () const |
const Parameter * | FindParameter (size_t index) const |
const ValueParameter * | FindValueParameter (size_t index) const |
GroupParameterVector | RecursivelyGetGroupParameters () const |
const ValueParameterVector & | RecursivelyGetValueParameters () const |
const ParameterVector & | GetChildParameters () const |
ValueParameterVector | GetChildValueParameters () const |
const Parameter * | FindParameterByName (const AZStd::string ¶mName) const |
const ValueParameter * | FindValueParameterByName (const AZStd::string ¶mName) const |
GroupParameter * | FindGroupParameterByName (const AZStd::string &groupName) const |
const GroupParameter * | FindParentGroupParameter (const Parameter *parameter) const |
AZ::Outcome< size_t > | FindParameterIndexByName (const AZStd::string ¶mName) const |
AZ::Outcome< size_t > | FindValueParameterIndexByName (const AZStd::string ¶mName) const |
AZ::Outcome< size_t > | FindParameterIndex (Parameter *parameter) const |
AZ::Outcome< size_t > | FindParameterIndex (const Parameter *parameter) const |
AZ::Outcome< size_t > | FindValueParameterIndex (const ValueParameter *parameter) const |
AZ::Outcome< size_t > | FindRelativeParameterIndex (const Parameter *parameter) const |
bool | AddParameter (Parameter *parameter, const GroupParameter *parent=nullptr) |
bool | InsertParameter (size_t index, Parameter *parameter, const GroupParameter *parent=nullptr) |
bool | RenameParameter (Parameter *parameter, const AZStd::string &newName) |
bool | RemoveParameter (Parameter *parameter) |
bool | TakeParameterFromParent (const Parameter *parameter) |
uint32 | GetID () const |
void | SetID (uint32 id) |
void | SetDirtyFlag (bool dirty) |
bool | GetDirtyFlag () const |
void | SetAutoUnregister (bool enabled) |
bool | GetAutoUnregister () const |
void | SetIsOwnedByRuntime (bool isOwnedByRuntime) |
bool | GetIsOwnedByRuntime () const |
void | SetIsOwnedByAsset (bool isOwnedByAsset) |
bool | GetIsOwnedByAsset () const |
size_t | GetNumNodeGroups () const |
AnimGraphNodeGroup * | GetNodeGroup (size_t index) const |
AnimGraphNodeGroup * | FindNodeGroupByName (const char *groupName) const |
size_t | FindNodeGroupIndexByName (const char *groupName) const |
void | AddNodeGroup (AnimGraphNodeGroup *nodeGroup) |
void | RemoveNodeGroup (size_t index, bool delFromMem=true) |
void | RemoveAllNodeGroups (bool delFromMem=true) |
AnimGraphNodeGroup * | FindNodeGroupForNode (AnimGraphNode *animGraphNode) const |
void | FindAndRemoveCycles (AZStd::string *outRemovedConnectionsMessage=nullptr) |
bool | GetRetargetingEnabled () const |
void | SetRetargetingEnabled (bool enabled) |
void | RemoveAllObjectData (AnimGraphObject *object, bool delFromMem) |
void | AddObject (AnimGraphObject *object) |
void | RemoveObject (AnimGraphObject *object) |
size_t | GetNumObjects () const |
AnimGraphObject * | GetObject (size_t index) const |
void | ReserveNumObjects (size_t numObjects) |
size_t | GetNumNodes () const |
AnimGraphNode * | GetNode (size_t index) const |
void | ReserveNumNodes (size_t numNodes) |
size_t | CalcNumMotionNodes () const |
size_t | GetNumAnimGraphInstances () const |
AnimGraphInstance * | GetAnimGraphInstance (size_t index) const |
void | ReserveNumAnimGraphInstances (size_t numInstances) |
void | AddAnimGraphInstance (AnimGraphInstance *animGraphInstance) |
void | RemoveAnimGraphInstance (AnimGraphInstance *animGraphInstance) |
void | Lock () |
void | Unlock () |
bool | SaveToFile (const AZStd::string &filename, AZ::SerializeContext *context) const |
void | RemoveInvalidConnections (bool logWarnings=false) |
Static Public Member Functions | |
static AZ_CLASS_ALLOCATOR_DECL AZ::Color | RandomGraphColor () |
static void | Reflect (AZ::ReflectContext *context) |
static AnimGraph * | LoadFromFile (const AZStd::string &filename, AZ::SerializeContext *context, const AZ::ObjectStream::FilterDescriptor &loadFilter=AZ::ObjectStream::FilterDescriptor(nullptr, AZ::ObjectStream::FILTERFLAG_IGNORE_UNKNOWN_CLASSES)) |
static AnimGraph * | LoadFromBuffer (const void *buffer, const AZStd::size_t length, AZ::SerializeContext *context) |
void EMotionFX::AnimGraph::AddNodeGroup | ( | AnimGraphNodeGroup * | nodeGroup | ) |
Add the given node group.
nodeGroup | A pointer to the new node group to add. |
bool EMotionFX::AnimGraph::AddParameter | ( | Parameter * | parameter, |
const GroupParameter * | parent = nullptr |
||
) |
Add the given parameter. The parameter will be fully managed and destroyed by this anim graph.
[in] | parameter | A pointer to the parameter to add. |
[in] | parent | Parent group parameter. If nullptr, the parameter will be added to the root group parameter |
void EMotionFX::AnimGraph::FindAndRemoveCycles | ( | AZStd::string * | outRemovedConnectionsMessage = nullptr | ) |
Finds cycles and removes connections that produce them. This method is intended to be used after loading
[out] | outRemovedConnectionsMessage | if specified, it will compose a message of the connections that were removed |
GroupParameter * EMotionFX::AnimGraph::FindGroupParameterByName | ( | const AZStd::string & | groupName | ) | const |
Find a group parameter by name.
groupName | The group name to search for. |
AnimGraphNodeGroup * EMotionFX::AnimGraph::FindNodeGroupByName | ( | const char * | groupName | ) | const |
Find a node group based on the name and return a pointer.
groupName | The group name to search for. |
AnimGraphNodeGroup * EMotionFX::AnimGraph::FindNodeGroupForNode | ( | AnimGraphNode * | animGraphNode | ) | const |
Find the node group the given node is part of and return a pointer to it.
[in] | animGraphNode | The node to search the node group for. |
size_t EMotionFX::AnimGraph::FindNodeGroupIndexByName | ( | const char * | groupName | ) | const |
Find a node group index based on the name and return its index.
groupName | The group name to search for. |
const Parameter * EMotionFX::AnimGraph::FindParameter | ( | size_t | index | ) | const |
Find a parameter given an index.
[in] | index | The index of the parameter to return (index based on all parameters, returned parameter could be a group). |
const Parameter * EMotionFX::AnimGraph::FindParameterByName | ( | const AZStd::string & | paramName | ) | const |
Find parameter by name.
[in] | paramName | The name of the parameter to search for. |
AZ::Outcome< size_t > EMotionFX::AnimGraph::FindParameterIndex | ( | Parameter * | parameter | ) | const |
Find parameter index by parameter.
[in] | parameter | The parameter to search for. |
AZ::Outcome< size_t > EMotionFX::AnimGraph::FindParameterIndexByName | ( | const AZStd::string & | paramName | ) | const |
Find parameter index by name.
[in] | paramName | The name of the parameter to search for. |
const GroupParameter * EMotionFX::AnimGraph::FindParentGroupParameter | ( | const Parameter * | parameter | ) | const |
Find the group parameter the given parameter is part of.
[in] | parameter | The parameter to search the group parameter for. |
AZ::Outcome< size_t > EMotionFX::AnimGraph::FindRelativeParameterIndex | ( | const Parameter * | parameter | ) | const |
Find parameter index by parameter. Index is relative to its siblings.
[in] | parameter | The parameter to search for. |
const ValueParameter * EMotionFX::AnimGraph::FindValueParameter | ( | size_t | index | ) | const |
Find a value parameter given an index.
[in] | index | The index of the value parameter to return (index based on all the graph's value parameters). |
const ValueParameter * EMotionFX::AnimGraph::FindValueParameterByName | ( | const AZStd::string & | paramName | ) | const |
Find a value parameter by name. The above function is more generic and this more specific. If the client already knows that is searching for a value parameter, this function will be faster to execute.
[in] | paramName | The name of the value parameter to search for. |
AZ::Outcome< size_t > EMotionFX::AnimGraph::FindValueParameterIndex | ( | const ValueParameter * | parameter | ) | const |
Find value parameter index by parameter. Index is relative to other value parameters.
[in] | parameter | The parameter to search for. |
AZ::Outcome< size_t > EMotionFX::AnimGraph::FindValueParameterIndexByName | ( | const AZStd::string & | paramName | ) | const |
Find value parameter index by name. Index is relative to other value parameters.
[in] | paramName | The name of the value parameter to search for. |
bool EMotionFX::AnimGraph::GetAutoUnregister | ( | ) | const |
Check if this anim graph is automatically being unregistered from this anim graph manager when this anim graph motion gets deleted or not.
const ParameterVector & EMotionFX::AnimGraph::GetChildParameters | ( | ) | const |
Get all the parameters contained directly by this anim graph. This means that if this anim graph contains a group which contains more parameters, those are not returned (but the group is).
ValueParameterVector EMotionFX::AnimGraph::GetChildValueParameters | ( | ) | const |
Get all the value parameters contained directly by this anim graph. This means that if this anim graph contains a group which contains more value parameters, those are not returned.
bool EMotionFX::AnimGraph::GetDirtyFlag | ( | ) | const |
Get the dirty flag which indicates whether the user has made changes to this anim graph. This indicator is set to true when the user changed something like adding a node. When the user saves this anim graph, the indicator is usually set to false.
uint32 EMotionFX::AnimGraph::GetID | ( | ) | const |
Get the unique identification number for this anim graph.
AnimGraphNodeGroup * EMotionFX::AnimGraph::GetNodeGroup | ( | size_t | index | ) | const |
Get a pointer to the given node group.
index | The node group index, which must be in range of [0..GetNumNodeGroups()-1]. |
size_t EMotionFX::AnimGraph::GetNumNodeGroups | ( | ) | const |
Get the number of node groups.
size_t EMotionFX::AnimGraph::GetNumParameters | ( | ) | const |
Get the total number of parameters inside this anim graph. This will be the number of parameters from all group parameters counting the groups (therefore is the amount of parameters that have a value)
size_t EMotionFX::AnimGraph::GetNumValueParameters | ( | ) | const |
Get the total number of value parameters inside this anim graph. This will be the number of parameters from all group parameters. without counting the groups.
bool EMotionFX::AnimGraph::InsertParameter | ( | size_t | index, |
Parameter * | parameter, | ||
const GroupParameter * | parent = nullptr |
||
) |
Insert the given parameter at the specified index. The index is relative to the parent. The parameter will be fully managed and destroyed by this anim graph.
[in] | index | The index at which position the new parameter shall be inserted. |
[in] | parameter | A pointer to the attribute info to insert. |
[in] | parent | Parent group parameter. If nullptr, the parameter will be added to the root group parameter |
|
static |
Picks a random color for the anim graph.
GroupParameterVector EMotionFX::AnimGraph::RecursivelyGetGroupParameters | ( | ) | const |
Get all the group parameters contained in this anim graph, recursively. This means that if a group is contained in another group within this anim graph, it is returned as well.
const ValueParameterVector & EMotionFX::AnimGraph::RecursivelyGetValueParameters | ( | ) | const |
Get all the value parameters contained in this anim graph, recursively. This means that if a group contains more value parameters, those are returned as well.
void EMotionFX::AnimGraph::RemoveAllNodeGroups | ( | bool | delFromMem = true | ) |
Remove all node groups.
delFromMem | Set to true (default) when you wish to also delete the node groups from memory. |
void EMotionFX::AnimGraph::RemoveNodeGroup | ( | size_t | index, |
bool | delFromMem = true |
||
) |
Remove the node group at the given index.
index | The node group index to remove. This value must be in range of [0..GetNumNodeGroups()-1]. |
delFromMem | Set to true (default) when you wish to also delete the specified group from memory. |
bool EMotionFX::AnimGraph::RemoveParameter | ( | Parameter * | parameter | ) |
Removes the parameter specified by index. The parameter will be deleted.
[in] | parameter | The parameter to remove. |
bool EMotionFX::AnimGraph::RenameParameter | ( | Parameter * | parameter, |
const AZStd::string & | newName | ||
) |
Rename a parameter's name.
[in] | parameter | Parameter to rename. |
[in] | newName | New name. |
void EMotionFX::AnimGraph::SetAutoUnregister | ( | bool | enabled | ) |
Set if we want to automatically unregister this anim graph from this anim graph manager when we delete this anim graph. On default this is set to true.
enabled | Set to true when you wish to automatically have this anim graph unregistered, otherwise set it to false. |
void EMotionFX::AnimGraph::SetDirtyFlag | ( | bool | dirty | ) |
Set the dirty flag which indicates whether the user has made changes to this anim graph. This indicator is set to true when the user changed something like adding a node. When the user saves this anim graph, the indicator is usually set to false.
dirty | The dirty flag. |
void EMotionFX::AnimGraph::SetID | ( | uint32 | id | ) |
Set the unique identification number for this anim graph.
[in] | id | The unique identification number. |
void EMotionFX::AnimGraph::SetIsOwnedByAsset | ( | bool | isOwnedByAsset | ) |
Marks the anim graph as owned by an asset, as opposed to the tool suite.
void EMotionFX::AnimGraph::SetIsOwnedByRuntime | ( | bool | isOwnedByRuntime | ) |
Marks the anim graph as used by the engine runtime, as opposed to the tool suite.
bool EMotionFX::AnimGraph::TakeParameterFromParent | ( | const Parameter * | parameter | ) |
Iterate over all group parameters and make sure the given parameter is not part of any of the groups anymore.
[in] | parameterIndex | The index of the parameter to be removed from all group parameters. |