本文整理汇总了C++中FAnimationUpdateContext::GetFinalBlendWeight方法的典型用法代码示例。如果您正苦于以下问题:C++ FAnimationUpdateContext::GetFinalBlendWeight方法的具体用法?C++ FAnimationUpdateContext::GetFinalBlendWeight怎么用?C++ FAnimationUpdateContext::GetFinalBlendWeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FAnimationUpdateContext
的用法示例。
在下文中一共展示了FAnimationUpdateContext::GetFinalBlendWeight方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAssetPlayer
void FAnimNode_SequencePlayer::UpdateAssetPlayer(const FAnimationUpdateContext& Context)
{
EvaluateGraphExposedInputs.Execute(Context);
if ((Sequence != NULL) && (Context.AnimInstance->CurrentSkeleton->IsCompatible(Sequence->GetSkeleton())))
{
const float FinalBlendWeight = Context.GetFinalBlendWeight();
// Create a tick record and fill it out
FAnimGroupInstance* SyncGroup;
FAnimTickRecord& TickRecord = Context.AnimInstance->CreateUninitializedTickRecord(GroupIndex, /*out*/ SyncGroup);
if (InternalTimeAccumulator > Sequence->SequenceLength)
{
InternalTimeAccumulator = 0.f;
}
Context.AnimInstance->MakeSequenceTickRecord(TickRecord, Sequence, bLoopAnimation, PlayRate, FinalBlendWeight, /*inout*/ InternalTimeAccumulator);
// Update the sync group if it exists
if (SyncGroup != NULL)
{
SyncGroup->TestTickRecordForLeadership(GroupRole);
}
}
}
示例2: Update
void FPoseLinkBase::Update(const FAnimationUpdateContext& Context)
{
QUICK_SCOPE_CYCLE_COUNTER(STAT_FPoseLinkBase_Update);
#if DO_CHECK
checkf( !bProcessed, TEXT( "Update already in progress, circular link for AnimInstance [%s] Blueprint [%s]" ), \
*Context.AnimInstanceProxy->GetAnimInstanceName(), *GetFullNameSafe(IAnimClassInterface::GetActualAnimClass(Context.AnimInstanceProxy->GetAnimClassInterface())));
TGuardValue<bool> CircularGuard(bProcessed, true);
#endif
#if WITH_EDITOR
if (GIsEditor)
{
if (LinkedNode == NULL)
{
//@TODO: Should only do this when playing back
AttemptRelink(Context);
}
// Record the node line activation
if (LinkedNode != NULL)
{
if (Context.AnimInstanceProxy->IsBeingDebugged())
{
Context.AnimInstanceProxy->RecordNodeVisit(LinkID, SourceLinkID, Context.GetFinalBlendWeight());
}
}
}
#endif
#if ENABLE_ANIMGRAPH_TRAVERSAL_DEBUG
checkf(InitializationCounter.IsSynchronizedWith(Context.AnimInstanceProxy->GetInitializationCounter()), TEXT("Calling Update without initialization!"));
UpdateCounter.SynchronizeWith(Context.AnimInstanceProxy->GetUpdateCounter());
#endif
if (LinkedNode != NULL)
{
LinkedNode->Update(Context);
}
}
示例3: Update
void FAnimNode_QueuedSequencePlayer::Update(const FAnimationUpdateContext& Context)
{
EvaluateGraphExposedInputs.Execute(Context);
if (CurrentSequence == nullptr ||
(NextSequence != nullptr && (InternalTimeAccumulator + SMALL_NUMBER >= CurrentSequence->SequenceLength || LastInternalTimeAccumulator > InternalTimeAccumulator)))
{
CurrentSequence = NextSequence;
InternalTimeAccumulator = 0;
}
if ((CurrentSequence != NULL) && (Context.AnimInstanceProxy->GetSkeleton()->IsCompatible(CurrentSequence->GetSkeleton())))
{
const float fTriggerTime = FMath::Max(0.f, CurrentSequence->SequenceLength - EndOfPlayEventTime);
if (LastInternalTimeAccumulator < fTriggerTime && InternalTimeAccumulator >= fTriggerTime)
{
UAnimInstance* Instance = Context.AnimInstanceProxy->GetSkelMeshComponent()->GetAnimInstance();
UFunction* EOPFunc = Instance->FindFunction(EndOfPlayEvent);
if (EOPFunc != nullptr)
{
Instance->ProcessEvent(EOPFunc, nullptr);
}
}
const float FinalBlendWeight = Context.GetFinalBlendWeight();
// Create a tick record and fill it out
UAnimInstance* Instance = Context.AnimInstanceProxy->GetSkelMeshComponent()->GetAnimInstance();
FAnimGroupInstance* SyncGroup;
FAnimTickRecord& TickRecord = Context.AnimInstanceProxy->CreateUninitializedTickRecord(INDEX_NONE, /*out*/ SyncGroup);
Context.AnimInstanceProxy->MakeSequenceTickRecord(TickRecord, CurrentSequence, false, 1.0, FinalBlendWeight, /*inout*/ InternalTimeAccumulator, *TickRecord.MarkerTickRecord);
}
LastInternalTimeAccumulator = InternalTimeAccumulator;
}
示例4: UpdateInternal
void FAnimNode_BlendSpacePlayer::UpdateInternal(const FAnimationUpdateContext& Context)
{
if ((BlendSpace != NULL) && (Context.AnimInstanceProxy->IsSkeletonCompatible(BlendSpace->GetSkeleton())))
{
// Create a tick record and fill it out
FAnimGroupInstance* SyncGroup;
FAnimTickRecord& TickRecord = Context.AnimInstanceProxy->CreateUninitializedTickRecord(GroupIndex, /*out*/ SyncGroup);
const FVector BlendInput(X, Y, Z);
if (PreviousBlendSpace != BlendSpace)
{
Reinitialize();
}
Context.AnimInstanceProxy->MakeBlendSpaceTickRecord(TickRecord, BlendSpace, BlendInput, BlendSampleDataCache, BlendFilter, bLoop, PlayRate, Context.GetFinalBlendWeight(), /*inout*/ InternalTimeAccumulator, MarkerTickRecord);
// Update the sync group if it exists
if (SyncGroup != NULL)
{
SyncGroup->TestTickRecordForLeadership(GroupRole);
}
PreviousBlendSpace = BlendSpace;
}
}
示例5: Update
void FAnimNode_BlendSpacePlayer::Update(const FAnimationUpdateContext& Context)
{
EvaluateGraphExposedInputs.Execute(Context);
if ((BlendSpace != NULL) && (Context.AnimInstance->CurrentSkeleton->IsCompatible(BlendSpace->GetSkeleton())))
{
// Create a tick record and fill it out
FAnimGroupInstance* SyncGroup;
FAnimTickRecord& TickRecord = Context.AnimInstance->CreateUninitializedTickRecord(GroupIndex, /*out*/ SyncGroup);
const FVector BlendInput(X, Y, Z);
Context.AnimInstance->MakeBlendSpaceTickRecord(TickRecord, BlendSpace, BlendInput, BlendSampleDataCache, BlendFilter, bLoop, PlayRate, Context.GetFinalBlendWeight(), /*inout*/ InternalTimeAccumulator);
// Update the sync group if it exists
if (SyncGroup != NULL)
{
SyncGroup->TestTickRecordForLeadership(GroupRole);
}
}
}