engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Protected 成员函数 | 静态 Protected 成员函数 | Protected 属性 | 友元 | 所有成员列表
FAnimInstanceProxy结构体 参考

Proxy object passed around during animation tree update in lieu of a UAnimInstance 更多...

#include <AnimInstanceProxy.h>

+ 类 FAnimInstanceProxy 继承关系图:

Public 成员函数

void AddAnimNotifyFromGeneratedClass (int32 NotifyIndex)
 Queues an Anim Notify from the shared list on our generated class
 
void GatherDebugData (FNodeDebugData &DebugData)
 Gather debug data from this instance proxy and the blend tree for display
 
void GatherDebugData_WithRoot (FNodeDebugData &DebugData, FAnimNode_Base *InRootNode, FName InLayerName)
 Gather debug data from this instance proxy and the specified blend tree root for display
 
const FTransform & GetActorTransform () const
 Get the transform of the actor we are running on
 
FAnimBlueprintDebugData * GetAnimBlueprintDebugData () const
 Get the debug data for this instance's anim bp
 
UObject * GetAnimInstanceObject ()
 Access UObject base of UAnimInstance
 
template<class NodeType >
NodeType * GetCheckedNodeFromIndex (int32 NodeIdx)
 Gets a checked node given an index into the node property array
 
FAnimNode_Base * GetCheckedNodeFromIndexUntyped (int32 NodeIdx, UScriptStruct *RequiredStructType)
 Gets a checked node given an index into the node property array
 
const FTransform & GetComponentRelativeTransform () const
 Get the relative transform of the component we are running on
 
const FTransform & GetComponentTransform () const
 Get the component to world transform of the component we are running on
 
float GetDeltaSeconds () const
 Get the last DeltaSeconds passed into PreUpdate()
 
FRootMotionMovementParams & GetExtractedRootMotion ()
 Access root motion params
 
const FGraphTraversalCounter & GetInitializationCounter () const
 Access various counters
 
int32 GetInstanceAssetPlayerIndex (FName MachineName, FName StateName, FName InstanceName=NAME_None)
 Get the index of the specified instance asset player. 更多...
 
TArray< FAnimNode_AssetPlayerBase * > GetInstanceAssetPlayers (const FName &GraphName)
 Returns all Animation Nodes of FAnimNode_AssetPlayerBase class within the specified (named) Animation Graph
 
int32 GetLODLevel () const
 Access to LODLevel
 
template<class NodeType >
NodeType * GetNodeFromIndex (int32 NodeIdx)
 Gets an unchecked (can return nullptr) node given an index into the node property array
 
FAnimNode_Base * GetNodeFromIndexUntyped (int32 NodeIdx, UScriptStruct *RequiredStructType)
 Gets an unchecked (can return nullptr) node given an index into the node property array
 
const FPoseSnapshot * GetPoseSnapshot (FName SnapshotName) const
 Get a cached pose snapshot by name
 
FBoneContainer & GetRequiredBones ()
 access to required bones array
 
const FBoneContainer & GetRequiredBones () const
 const access to required bones array
 
FAnimNode_Base * GetRootNode ()
 
USkeleton * GetSkeleton ()
 Get the current skeleton we are using. 更多...
 
USkeletalMeshComponent * GetSkelMeshComponent () const
 Get the current skeletal mesh component we are running on. 更多...
 
void GetSlotWeight (const FName &SlotNodeName, float &out_SlotNodeWeight, float &out_SourceWeight, float &out_TotalNodeWeight) const
 Get Slot Node Weight : this returns new Slot Node Weight, Source Weight, Original TotalNodeWeight this 3 values can't be derived from each other 更多...
 
FAnimNode_StateMachine * GetStateMachineInstanceFromName (FName MachineName)
 Gets the runtime instance of the specified state machine by Name
 
const FSyncGroupMap & GetSyncGroupMapRead () const
 Get the sync group we are currently reading from
 
float GetTimeDilation () const
 Get the last time dilation, gleaned from world settings
 
