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.
EMotionFX::AnimGraphNode Class Reference

Inherits EMotionFX::AnimGraphObject.

Inherited by EMotionFX::AnimGraphBindPoseNode, EMotionFX::AnimGraphEntryNode, EMotionFX::AnimGraphExitNode, EMotionFX::AnimGraphHubNode, EMotionFX::AnimGraphMotionNode, EMotionFX::AnimGraphReferenceNode, EMotionFX::AnimGraphStateMachine, EMotionFX::BlendSpaceNode, EMotionFX::BlendTree, EMotionFX::BlendTreeAccumTransformNode, EMotionFX::BlendTreeBlend2NodeBase, EMotionFX::BlendTreeBlendNNode, EMotionFX::BlendTreeBoolLogicNode, EMotionFX::BlendTreeDirectionToWeightNode, EMotionFX::BlendTreeFinalNode, EMotionFX::BlendTreeFloatConditionNode, EMotionFX::BlendTreeFloatConstantNode, EMotionFX::BlendTreeFloatMath1Node, EMotionFX::BlendTreeFloatMath2Node, EMotionFX::BlendTreeFloatSwitchNode, EMotionFX::BlendTreeFootIKNode, EMotionFX::BlendTreeGetTransformNode, EMotionFX::BlendTreeLookAtNode, EMotionFX::BlendTreeMaskLegacyNode, EMotionFX::BlendTreeMaskNode, EMotionFX::BlendTreeMirrorPoseNode, EMotionFX::BlendTreeMorphTargetNode, EMotionFX::BlendTreeMotionFrameNode, EMotionFX::BlendTreeParameterNode, EMotionFX::BlendTreePoseSubtractNode, EMotionFX::BlendTreePoseSwitchNode, EMotionFX::BlendTreeRagdollNode, EMotionFX::BlendTreeRagdollStrenghModifierNode, EMotionFX::BlendTreeRangeRemapperNode, EMotionFX::BlendTreeRaycastNode, EMotionFX::BlendTreeRotationLimitNode, EMotionFX::BlendTreeRotationMath2Node, EMotionFX::BlendTreeSetTransformNode, EMotionFX::BlendTreeSimulatedObjectNode, EMotionFX::BlendTreeSmoothingNode, EMotionFX::BlendTreeTransformNode, EMotionFX::BlendTreeTwoLinkIKNode, EMotionFX::BlendTreeVector2ComposeNode, EMotionFX::BlendTreeVector2DecomposeNode, EMotionFX::BlendTreeVector3ComposeNode, EMotionFX::BlendTreeVector3DecomposeNode, EMotionFX::BlendTreeVector3Math1Node, EMotionFX::BlendTreeVector3Math2Node, EMotionFX::BlendTreeVector4ComposeNode, and EMotionFX::BlendTreeVector4DecomposeNode.

Classes

struct  Port
 

Public Member Functions

 AnimGraphNode (AnimGraph *animGraph, const char *name)
 
virtual void RecursiveReinit () override
 
bool InitAfterLoading (AnimGraph *animGraph) override
 
void InitTriggerActions ()
 
virtual bool GetSupportsVisualization () const
 
virtual bool GetSupportsPreviewMotion () const
 
virtual bool GetSupportsDisable () const
 
virtual bool GetHasVisualOutputPorts () const
 
virtual bool GetCanHaveOnlyOneInsideParent () const
 
virtual bool GetIsDeletable () const
 
virtual bool GetIsLastInstanceDeletable () const
 
virtual bool GetCanActAsState () const
 
virtual bool GetHasVisualGraph () const
 
virtual bool GetCanHaveChildren () const
 
virtual bool GetHasOutputPose () const
 
virtual bool GetCanBeInsideStateMachineOnly () const
 
virtual bool GetCanBeInsideChildStateMachineOnly () const
 
virtual bool GetNeedsNetTimeSync () const
 
virtual bool GetCanBeEntryNode () const
 
virtual AZ::Color GetVisualColor () const
 
virtual AZ::Color GetHasChildIndicatorColor () const
 
void OutputAllIncomingNodes (AnimGraphInstance *animGraphInstance)
 
void UpdateAllIncomingNodes (AnimGraphInstance *animGraphInstance, float timePassedInSeconds)
 
void UpdateIncomingNode (AnimGraphInstance *animGraphInstance, AnimGraphNode *node, float timePassedInSeconds)
 
AnimGraphObjectDataCreateUniqueData (AnimGraphInstance *animGraphInstance) override
 
virtual void RecursiveResetUniqueDatas (AnimGraphInstance *animGraphInstance)
 
void InvalidateUniqueData (AnimGraphInstance *animGraphInstance) override
 
void RecursiveInvalidateUniqueDatas (AnimGraphInstance *animGraphInstance) override
 
void OnRemoveNode (AnimGraph *animGraph, AnimGraphNode *nodeToRemove) override
 
void PerformOutput (AnimGraphInstance *animGraphInstance)
 
void PerformTopDownUpdate (AnimGraphInstance *animGraphInstance, float timePassedInSeconds)
 
