You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
AltSkinWeights - Crash - Reimporting Base Mesh while previewing Skin Weight Profile causes editor to crash
#fix Clear and reset profile when reimporting skeletal mesh #jira UE-74041 #rb Alexis.Matte [CL 6800649 by Jurre deBaare in Dev-Anim branch]
This commit is contained in:
@@ -883,12 +883,30 @@ UObject* FSkeletalMeshEditor::HandleGetAsset()
|
||||
|
||||
bool FSkeletalMeshEditor::HandleReimportMeshInternal(int32 SourceFileIndex /*= INDEX_NONE*/, bool bWithNewFile /*= false*/)
|
||||
{
|
||||
// Make sure we clear any skin weight profile currently being previewed
|
||||
UDebugSkelMeshComponent * MeshComponent = GetPersonaToolkit()->GetPreviewScene()->GetPreviewMeshComponent();
|
||||
const FName ProfileName = MeshComponent->GetCurrentSkinWeightProfileName();
|
||||
if (MeshComponent)
|
||||
{
|
||||
MeshComponent->ClearSkinWeightProfile();
|
||||
}
|
||||
|
||||
// Reimport the asset
|
||||
const bool bResult = FReimportManager::Instance()->Reimport(SkeletalMesh, true, true, TEXT(""), nullptr, SourceFileIndex, bWithNewFile);
|
||||
|
||||
// Refresh skeleton tree
|
||||
SkeletonTree->Refresh();
|
||||
|
||||
if (ProfileName != NAME_None)
|
||||
{
|
||||
if (MeshComponent)
|
||||
{
|
||||
MeshComponent->SetSkinWeightProfile(ProfileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user