const TArray< FAnimTickRecord > & GetUngroupedActivePlayersRead ()
 Get the ungrouped active player we are currently reading from
 
bool HasRootNode () const
 Check whether we have a valid root node
 
bool IsSkeletonCompatible (USkeleton const *InSkeleton) const
 Check whether the supplied skeleton is compatible with this instance's skeleton
 
void MakeBlendSpaceTickRecord (FAnimTickRecord &TickRecord, UBlendSpaceBase *BlendSpace, const FVector &BlendInput, TArray< FBlendSampleData > &BlendSampleDataCache, FBlendFilter &BlendFilter, bool bLooping, float PlayRate, float FinalBlendWeight, float &CurrentTime, FMarkerTickRecord &MarkerTickRecord) const
 Helper function: make a tick record for a blend space
 
void MakePoseAssetTickRecord (FAnimTickRecord &TickRecord, class UPoseAsset *PoseAsset, float FinalBlendWeight) const
 Helper function: make a tick record for a pose asset
 
void MakeSequenceTickRecord (FAnimTickRecord &TickRecord, UAnimSequenceBase *Sequence, bool bLooping, float PlayRate, float FinalBlendWeight, float &CurrentTime, FMarkerTickRecord &MarkerTickRecord) const
 Helper function: make a tick record for a sequence
 
void RegisterSlotNodeWithAnimInstance (const FName &SlotNodeName)
 Register a named slot
 