void PerformUpdate (AnimGraphInstance *animGraphInstance, float timePassedInSeconds)
 
void PerformPostUpdate (AnimGraphInstance *animGraphInstance, float timePassedInSeconds)
 
virtual void SkipPostUpdate (AnimGraphInstance *animGraphInstance)
 
virtual void SkipOutput (AnimGraphInstance *animGraphInstance)
 
float GetDuration (AnimGraphInstance *animGraphInstance) const
 
virtual void SetCurrentPlayTime (AnimGraphInstance *animGraphInstance, float timeInSeconds)
 
virtual float GetCurrentPlayTime (AnimGraphInstance *animGraphInstance) const
 
size_t GetSyncIndex (AnimGraphInstance *animGraphInstance) const
 
void SetSyncIndex (AnimGraphInstance *animGraphInstance, size_t syncIndex)
 
virtual void SetPlaySpeed (AnimGraphInstance *animGraphInstance, float speedFactor)
 
virtual float GetPlaySpeed (AnimGraphInstance *animGraphInstance) const
 
virtual void SetCurrentPlayTimeNormalized (AnimGraphInstance *animGraphInstance, float normalizedTime)
 
virtual void Rewind (AnimGraphInstance *animGraphInstance)
 
void AutoSync (AnimGraphInstance *animGraphInstance, AnimGraphNode *leaderNode, float weight, ESyncMode syncMode, bool resync)
 
void SyncFullNode (AnimGraphInstance *animGraphInstance, AnimGraphNode *leaderNode, float weight, bool modifyLeaderSpeed=true)
 
void SyncPlayTime (AnimGraphInstance *animGraphInstance, AnimGraphNode *leaderNode)
 
void SyncUsingSyncTracks (AnimGraphInstance *animGraphInstance, AnimGraphNode *syncWithNode, const AnimGraphSyncTrack *syncTrackA, const AnimGraphSyncTrack *syncTrackB, float weight, bool resync, bool modifyLeaderSpeed=true)
 
void SyncPlaySpeeds (AnimGraphInstance *animGraphInstance, AnimGraphNode *leaderNode, float weight, bool modifyLeaderSpeed=true)
 
virtual void HierarchicalSyncInputNode (AnimGraphInstance *animGraphInstance, AnimGraphNode *inputNode, AnimGraphNodeData *uniqueDataOfThisNode)
 
void HierarchicalSyncAllInputNodes (AnimGraphInstance *animGraphInstance, AnimGraphNodeData *uniqueDataOfThisNode)
 
void RequestPoses (AnimGraphInstance *animGraphInstance)
 
void FreeIncomingPoses (AnimGraphInstance *animGraphInstance)
 
void IncreaseInputRefCounts (AnimGraphInstance *animGraphInstance)
 
void DecreaseRef (AnimGraphInstance *animGraphInstance)
 
void RequestRefDatas (AnimGraphInstance *animGraphInstance)
 
void FreeIncomingRefDatas (AnimGraphInstance *animGraphInstance)
 
void IncreaseInputRefDataRefCounts (AnimGraphInstance *animGraphInstance)
 
void DecreaseRefDataRef (AnimGraphInstance *animGraphInstance)
 
void * GetCustomData () const
 
void SetCustomData (void *dataPointer)
 
virtual AnimGraphPoseGetMainOutputPose (AnimGraphInstance *animGraphInstance) const
 
virtual void RecursiveCollectActiveNodes (AnimGraphInstance *animGraphInstance, AZStd::vector< AnimGraphNode * > *outNodes, const AZ::TypeId &nodeType=AZ::TypeId::CreateNull()) const
 
virtual void RecursiveCollectActiveNetTimeSyncNodes (AnimGraphInstance *animGraphInstance, AZStd::vector< AnimGraphNode * > *outNodes) const
 
virtual bool RecursiveDetectCycles (AZStd::unordered_set< const AnimGraphNode * > &nodes) const
 
void CollectChildNodesOfType (const AZ::TypeId &nodeType, AZStd::vector< AnimGraphNode * > *outNodes) const
 
void CollectChildNodesOfType (const AZ::TypeId &nodeType, AZStd::vector< AnimGraphNode * > &outNodes) const
 
void RecursiveCollectNodesOfType (const AZ::TypeId &nodeType, AZStd::vector< AnimGraphNode * > *outNodes) const
 
void RecursiveCollectTransitionConditionsOfType (const AZ::TypeId &conditionType, AZStd::vector< AnimGraphTransitionCondition * > *outConditions) const
 
virtual void RecursiveCollectObjectsOfType (const AZ::TypeId &objectType, AZStd::vector< AnimGraphObject * > &outObjects) const
 
virtual void RecursiveCollectObjectsAffectedBy (AnimGraph *animGraph, AZStd::vector< AnimGraphObject * > &outObjects) const
 
virtual void OnStateEntering (AnimGraphInstance *animGraphInstance, AnimGraphNode *previousState, AnimGraphStateTransition *usedTransition)
 
