After remove control rig track from the skeletal mesh, Linked Anim Graph in Post Process Anim BP of the SK Mesh does NOT work.
This issue can be fixed by the following code.
// add #include "Animation/AnimNode_LinkedInputPose.h" void FControlRigBindingHelper::UnBindFromSequencerInstance(UControlRig* ControlRig) { check(ControlRig); if (!ControlRig->IsValidLowLevel() || ControlRig->HasAnyFlags(RF_BeginDestroyed) || !IsValid(ControlRig)) { return; } if (UControlRigComponent* ControlRigComponent = Cast<UControlRigComponent>(ControlRig->GetObjectBinding()->GetBoundObject())) { // todo: how do we reset the state? //ControlRig->Initialize(); } else if (USkeletalMeshComponent* SkeletalMeshComponent = Cast<USkeletalMeshComponent>(ControlRig->GetObjectBinding()->GetBoundObject())) { if (!SkeletalMeshComponent->IsValidLowLevel() || SkeletalMeshComponent->HasAnyFlags(RF_BeginDestroyed) || !IsValid(SkeletalMeshComponent)) { return; } UControlRigLayerInstance* AnimInstance = Cast<UControlRigLayerInstance>(SkeletalMeshComponent->GetAnimInstance()); if (AnimInstance) { if (!AnimInstance->IsValidLowLevel() || AnimInstance->HasAnyFlags(RF_BeginDestroyed) || !IsValid(AnimInstance)) { return; } AnimInstance->ResetNodes(); AnimInstance->RecalcRequiredBones(); AnimInstance->RemoveControlRigTrack(ControlRig->GetUniqueID()); } FAnimCustomInstanceHelper::UnbindFromSkeletalMeshComponent< UControlRigLayerInstance>(SkeletalMeshComponent); //////// // add if (UAnimInstance* postProcessAnimInstance = SkeletalMeshComponent->PostProcessAnimInstance) { postProcessAnimInstance->InitializeAnimation(); if (FAnimNode_LinkedInputPose* inputNode = postProcessAnimInstance->GetLinkedInputPoseNode()) { inputNode->CachedInputPose.SetBoneContainer(&postProcessAnimInstance->GetRequiredBones()); } } //////// } }
expect : There is no change. The SkeletalMesh's head size does not change from (3,3,3).
result : The SkeletalMesh's head return to normal size ( 1, 1 ,1 )
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
How to achieve HLSL Multiple Render Target in Material blueprints?
Delay nodes occasionally don't fire the "Completed" output in a nativized build
How can PaintContext be used as function parameter in OnPaint?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-166721 in the post.
0 |
Component | UE - Anim - Rigging - Control Rig |
---|---|
Affects Versions | 5.0.3, 5.1 |
Target Fix | 5.6 |
Created | Oct 11, 2022 |
---|---|
Updated | Sep 19, 2024 |