void ResetDynamics (ETeleportType InTeleportType)
 Reset any dynamics running simulation-style updates (e.g. 更多...
 
void SavePoseSnapshot (USkeletalMeshComponent *InSkeletalMeshComponent, FName SnapshotName)
 Save a pose snapshot to the internal snapshot cache
 
bool ShouldExtractRootMotion () const
 Check whether we should extract root motion
 
void SlotEvaluatePose (const FName &SlotNodeName, const FCompactPose &SourcePose, const FBlendedCurve &SourceCurve, float InSourceWeight, FCompactPose &BlendedPose, FBlendedCurve &BlendedCurve, float InBlendWeight, float InTotalNodeWeight)
 Evaluate a pose for a named montage slot
 
void TickAssetPlayerInstances ()
 Tick active asset players. 更多...
 
void TickAssetPlayerInstances (float DeltaSeconds)
 Tick active asset players.
 
void TriggerAnimNotifies (USkeletalMeshComponent *SkelMeshComp, float DeltaSeconds)
 Trigger any anim notifies
 

静态 Public 成员函数

static const FBakedAnimationStateMachine * GetMachineDescription (IAnimClassInterface *AnimBlueprintClass, FAnimNode_StateMachine *MachineInstance)
 Get the machine description for the specified instance. 更多...
 

Protected 成员函数

void AddAnimNotifies (const TArray< FAnimNotifyEventReference > &NewNotifies, const float InstanceWeight)
 Add anim notifier
 
void AddCurveValue (const FSmartNameMapping &Mapping, const FName &CurveName, float Value)
 Add a curve value
 
virtual void AddReferencedObjects (UAnimInstance *InAnimInstance, FReferenceCollector &Collector)
 Manually add object references to GC
 
void BindNativeDelegates ()
 Bind any native delegates that we have set up
 
virtual void CacheBones ()
 Cache bones override point. 更多...
 
virtual void CacheBones_WithRoot (FAnimNode_Base *InRootNode)
 Cache bones override point. 更多...
 
float CalcSlotMontageLocalWeight (const FName &SlotNodeName) const
 Get local weight of any montages this slot is playing. 更多...
 
virtual void ClearObjects ()
 Clear any UObjects we might be using. 更多...
 
virtual bool Evaluate (FPoseContext &Output)
 Evaluate override point 更多...
 
virtual bool Evaluate_WithRoot (FPoseContext &Output, FAnimNode_Base *InRootNode)
 Evaluate override point with root node override. 更多...
 
void EvaluateAnimation (FPoseContext &Output)
 Evaluates the anim graph if Evaluate() returns false
 
void EvaluateAnimation_WithRoot (FPoseContext &Output, FAnimNode_Base *InRootNode)
 Evaluates the anim graph given the specified root if Evaluate() returns false
 
void EvaluateAnimationNode (FPoseContext &Output)
 Evaluates the anim graph
 
void EvaluateAnimationNode_WithRoot (FPoseContext &Output, FAnimNode_Base *InRootNode)
 Evaluates the anim graph given the specified root
 
const FMontageEvaluationState * GetActiveMontageEvaluationState () const
 Get Currently active montage evaluation state. 更多...
 
TMap< FName, float > & GetAnimationCurves (EAnimCurveType InCurveType)
 Get the current value of all animation curves
 
virtual void GetCustomNodes (TArray< FAnimNode_Base * > &OutNodes)
 Called when the anim instance is being initialized. 更多...
 
virtual FAnimNode_Base * GetCustomRootNode ()
 Called when the anim instance is being initialized. 更多...
 
float GetInstanceAssetPlayerLength (int32 AssetPlayerIndex)
 Gets the length in seconds of the asset referenced in an asset player node
 
float GetInstanceAssetPlayerTime (int32 AssetPlayerIndex)
 Get the current accumulated time in seconds for an asset player node
 
float GetInstanceAssetPlayerTimeFraction (int32 AssetPlayerIndex)
 Get the current accumulated time as a fraction for an asset player node
 
float GetInstanceAssetPlayerTimeFromEnd (int32 AssetPlayerIndex)
 Get the time in seconds from the end of an animation in an asset player node
 
float GetInstanceAssetPlayerTimeFromEndFraction (int32 AssetPlayerIndex)
 Get the time as a fraction of the asset length of an animation in an asset player node
 
float GetInstanceCurrentStateElapsedTime (int32 MachineIndex)
 Get the current elapsed time of a state within the specified state machine
 
float GetInstanceMachineWeight (int32 MachineIndex)
 Get the blend weight of a specified state
 
float GetInstanceStateWeight (int32 MachineIndex, int32 StateIndex)
 Get the blend weight of a specified state
 
float GetInstanceTransitionCrossfadeDuration (int32 MachineIndex, int32 TransitionIndex)
 Get the crossfade duration of a specified transition
 
float GetInstanceTransitionTimeElapsed (int32 MachineIndex, int32 TransitionIndex)
 Get the elapsed time in seconds of a specified transition
 
float GetInstanceTransitionTimeElapsedFraction (int32 MachineIndex, int32 TransitionIndex)
 Get the elapsed time as a fraction of the crossfade duration of a specified transition
 
TArray< FMontageEvaluationState > & GetMontageEvaluationData ()
 Access montage array data
 
const TArray< FMontageEvaluationState > & GetMontageEvaluationData () const
 Access montage array data
 
template<class NodeType >
NodeType * GetNodeFromProperty (FProperty *Property)
 Gets an unchecked (can return nullptr) node given a property of the anim instance
 
float GetRelevantAnimLength (int32 MachineIndex, int32 StateIndex)
 Get the length in seconds of the most relevant animation in the source state
 
float GetRelevantAnimTime (int32 MachineIndex, int32 StateIndex)
 Get the current accumulated time in seconds for the most relevant animation in the source state
 
float GetRelevantAnimTimeFraction (int32 MachineIndex, int32 StateIndex)
 Get the current accumulated time as a fraction of the length of the most relevant animation in the source state
 
float GetRelevantAnimTimeRemaining (int32 MachineIndex, int32 StateIndex)
 Get the time remaining in seconds for the most relevant animation in the source state
 
float GetRelevantAnimTimeRemainingFraction (int32 MachineIndex, int32 StateIndex)
 Get the time remaining as a fraction of the duration for the most relevant animation in the source state
 
FAnimNode_AssetPlayerBase * GetRelevantAssetPlayerFromState (int32 MachineIndex, int32 StateIndex)
 Check whether we have active morph target curves 更多...
 
float GetSlotMontageGlobalWeight (const FName &SlotNodeName) const
 Get Global weight of any montages this slot node is playing. 更多...
 
float GetSlotMontageLocalWeight (const FName &SlotNodeName) const
 Get local weight of any montages this slot node is playing. 更多...
 
float GetSlotNodeGlobalWeight (const FName &SlotNodeName) const
 Get global weight in AnimGraph for this slot node. 更多...
 
int32 GetStateMachineIndex (FName MachineName)
 Gets the index of the state machine matching MachineName
 
FAnimNode_StateMachine * GetStateMachineInstance (int32 MachineIndex)
 Gets the runtime instance of the specified state machine
 
const FBakedAnimationStateMachine * GetStateMachineInstanceDesc (FName MachineName)
 Gets the runtime instance desc of the state machine specified by name
 
int32 GetSyncGroupIndexFromName (FName SyncGroupName) const
 Returns the baked sync group index from the compile step
 
bool HasActiveCurves () const
 Check whether we have any active curves
 
virtual void Initialize (UAnimInstance *InAnimInstance)
 Called when our anim instance is being initialized
 
virtual void InitializeObjects (UAnimInstance *InAnimInstance)
 Copy any UObjects we might be using. 更多...
 
void InitializeRootNode (bool bInDeferRootNodeInitialization=false)
 Initialize the root node - split into a separate function for backwards compatibility (initialization order) reasons
 
void InitializeRootNode_WithRoot (FAnimNode_Base *InRootNode)
 Initialize the specified root node
 
void LogMessage (FName InLogType, EMessageSeverity::Type InSeverity, const FText &InMessage) const
 Allow nodes to register log messages to be processed on the game thread
 
void OnPreUpdateLODChanged (const int32 PreviousLODIndex, const int32 NewLODIndex)
 Called during PreUpdate, if SkelMesh LOD has changed since last update
 
virtual void PostEvaluate (UAnimInstance *InAnimInstance)
 Called after evaluate so we can do any game thread work we need to
 
virtual void PostUpdate (UAnimInstance *InAnimInstance) const
 Called after update so we can copy any data we need
 
virtual void PreEvaluateAnimation (UAnimInstance *InAnimInstance)
 Called on the game thread pre-evaluate.
 
virtual void PreUpdate (UAnimInstance *InAnimInstance, float DeltaSeconds)
 Called before update so we can copy any data we need
 
void RecalcRequiredBones (USkeletalMeshComponent *Component, UObject *Asset)
 Recalculate Required Bones [RequiredBones] Is called when bRequiredBonesUpToDate = false
 
void RecalcRequiredCurves (const FCurveEvaluationOption &CurveEvalOption)
 Recalculate required curve list for animation - if you call RecalcRequiredBones, this should already happen
 
void ResetAnimationCurves ()
 Reset Animation Curves
 
virtual void Uninitialize (UAnimInstance *InAnimInstance)
 Called when our anim instance is being uninitialized
 
virtual void Update (float DeltaSeconds)
 Update override point
 
void UpdateAnimation ()
 Calls Update(), updates the anim graph, ticks asset players
 
void UpdateAnimation_WithRoot (const FAnimationUpdateContext &InContext, FAnimNode_Base *InRootNode, FName InLayerName)
 Calls Update(), updates the anim graph from the specified root, ticks asset players
 
virtual void UpdateAnimationNode (const FAnimationUpdateContext &InContext)
 Updates the anim graph
 
virtual void UpdateAnimationNode_WithRoot (const FAnimationUpdateContext &InContext, FAnimNode_Base *InRootNode, FName InLayerName)
 Updates the anim graph using a specified root node
 
void UpdateCurvesPostEvaluation (USkeletalMeshComponent *SkelMeshComp)
 Update curves once evaluation has taken place. 更多...
 
void UpdateCurvesToComponents (USkeletalMeshComponent *Component)
 Update the material parameters of the supplied component from this instance
 
void UpdateCurvesToEvaluationContext (const FAnimationEvaluationContext &InContext)
 Pushes blended heap curve to output curves in the proxy using required bones cached data
 

静态 Protected 成员函数

static void InitializeInputProxy (FAnimInstanceProxy *InputProxy, UAnimInstance *InAnimInstance)
 Custom proxy Init/Cache/Update/Evaluate functions
 

Protected 属性

uint8 bBoneCachesInvalidated: 1
 When RequiredBones mapping has changed, AnimNodes need to update their bones caches.
 

友元

struct FAnimationBaseContext
 
class UAnimInstance
 Only restricted classes can access the protected interface
 
class USkeletalMeshComponent
 

详细描述

Proxy object passed around during animation tree update in lieu of a UAnimInstance

成员函数说明

◆ CacheBones()

virtual void FAnimInstanceProxy::CacheBones ( )
protectedvirtual

Cache bones override point.

You should call CacheBones on any nodes that need it here. bBoneCachesInvalidated is used to only perform this when needed (e.g. when a LOD changes), as it is usually an expensive operation.

◆ CacheBones_WithRoot()

virtual void FAnimInstanceProxy::CacheBones_WithRoot ( FAnimNode_Base *  InRootNode)
protectedvirtual

Cache bones override point.

You should call CacheBones on any nodes that need it here. bBoneCachesInvalidated is used to only perform this when needed (e.g. when a LOD changes), as it is usually an expensive operation.

◆ CalcSlotMontageLocalWeight()

float FAnimInstanceProxy::CalcSlotMontageLocalWeight ( const FName &  SlotNodeName) const
protected

Get local weight of any montages this slot is playing.

If this slot is not current playing a montage, it will return 0. This will return up to date data if called during Update or Evaluate.

◆ ClearObjects()

virtual void FAnimInstanceProxy::ClearObjects ( )
protectedvirtual

Clear any UObjects we might be using.

Called at the end of the post-evaluate phase. This is to ensure that objects are not used by anything apart from animation nodes. Please make sure to call the base implementation if this is overridden.

被 FAnimSingleNodeInstanceProxy 重载.

◆ Evaluate()

virtual bool FAnimInstanceProxy::Evaluate ( FPoseContext &  Output)
inlineprotectedvirtual

Evaluate override point

返回
true if this function is implemented, false otherwise. Note: the node graph will not be evaluated if this function returns true

被 FAnimSequencerInstanceProxy , 以及 FAnimSingleNodeInstanceProxy 重载.

◆ Evaluate_WithRoot()

virtual bool FAnimInstanceProxy::Evaluate_WithRoot ( FPoseContext &  Output,
FAnimNode_Base *  InRootNode 
)
inlineprotectedvirtual

Evaluate override point with root node override.

返回
true if this function is implemented, false otherwise. Note: the node graph will not be evaluated if this function returns true

◆ GetActiveMontageEvaluationState()

const FMontageEvaluationState * FAnimInstanceProxy::GetActiveMontageEvaluationState ( ) const
protected

Get Currently active montage evaluation state.

Note that there might be multiple Active at the same time. This will only return the first active one it finds.

◆ GetCustomNodes()

virtual void FAnimInstanceProxy::GetCustomNodes ( TArray< FAnimNode_Base * > &  OutNodes)
inlineprotectedvirtual

Called when the anim instance is being initialized.

If we are not using a blueprint instance, these nodes can be provided

◆ GetCustomRootNode()

virtual FAnimNode_Base * FAnimInstanceProxy::GetCustomRootNode ( )
inlineprotectedvirtual

Called when the anim instance is being initialized.

If we are not using a blueprint instance, this root node can be provided

◆ GetInstanceAssetPlayerIndex()

int32 FAnimInstanceProxy::GetInstanceAssetPlayerIndex ( FName  MachineName,
FName  StateName,
FName  InstanceName = NAME_None 
)

Get the index of the specified instance asset player.

Useful to pass to GetInstanceAssetPlayerLength (etc.). Passing NAME_None to InstanceName will return the first (assumed only) player instance index found.

◆ GetMachineDescription()

static const FBakedAnimationStateMachine * FAnimInstanceProxy::GetMachineDescription ( IAnimClassInterface *  AnimBlueprintClass,
FAnimNode_StateMachine *  MachineInstance 
)
static

Get the machine description for the specified instance.

Does not rely on PRIVATE_MachineDescription being initialized

◆ GetRelevantAssetPlayerFromState()

FAnimNode_AssetPlayerBase * FAnimInstanceProxy::GetRelevantAssetPlayerFromState ( int32  MachineIndex,
int32  StateIndex 
)
protected

Check whether we have active morph target curves

Gets the most relevant asset player in a specified state

◆ GetRootNode()

FAnimNode_Base * FAnimInstanceProxy::GetRootNode ( )
inline
待办事项:
: remove after deprecation

◆ GetSkeleton()

USkeleton * FAnimInstanceProxy::GetSkeleton ( )
inline

Get the current skeleton we are using.

Note that this will return nullptr outside of pre/post update

◆ GetSkelMeshComponent()

USkeletalMeshComponent * FAnimInstanceProxy::GetSkelMeshComponent ( ) const
inline

Get the current skeletal mesh component we are running on.

Note that this will return nullptr outside of pre/post update

◆ GetSlotMontageGlobalWeight()

float FAnimInstanceProxy::GetSlotMontageGlobalWeight ( const FName &  SlotNodeName) const
protected

Get Global weight of any montages this slot node is playing.

If this slot is not currently playing a montage, it will return 0.

◆ GetSlotMontageLocalWeight()

float FAnimInstanceProxy::GetSlotMontageLocalWeight ( const FName &  SlotNodeName) const
protected

Get local weight of any montages this slot node is playing.

If this slot is not currently playing a montage, it will return 0. This is double buffered, will return last frame data if called from Update or Evaluate.

◆ GetSlotNodeGlobalWeight()

float FAnimInstanceProxy::GetSlotNodeGlobalWeight ( const FName &  SlotNodeName) const
protected

Get global weight in AnimGraph for this slot node.

Note: this is the weight of the node, not the weight of any potential montage it is playing.

◆ GetSlotWeight()

void FAnimInstanceProxy::GetSlotWeight ( const FName &  SlotNodeName,
float &  out_SlotNodeWeight,
float &  out_SourceWeight,
float &  out_TotalNodeWeight 
) const

Get Slot Node Weight : this returns new Slot Node Weight, Source Weight, Original TotalNodeWeight this 3 values can't be derived from each other

参数
SlotNodeName: the name of the slot node you're querying
out_SlotNodeWeight: The node weight for this slot node in the range of [0, 1]
out_SourceWeight: The Source weight for this node.
out_TotalNodeWeight: Total weight of this node

◆ InitializeObjects()

virtual void FAnimInstanceProxy::InitializeObjects ( UAnimInstance *  InAnimInstance)
protectedvirtual

Copy any UObjects we might be using.

Called Pre-update and pre-evaluate.

被 FAnimSingleNodeInstanceProxy 重载.

◆ ResetDynamics()

void FAnimInstanceProxy::ResetDynamics ( ETeleportType  InTeleportType)

Reset any dynamics running simulation-style updates (e.g.

on teleport, time skip etc.)

◆ TickAssetPlayerInstances()

void FAnimInstanceProxy::TickAssetPlayerInstances ( )

Tick active asset players.

This overload with no parameters uses CurrentDeltaSeconds

◆ UpdateCurvesPostEvaluation()

void FAnimInstanceProxy::UpdateCurvesPostEvaluation ( USkeletalMeshComponent *  SkelMeshComp)
protected

Update curves once evaluation has taken place.

Mostly pushes curves to materials/morphs


该结构体的文档由以下文件生成: