void UAnimGraphNode_PoseByName::ValidateAnimNodeDuringCompilation(class USkeleton* ForSkeleton, class FCompilerResultsLog& MessageLog) { UPoseAsset* PoseAssetToCheck = Node.PoseAsset; UEdGraphPin* PoseAssetPin = FindPin(GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_PoseByName, PoseAsset)); if (PoseAssetPin != nullptr && PoseAssetToCheck == nullptr) { PoseAssetToCheck = Cast<UPoseAsset>(PoseAssetPin->DefaultObject); } if (PoseAssetToCheck == nullptr) { // we may have a connected node if (PoseAssetPin == nullptr || PoseAssetPin->LinkedTo.Num() == 0) { MessageLog.Error(TEXT("@@ references an unknown pose asset"), this); } } else { USkeleton* SeqSkeleton = PoseAssetToCheck->GetSkeleton(); if (SeqSkeleton&& // if anim sequence doesn't have skeleton, it might be due to anim sequence not loaded yet, @todo: wait with anim blueprint compilation until all assets are loaded? !SeqSkeleton->IsCompatible(ForSkeleton)) { MessageLog.Error(TEXT("@@ references sequence that uses different skeleton @@"), this, SeqSkeleton); } } }
void UAnimGraphNode_RotationOffsetBlendSpace::ValidateAnimNodeDuringCompilation(class USkeleton* ForSkeleton, class FCompilerResultsLog& MessageLog) { if (Node.BlendSpace == NULL) { MessageLog.Error(TEXT("@@ references an unknown blend space"), this); } else if (Cast<UAimOffsetBlendSpace>(Node.BlendSpace) == NULL && Cast<UAimOffsetBlendSpace1D>(Node.BlendSpace) == NULL) { MessageLog.Error(TEXT("@@ references an invalid blend space (one that is not an aim offset)"), this); } else { USkeleton* BlendSpaceSkeleton = Node.BlendSpace->GetSkeleton(); if (BlendSpaceSkeleton && // if blend space doesn't have skeleton, it might be due to blend space not loaded yet, @todo: wait with anim blueprint compilation until all assets are loaded? !BlendSpaceSkeleton->IsCompatible(ForSkeleton)) { MessageLog.Error(TEXT("@@ references blendspace that uses different skeleton @@"), this, BlendSpaceSkeleton); } } if (UAnimationSettings::Get()->bEnablePerformanceLog) { if (Node.LODThreshold < 0) { MessageLog.Warning(TEXT("@@ contains no LOD Threshold."), this); } } }
void UAnimGraphNode_PoseHandler::ValidateAnimNodeDuringCompilation(USkeleton* ForSkeleton, FCompilerResultsLog& MessageLog) { UPoseAsset* PoseAssetToCheck = GetPoseHandlerNode()->PoseAsset; UEdGraphPin* PoseAssetPin = FindPin(GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_PoseHandler, PoseAsset)); if (PoseAssetPin != nullptr && PoseAssetToCheck == nullptr) { PoseAssetToCheck = Cast<UPoseAsset>(PoseAssetPin->DefaultObject); } if (PoseAssetToCheck == nullptr) { if (PoseAssetPin == nullptr || PoseAssetPin->LinkedTo.Num() == 0) { MessageLog.Error(TEXT("@@ references an unknown poseasset"), this); } } else { USkeleton* SeqSkeleton = PoseAssetToCheck->GetSkeleton(); if (SeqSkeleton && // if PoseAsset doesn't have skeleton, it might be due to PoseAsset not loaded yet, @todo: wait with anim blueprint compilation until all assets are loaded? !SeqSkeleton->IsCompatible(ForSkeleton)) { MessageLog.Error(TEXT("@@ references poseasset that uses different skeleton @@"), this, SeqSkeleton); } } Super::ValidateAnimNodeDuringCompilation(ForSkeleton, MessageLog); }
void UAnimGraphNode_BlendSpacePlayer::ValidateAnimNodeDuringCompilation(class USkeleton* ForSkeleton, class FCompilerResultsLog& MessageLog) { if (Node.BlendSpace == NULL) { MessageLog.Error(TEXT("@@ references an unknown blend space"), this); } else { USkeleton * BlendSpaceSkeleton = Node.BlendSpace->GetSkeleton(); if (BlendSpaceSkeleton && // if blend space doesn't have skeleton, it might be due to blend space not loaded yet, @todo: wait with anim blueprint compilation until all assets are loaded? !BlendSpaceSkeleton->IsCompatible(ForSkeleton)) { MessageLog.Error(TEXT("@@ references blendspace that uses different skeleton @@"), this, BlendSpaceSkeleton); } } }