virtual void OnStateEnter (AnimGraphInstance *animGraphInstance, AnimGraphNode *previousState, AnimGraphStateTransition *usedTransition)
 
virtual void OnStateExit (AnimGraphInstance *animGraphInstance, AnimGraphNode *targetState, AnimGraphStateTransition *usedTransition)
 
virtual void OnStateEnd (AnimGraphInstance *animGraphInstance, AnimGraphNode *newState, AnimGraphStateTransition *usedTransition)
 
void RecursiveOnChangeMotionSet (AnimGraphInstance *animGraphInstance, MotionSet *newMotionSet) override
 
const char * GetName () const
 
const AZStd::string & GetNameString () const
 
void SetName (const char *name)
 
MCORE_INLINE AnimGraphNodeId GetId () const
 
void SetId (AnimGraphNodeId id)
 
const MCore::AttributeGetInputValue (AnimGraphInstance *instance, size_t inputPort) const
 
size_t FindInputPortByID (uint32 portID) const
 
size_t FindOutputPortByID (uint32 portID) const
 
PortFindInputPortByName (const AZStd::string &portName)
 
PortFindOutputPortByName (const AZStd::string &portName)
 
bool ValidateConnections () const
 
BlendTreeConnectionAddConnection (AnimGraphNode *sourceNode, uint16 sourcePort, uint16 targetPort)
 
BlendTreeConnectionAddUnitializedConnection (AnimGraphNode *sourceNode, uint16 sourcePort, uint16 targetPort)
 
void RemoveConnection (BlendTreeConnection *connection, bool delFromMem=true)
 
void RemoveConnection (AnimGraphNode *sourceNode, uint16 sourcePort, uint16 targetPort)
 
bool RemoveConnectionById (AnimGraphConnectionId connectionId, bool delFromMem=true)
 
void RemoveAllConnections ()
 
TriggerActionSetupGetTriggerActionSetup ()
 
const TriggerActionSetupGetTriggerActionSetup () const
 
void CollectOutgoingConnections (AZStd::vector< AZStd::pair< BlendTreeConnection *, AnimGraphNode * > > &outConnections) const
 
void CollectOutgoingConnections (AZStd::vector< AZStd::pair< BlendTreeConnection *, AnimGraphNode * > > &outConnections, const size_t portIndex) const
 
MCORE_INLINE bool GetInputNumberAsBool (AnimGraphInstance *animGraphInstance, size_t inputPortNr) const
 
MCORE_INLINE float GetInputNumberAsFloat (AnimGraphInstance *animGraphInstance, size_t inputPortNr) const
 
MCORE_INLINE int32 GetInputNumberAsInt32 (AnimGraphInstance *animGraphInstance, size_t inputPortNr) const
 
MCORE_INLINE uint32 GetInputNumberAsUint32 (AnimGraphInstance *animGraphInstance, size_t inputPortNr) const
 
MCORE_INLINE AnimGraphNodeGetInputNode (size_t portNr)
 
MCORE_INLINE MCore::AttributeGetInputAttribute (AnimGraphInstance *animGraphInstance, size_t portNr) const
 
MCORE_INLINE MCore::AttributeFloatGetInputFloat (AnimGraphInstance *animGraphInstance, size_t portNr) const
 
MCORE_INLINE MCore::AttributeInt32GetInputInt32 (AnimGraphInstance *animGraphInstance, size_t portNr) const
 
MCORE_INLINE MCore::AttributeStringGetInputString (AnimGraphInstance *animGraphInstance, size_t portNr) const
 
MCORE_INLINE MCore::AttributeBoolGetInputBool (AnimGraphInstance *animGraphInstance, size_t portNr) const
 
MCORE_INLINE bool TryGetInputVector4 (AnimGraphInstance *animGraphInstance, size_t portNr, AZ::Vector4 &outResult) const
 
MCORE_INLINE bool TryGetInputVector2 (AnimGraphInstance *animGraphInstance, size_t portNr, AZ::Vector2 &outResult) const
 
MCORE_INLINE bool TryGetInputVector3 (AnimGraphInstance *animGraphInstance, size_t portNr, AZ::Vector3 &outResult) const
 
MCORE_INLINE MCore::AttributeQuaternionGetInputQuaternion (AnimGraphInstance *animGraphInstance, size_t portNr) const
 
MCORE_INLINE MCore::AttributeColorGetInputColor (AnimGraphInstance *animGraphInstance, size_t portNr) const
 
MCORE_INLINE AttributeMotionInstanceGetInputMotionInstance (AnimGraphInstance *animGraphInstance, size_t portNr) const
 
MCORE_INLINE AttributePoseGetInputPose (AnimGraphInstance *animGraphInstance, size_t portNr) const
 
