You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fix exception when right-clicking a child of a template AnimBP that has no skeleton
#rb Thomas.Sarkanen #preflight 61a4f03aec124631d737744d #ROBOMERGE-AUTHOR: lucas.dower #ROBOMERGE-SOURCE: CL 18311875 in //UE5/Release-5.0/... via CL 18311899 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469) [CL 18311931 by lucas dower in ue5-release-engine-test branch]
This commit is contained in:
+6
-1
@@ -39,7 +39,7 @@ void FAssetTypeActions_AnimBlueprint::GetActions(const TArray<UObject*>& InObjec
|
||||
UAnimBlueprint* AnimBlueprint = AnimBlueprints[0].Get();
|
||||
|
||||
// Accept (non-interface) template anim BPs or anim BPs with compatible skeletons
|
||||
if(AnimBlueprint && AnimBlueprint->BlueprintType != BPTYPE_Interface && ((AnimBlueprint->TargetSkeleton == nullptr && AnimBlueprint->bIsTemplate) || AnimBlueprint->TargetSkeleton->GetCompatibleSkeletons().Num() > 0))
|
||||
if(AnimBlueprint && AnimBlueprint->BlueprintType != BPTYPE_Interface && ((AnimBlueprint->TargetSkeleton == nullptr && AnimBlueprint->bIsTemplate) || (AnimBlueprint->TargetSkeleton != nullptr && AnimBlueprint->TargetSkeleton->GetCompatibleSkeletons().Num() > 0)))
|
||||
{
|
||||
Section.AddSubMenu(
|
||||
"AnimBlueprint_NewSkeletonChildBlueprint",
|
||||
@@ -325,6 +325,11 @@ void FAssetTypeActions_AnimBlueprint::ExecuteFindSkeleton(TArray<TWeakObjectPtr<
|
||||
{
|
||||
FAssetTools::Get().SyncBrowserToAssets(ObjectsToSync);
|
||||
}
|
||||
else
|
||||
{
|
||||
FText ShouldRetargetMessage = LOCTEXT("NoSkeletonFound", "Could not find the skeleton");
|
||||
FMessageDialog::Open(EAppMsgType::Ok, ShouldRetargetMessage);
|
||||
}
|
||||
}
|
||||
|
||||
void FAssetTypeActions_AnimBlueprint::RetargetAnimationHandler(USkeleton* OldSkeleton, USkeleton* NewSkeleton, bool bRemapReferencedAssets, bool bAllowRemapToExisting, bool bConvertSpaces, const EditorAnimUtils::FNameDuplicationRule* NameRule, TArray<TWeakObjectPtr<UObject>> AnimBlueprints)
|
||||
|
||||
Reference in New Issue
Block a user