bool FAnimNode_Fabrik::IsValidToEvaluate(const USkeleton* Skeleton, const FBoneContainer& RequiredBones) { // Allow evaluation if all parameters are initialized and TipBone is child of RootBone return ( TipBone.IsValid(RequiredBones) && RootBone.IsValid(RequiredBones) && Precision > 0 && RequiredBones.BoneIsChildOf(TipBone.BoneIndex, RootBone.BoneIndex) ); }
// @todo fixme: slow approach. If the perbone gets popular, we should change this to array of weight // we should think about changing this to int32 UBlendSpaceBase::GetPerBoneInterpolationIndex(int32 BoneIndex, const FBoneContainer& RequiredBones) const { for (int32 Iter=0; Iter<PerBoneBlend.Num(); ++Iter) { // we would like to make sure if if (PerBoneBlend[Iter].BoneReference.IsValid(RequiredBones) && RequiredBones.BoneIsChildOf(BoneIndex, PerBoneBlend[Iter].BoneReference.BoneIndex)) { return Iter; } } return INDEX_NONE; }