MCORE_INLINE MCore::AttributeGetOutputAttribute (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE MCore::AttributeFloatGetOutputNumber (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE MCore::AttributeFloatGetOutputFloat (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE MCore::AttributeInt32GetOutputInt32 (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE MCore::AttributeStringGetOutputString (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE MCore::AttributeBoolGetOutputBool (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE MCore::AttributeVector2GetOutputVector2 (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE MCore::AttributeVector3GetOutputVector3 (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE MCore::AttributeVector4GetOutputVector4 (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE MCore::AttributeQuaternionGetOutputQuaternion (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE MCore::AttributeColorGetOutputColor (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE AttributePoseGetOutputPose (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
MCORE_INLINE AttributeMotionInstanceGetOutputMotionInstance (AnimGraphInstance *animGraphInstance, size_t outputPortIndex) const
 
void SetupInputPortAsNumber (const char *name, size_t inputPortNr, uint32 portID)
 
void SetupInputPortAsBool (const char *name, size_t inputPortNr, uint32 portID)
 
void SetupInputPort (const char *name, size_t inputPortNr, uint32 attributeTypeID, uint32 portID)
 
void SetupInputPortAsVector3 (const char *name, size_t inputPortNr, uint32 portID)
 
void SetupInputPortAsVector2 (const char *name, size_t inputPortNr, uint32 portID)
 
void SetupInputPortAsVector4 (const char *name, size_t inputPortNr, uint32 portID)
 
void SetupInputPort (const char *name, size_t inputPortNr, const AZStd::vector< uint32 > &attributeTypeIDs, uint32 portID)
 
void SetupOutputPort (const char *name, size_t portIndex, uint32 attributeTypeID, uint32 portID)
 
void SetupOutputPortAsPose (const char *name, size_t outputPortNr, uint32 portID)
 
void SetupOutputPortAsMotionInstance (const char *name, size_t outputPortNr, uint32 portID)
 
bool GetHasConnection (AnimGraphNode *sourceNode, uint16 sourcePort, uint16 targetPort) const
 
BlendTreeConnectionFindConnection (const AnimGraphNode *sourceNode, uint16 sourcePort, uint16 targetPort) const
 
bool HasConnectionAtInputPort (AZ::u32 inputPortNr) const
 
BlendTreeConnectionFindConnection (uint16 port) const
 
BlendTreeConnectionFindConnectionById (AnimGraphConnectionId connectionId) const
 
bool CheckIfIsInputPortConnected (uint16 inputPort) const
 
AnimGraphNodeRecursiveFindNodeByName (const char *nodeName) const
 
bool RecursiveIsNodeNameUnique (const AZStd::string &newNameCandidate, const AnimGraphNode *forNode) const
 
AnimGraphNodeRecursiveFindNodeById (AnimGraphNodeId nodeId) const
 
virtual void RecursiveResetFlags (AnimGraphInstance *animGraphInstance, uint32 flagsToReset=0xffffffff)
 
const AZStd::vector< AnimGraphNode::Port > & GetInputPorts () const
 
const AZStd::vector< AnimGraphNode::Port > & GetOutputPorts () const
 
void SetInputPorts (const AZStd::vector< AnimGraphNode::Port > &inputPorts)
 
void SetOutputPorts (const AZStd::vector< AnimGraphNode::Port > &outputPorts)
 
void InitInputPorts (size_t numPorts)
 
void InitOutputPorts (size_t numPorts)
 
void SetInputPortName (size_t portIndex, const char *name)
 
void SetOutputPortName (size_t portIndex, const char *name)
 
size_t FindOutputPortIndex (const AZStd::string &name) const
 
size_t FindInputPortIndex (const AZStd::string &name) const
 
size_t AddOutputPort ()
 
size_t AddInputPort ()
 
virtual bool GetIsStateTransitionNode () const
 
MCORE_INLINE MCore::AttributeGetOutputValue (AnimGraphInstance *animGraphInstance, size_t portIndex) const
 
MCORE_INLINE PortGetInputPort (size_t index)
 
MCORE_INLINE PortGetOutputPort (size_t index)
 
MCORE_INLINE const PortGetInputPort (size_t index) const
 
MCORE_INLINE const PortGetOutputPort (size_t index) const
 
void RelinkPortConnections ()
 
MCORE_INLINE size_t GetNumConnections () const
 
MCORE_INLINE BlendTreeConnectionGetConnection (size_t index) const
 
const AZStd::vector< BlendTreeConnection * > & GetConnections () const
 
AZ_FORCE_INLINE AnimGraphNodeGetParentNode () const
 
AZ_FORCE_INLINE void SetParentNode (AnimGraphNode *node)
 
virtual bool RecursiveIsParentNode (const AnimGraphNode *node) const
 
bool RecursiveIsChildNode (AnimGraphNode *node) const
 
AnimGraphNodeFindChildNode (const char *name) const
 
AnimGraphNodeFindChildNodeById (AnimGraphNodeId childId) const
 
size_t FindChildNodeIndex (const char *name) const
 
size_t FindChildNodeIndex (AnimGraphNode *node) const
 
AnimGraphNodeFindFirstChildNodeOfType (const AZ::TypeId &nodeType) const
 
bool HasChildNodeOfType (const AZ::TypeId &nodeType) const
 
size_t RecursiveCalcNumNodes () const
 
size_t RecursiveCalcNumNodeConnections () const
 
void CopyBaseNodeTo (AnimGraphNode *node) const
 
MCORE_INLINE size_t GetNumChildNodes () const
 
MCORE_INLINE AnimGraphNodeGetChildNode (size_t index) const
 
const AZStd::vector< AnimGraphNode * > & GetChildNodes () const
 
void SetNodeInfo (const AZStd::string &info)
 
const AZStd::string & GetNodeInfo () const
 
void AddChildNode (AnimGraphNode *node)
 
void ReserveChildNodes (size_t numChildNodes)
 
void RemoveChildNode (size_t index, bool delFromMem=true)
 
void RemoveChildNodeByPointer (AnimGraphNode *node, bool delFromMem=true)
 
void RemoveAllChildNodes (bool delFromMem=true)
 
bool CheckIfHasChildOfType (const AZ::TypeId &nodeType) const
 
void MarkConnectionVisited (AnimGraphNode *sourceNode)
 
void OutputIncomingNode (AnimGraphInstance *animGraphInstance, AnimGraphNode *nodeToOutput)
 
MCORE_INLINE AnimGraphNodeDataFindOrCreateUniqueNodeData (AnimGraphInstance *animGraphInstance) const
 
bool GetIsEnabled () const
 
void SetIsEnabled (bool enabled)
 
bool GetIsCollapsed () const
 
void SetIsCollapsed (bool collapsed)
 
void SetVisualizeColor (const AZ::Color &color)
 
const AZ::Color & GetVisualizeColor () const
 
void SetVisualPos (int32 x, int32 y)
 
int32 GetVisualPosX () const
 
int32 GetVisualPosY () const
 
bool GetIsVisualizationEnabled () const
 
void SetVisualization (bool enabled)
 
bool HierarchicalHasError (AnimGraphObjectData *uniqueData, bool onlyCheckChildNodes=false) const
 
void SetHasError (AnimGraphObjectData *uniqueData, bool hasError)
 
void RecursiveCollectObjects (AZStd::vector< AnimGraphObject * > &outObjects) const override
 
virtual void RecursiveSetUniqueDataFlag (AnimGraphInstance *animGraphInstance, uint32 flag, bool enabled)
 
void FilterEvents (AnimGraphInstance *animGraphInstance, EEventMode eventMode, AnimGraphNode *nodeA, AnimGraphNode *nodeB, float localWeight, AnimGraphRefCountedData *refData)
 
void FilterEvents (AnimGraphInstance *animGraphInstance, EEventMode eventMode, AnimGraphRefCountedData *refDataNodeA, AnimGraphNode *nodeB, float localWeight, AnimGraphRefCountedData *refData)
 
bool GetCanVisualize (AnimGraphInstance *animGraphInstance) const
 
MCORE_INLINE size_t GetNodeIndex () const
 
MCORE_INLINE void SetNodeIndex (size_t index)
 
void ResetPoseRefCount (AnimGraphInstance *animGraphInstance)
 
MCORE_INLINE void IncreasePoseRefCount (AnimGraphInstance *animGraphInstance)
 
MCORE_INLINE void DecreasePoseRefCount (AnimGraphInstance *animGraphInstance)
 
MCORE_INLINE uint32 GetPoseRefCount (AnimGraphInstance *animGraphInstance) const
 
void ResetRefDataRefCount (AnimGraphInstance *animGraphInstance)
 
MCORE_INLINE void IncreaseRefDataRefCount (AnimGraphInstance *animGraphInstance)
 
MCORE_INLINE void DecreaseRefDataRefCount (AnimGraphInstance *animGraphInstance)
 
MCORE_INLINE uint32 GetRefDataRefCount (AnimGraphInstance *animGraphInstance) const
 
virtual void GetAttributeStringForAffectedNodeIds (const AZStd::unordered_map< AZ::u64, AZ::u64 > &convertedIds, AZStd::string &attributesString) const
 
- Public Member Functions inherited from EMotionFX::AnimGraphObject
 AnimGraphObject (AnimGraph *animGraph)
 
virtual void Reinit ()
 
virtual void RecursiveReinit ()
 
virtual AnimGraphObjectDataCreateUniqueData (AnimGraphInstance *animGraphInstance)
 
void InvalidateUniqueDatas ()
 Calls InvalidateUniqueData() for the given object for all anim graph instances. (Used by reflection context)
 
virtual void InvalidateUniqueData (AnimGraphInstance *animGraphInstance)
 
virtual void RecursiveInvalidateUniqueDatas (AnimGraphInstance *animGraphInstance)
 
void ResetUniqueDatas ()
 
void ResetUniqueData (AnimGraphInstance *animGraphInstance)
 
virtual bool InitAfterLoading (AnimGraph *animGraph)=0
 
virtual void RegisterAttributes ()
 
virtual void Unregister ()
 
virtual const char * GetPaletteName () const =0
 
virtual void GetSummary (AZStd::string *outResult) const
 
virtual void GetTooltip (AZStd::string *outResult) const
 
virtual const char * GetHelpUrl () const
 
virtual ECategory GetPaletteCategory () const =0
 
virtual void Update (AnimGraphInstance *animGraphInstance, float timePassedInSeconds)
 
virtual void OnChangeMotionSet (AnimGraphInstance *animGraphInstance, MotionSet *newMotionSet)
 
virtual void OnRemoveNode (AnimGraph *animGraph, AnimGraphNode *nodeToRemove)
 
virtual void RecursiveOnChangeMotionSet (AnimGraphInstance *animGraphInstance, MotionSet *newMotionSet)
 
virtual void OnActorMotionExtractionNodeChanged ()
 
MCORE_INLINE size_t GetObjectIndex () const
 
MCORE_INLINE void SetObjectIndex (size_t index)
 
MCORE_INLINE AnimGraphGetAnimGraph () const
 
MCORE_INLINE void SetAnimGraph (AnimGraph *animGraph)
 
size_t SaveUniqueData (AnimGraphInstance *animGraphInstance, uint8 *outputBuffer) const
 
size_t LoadUniqueData (AnimGraphInstance *animGraphInstance, const uint8 *dataBuffer)
 
virtual void RecursiveCollectObjects (AZStd::vector< AnimGraphObject * > &outObjects) const
 
bool GetHasErrorFlag (AnimGraphInstance *animGraphInstance) const
 
void SetHasErrorFlag (AnimGraphInstance *animGraphInstance, bool hasError)
 
void SyncVisualObject ()
 

Static Public Member Functions

static AZStd::tuple< float, float, float > SyncPlaySpeeds (float playSpeedA, float durationA, float playSpeedB, float durationB, float weight)
 
static void CalcSyncFactors (AnimGraphInstance *animGraphInstance, const AnimGraphNode *leaderNode, const AnimGraphNode *followerNode, ESyncMode syncMode, float weight, float *outLeaderFactor, float *outFollowerFactor, float *outPlaySpeed)
 
static void CalcSyncFactors (float leaderPlaySpeed, const AnimGraphSyncTrack *leaderSyncTrack, size_t leaderSyncTrackIndex, float leaderDuration, float followerPlaySpeed, const AnimGraphSyncTrack *followerSyncTrack, size_t followerSyncTrackIndex, float followerDuration, ESyncMode syncMode, float weight, float *outLeaderFactor, float *outFollowerFactor, float *outPlaySpeed)
 
static bool VersionConverter (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement)
 
static void Reflect (AZ::ReflectContext *context)
 
- Static Public Member Functions inherited from EMotionFX::AnimGraphObject
static const char * GetCategoryName (ECategory category)
 
static void CalculateMotionExtractionDelta (EExtractionMode extractionMode, AnimGraphRefCountedData *sourceRefData, AnimGraphRefCountedData *targetRefData, float weight, bool hasMotionExtractionNodeInMask, Transform &outTransform, Transform &outTransformMirrored)
 
static void CalculateMotionExtractionDeltaAdditive (EExtractionMode extractionMode, AnimGraphRefCountedData *sourceRefData, AnimGraphRefCountedData *targetRefData, const Transform &basePoseTransform, float weight, bool hasMotionExtractionNodeInMask, Transform &outTransform, Transform &outTransformMirrored)
 
static void Reflect (AZ::ReflectContext *context)
 

Protected Member Functions

void PostUpdateIncomingNode (AnimGraphInstance *animGraphInstance, AnimGraphNode *node, float timePassedInSeconds)
 
void TopDownUpdateIncomingNode (AnimGraphInstance *animGraphInstance, AnimGraphNode *node, float timePassedInSeconds)
 
virtual void Output (AnimGraphInstance *animGraphInstance)
 
virtual void TopDownUpdate (AnimGraphInstance *animGraphInstance, float timePassedInSeconds)
 
virtual void PostUpdate (AnimGraphInstance *animGraphInstance, float timePassedInSeconds)
 
void Update (AnimGraphInstance *animGraphInstance, float timePassedInSeconds) override
 
void RecursiveCountChildNodes (size_t &numNodes) const
 
void RecursiveCountNodeConnections (size_t &numConnections) const
 

Protected Attributes

size_t m_nodeIndex
 
AZ::u64 m_id
 
AZStd::vector< BlendTreeConnection * > m_connections
 
AZStd::vector< Portm_inputPorts
 
AZStd::vector< Portm_outputPorts
 
AZStd::vector< AnimGraphNode * > m_childNodes
 
TriggerActionSetup m_actionSetup
 
AnimGraphNodem_parentNode
 
void * m_customData
 
AZ::Color m_visualizeColor
 
AZStd::string m_name
 
AZStd::string m_nodeInfo
 
int32 m_posX
 
int32 m_posY
 
bool m_disabled
 
bool m_visEnabled
 
bool m_isCollapsed
 
- Protected Attributes inherited from EMotionFX::AnimGraphObject
AnimGraphm_animGraph
 
size_t m_objectIndex
 

Additional Inherited Members

- Public Types inherited from EMotionFX::AnimGraphObject
enum  { FLAG_DISABLED = 1 << 0 }
 
enum  ECategory {
  CATEGORY_SOURCES = 0 , CATEGORY_BLENDING = 1 , CATEGORY_CONTROLLERS = 2 , CATEGORY_PHYSICS = 3 ,
  CATEGORY_LOGIC = 4 , CATEGORY_MATH = 5 , CATEGORY_MISC = 6 , CATEGORY_TRANSITIONS = 10 ,
  CATEGORY_TRANSITIONCONDITIONS = 11 , CATEGORY_TRIGGERACTIONS = 12
}
 
enum  ESyncMode : AZ::u8 { SYNCMODE_DISABLED = 0 , SYNCMODE_TRACKBASED = 1 , SYNCMODE_CLIPBASED = 2 }
 
enum  EEventMode : AZ::u8 {
  EVENTMODE_LEADERONLY = 0 , EVENTMODE_FOLLOWERONLY = 1 , EVENTMODE_BOTHNODES = 2 , EVENTMODE_MOSTACTIVE = 3 ,
  EVENTMODE_NONE = 4
}
 
enum  EExtractionMode : AZ::u8 { EXTRACTIONMODE_BLEND = 0 , EXTRACTIONMODE_TARGETONLY = 1 , EXTRACTIONMODE_SOURCEONLY = 2 }
 

Member Function Documentation

◆ CheckIfIsInputPortConnected()

bool EMotionFX::AnimGraphNode::CheckIfIsInputPortConnected ( uint16  inputPort) const

Check if a connection is connected to the given input port.

Parameters
[in]inputPortThe input port id to check.
Returns
True in case there is a connection plugged into the given input port, false if not.

◆ CollectChildNodesOfType()

void EMotionFX::AnimGraphNode::CollectChildNodesOfType ( const AZ::TypeId &  nodeType,
AZStd::vector< AnimGraphNode * > &  outNodes 
) const

Collect child nodes of the given type. This will only iterate through the child nodes and isn't a recursive process.

Parameters
[in]nodeTypeThe rtti type id of the node to check for.
Returns
[out] outNodes Pointers to all child nodes of the given type. The array will not be cleared upfront.

◆ CollectOutgoingConnections() [1/2]

void EMotionFX::AnimGraphNode::CollectOutgoingConnections ( AZStd::vector< AZStd::pair< BlendTreeConnection *, AnimGraphNode * > > &  outConnections) const

Collect all outgoing connections. As the nodes only store the incoming connections getting access to the outgoing connections is a bit harder. For that we need to process all nodes in the graph where our node is located, iterate over all connections and check if they are coming from our node. Don't call this function at runtime.

Parameters
[out]outConnectionsThis will hold all output connections of our node. The second attribute of the pair is the target node of the outgoing connection. The BlendTreeConnection itself contains the pointer to the source node. The vector will be cleared upfront.

◆ CollectOutgoingConnections() [2/2]

void EMotionFX::AnimGraphNode::CollectOutgoingConnections ( AZStd::vector< AZStd::pair< BlendTreeConnection *, AnimGraphNode * > > &  outConnections,
const size_t  portIndex 
) const

Collect outgoing connections that are connected to port portIndex. As the nodes only store the incoming connections getting access to the outgoing connections is a bit harder. For that we need to process all nodes in the graph where our node is located, iterate over all connections and check if they are coming from our node. Don't call this function at runtime.

Parameters
[out]outConnectionsThis will hold all output connections of our node. The second attribute of the pair is the target node of the outgoing connection. The BlendTreeConnection itself contains the pointer to the source node. The vector will be cleared upfront.

◆ CreateUniqueData()

AnimGraphObjectData * EMotionFX::AnimGraphNode::CreateUniqueData ( AnimGraphInstance animGraphInstance)
inlineoverridevirtual

Reimplemented from EMotionFX::AnimGraphObject.

◆ FindChildNode()

AnimGraphNode * EMotionFX::AnimGraphNode::FindChildNode ( const char *  name) const

Find child node by name. This will only iterate through the child nodes and isn't a recursive process.

Parameters
[in]nameThe name of the node to search.
Returns
A pointer to the child node with the given name in case of success, in the other case a nullptr pointer will be returned.

◆ FindChildNodeById()

AnimGraphNode * EMotionFX::AnimGraphNode::FindChildNodeById ( AnimGraphNodeId  childId) const

Find child node by id. This will only iterate through the child nodes and isn't a recursive process.

Parameters
[in]childIdThe id of the node to search.
Returns
A pointer to the child node with the given id in case of success, in the other case a nullptr pointer will be returned.

◆ FindChildNodeIndex() [1/2]

size_t EMotionFX::AnimGraphNode::FindChildNodeIndex ( AnimGraphNode node) const

Find child node index. This will only iterate through the child nodes and isn't a recursive process.

Parameters
[in]nodeA pointer to the node for which we want to find the child node index.
Returns
The index of the child node in case of success, in the other case MCORE_INVALIDINDEX32 will be returned.

◆ FindChildNodeIndex() [2/2]

size_t EMotionFX::AnimGraphNode::FindChildNodeIndex ( const char *  name) const

Find child node index by name. This will only iterate through the child nodes and isn't a recursive process.

Parameters
[in]nameThe name of the node to search.
Returns
The index of the child node with the given name in case of success, in the other case MCORE_INVALIDINDEX32 will be returned.

◆ FindConnection()

BlendTreeConnection * EMotionFX::AnimGraphNode::FindConnection ( uint16  port) const

Find the connection at the given port. Search over the incoming connections that are stored within this node and check if they are connected at the given port.

Parameters
[in]portThe port inside this node of connection to search for.
Returns
A pointer to the connection at the given port, nullptr in case there is nothing connected to that port.

◆ GetCustomData()

void * EMotionFX::AnimGraphNode::GetCustomData ( ) const

Get a pointer to the custom data you stored. Custom data can for example link a game or engine object. The pointer that you specify will not be deleted when the object is being destructed.

Returns
A void pointer to the custom data you have specified.

◆ HasChildNodeOfType()

bool EMotionFX::AnimGraphNode::HasChildNodeOfType ( const AZ::TypeId &  nodeType) const

Check if a child node of the given type exists. This will only iterate through the child nodes and isn't a recursive process.

Parameters
[in]nodeTypeThe rtti type id of the node to check for.
Returns
True in case a child node of the given type was found, false if not.

◆ InitAfterLoading()

bool EMotionFX::AnimGraphNode::InitAfterLoading ( AnimGraph animGraph)
overridevirtual

◆ InvalidateUniqueData()

void EMotionFX::AnimGraphNode::InvalidateUniqueData ( AnimGraphInstance animGraphInstance)
overridevirtual

Reimplemented from EMotionFX::AnimGraphObject.

◆ OnRemoveNode()

void EMotionFX::AnimGraphNode::OnRemoveNode ( AnimGraph animGraph,
AnimGraphNode nodeToRemove 
)
overridevirtual

Reimplemented from EMotionFX::AnimGraphObject.

◆ RecursiveCollectObjects()

void EMotionFX::AnimGraphNode::RecursiveCollectObjects ( AZStd::vector< AnimGraphObject * > &  outObjects) const
overridevirtual

Reimplemented from EMotionFX::AnimGraphObject.

◆ RecursiveInvalidateUniqueDatas()

void EMotionFX::AnimGraphNode::RecursiveInvalidateUniqueDatas ( AnimGraphInstance animGraphInstance)
overridevirtual

Reimplemented from EMotionFX::AnimGraphObject.

◆ RecursiveIsChildNode()

bool EMotionFX::AnimGraphNode::RecursiveIsChildNode ( AnimGraphNode node) const

Check if the given node is a child or a child of a child etc. of the node.

Parameters
[in]nodeThe child node we try to search.
Returns
True in case the given node is a child or the child of a child etc. of the node, false in case the given node wasn't found in any of the child nodes.

◆ RecursiveIsParentNode()

virtual bool EMotionFX::AnimGraphNode::RecursiveIsParentNode ( const AnimGraphNode node) const
virtual

Check if the given node is the parent or the parent of the parent etc. of the node.

Parameters
[in]nodeThe parent node we try to search.
Returns
True in case the given node is the parent or the parent of the parent etc. of the node, false in case the given node wasn't found in any of the parents.

◆ RecursiveOnChangeMotionSet()

void EMotionFX::AnimGraphNode::RecursiveOnChangeMotionSet ( AnimGraphInstance animGraphInstance,
MotionSet newMotionSet 
)
overridevirtual

Reimplemented from EMotionFX::AnimGraphObject.

◆ RecursiveReinit()

virtual void EMotionFX::AnimGraphNode::RecursiveReinit ( )
overridevirtual

Reimplemented from EMotionFX::AnimGraphObject.

◆ SetCustomData()

void EMotionFX::AnimGraphNode::SetCustomData ( void *  dataPointer)

Set a pointer to the custom data you stored. Custom data can for example link a game or engine object. The pointer that you specify will not be deleted when the object is being destructed.

Parameters
dataPointerA void pointer to the custom data, which could for example be your engine or game object.

◆ SkipOutput()

virtual void EMotionFX::AnimGraphNode::SkipOutput ( AnimGraphInstance animGraphInstance)
inlinevirtual

Inform a node that Output will not be called for the current evaluation cycle

Some node types allocate data in Update and expect to release that data in Output. However, Output is not always called (like when a character is not visible). This method allows the node to perform the necessary cleanup.

◆ SkipPostUpdate()

virtual void EMotionFX::AnimGraphNode::SkipPostUpdate ( AnimGraphInstance animGraphInstance)
inlinevirtual

Inform a node that PostUpdate will not be called for the current evaluation cycle

Some node types allocate data in Update and expect to release that data in PostUpdate. However, PostUpdate is not always called (like when transitioning out of a node). This method allows the node to perform the necessary cleanup.

◆ Update()

void EMotionFX::AnimGraphNode::Update ( AnimGraphInstance animGraphInstance,
float  timePassedInSeconds 
)
overrideprotectedvirtual

Reimplemented from EMotionFX::AnimGraphObject.


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