When creating Physics Assets, either by automatic creation upon import, creation from skeletal meshes already in the project, or when we press Generate All Bodies (bottom right of a opened Physics Asset editor screen, shows when no Body is selected) from an already created Physics Asset, the Names of the primitives are set as None, instead of the template BoneName_PrimitiveType.
If we select one Body (or multiple) and call Re-generate Bodies (by pressing the bottom right button of an open Physics Asset, by right-clicking on a Body and selecting, or right-clicking on a Body in the Graph and selecting), the Body is refreshed and the Name is properly set as BoneName_PrimitiveType.
Searching the the source code, it looks like a method called FPhysicsAssetEditorSharedData::AutoNameAllPrimitives is not being called when the Physics Asset is being generated automatically, and that is the reason why the primitives are not being properly named.
The workaround of selecting every Body and Re-generating Bodies fix the naming issue but causes the primitive sizes to not fit as well as when they are generated automatically.
Create a project based on the third person template
Select the SKM_Manny (/Game/Characters/Mannequins/Meshes/SKM_Manny.SKM_Manny), right-click, go to Asset Actions>Export...
Select a folder and give it a name (default is fine)
Create a new folder in your project for importing
Enter the folder, right-click, select Import to <folder>
Navigate to your exported skeletal mesh, select it, press Open
Press Import All (default import options are fine)
You will end up with 5 files. Open the Physics Asset
On the Skeleton Tree panel, select any Body
On the Details panel, navigate to BodySetup>Primitives>Capsules>Index[0]>Name - it's None, but should be BoneName_capsule
I'm unsure where the AutoNameAllPrimitives should be called, so I've added the call stack from ApplyImportUIToImportOptions as it looked like a good candidate.
> UnrealEditor-UnrealEd.dll!UnFbx::ApplyImportUIToImportOptions(UFbxImportUI * ImportUI, UnFbx::FBXImportOptions & InOutImportOptions) Line 381 C++
UnrealEditor-UnrealEd.dll!UnFbx::GetImportOptions(UnFbx::FFbxImporter * FbxImporter, UFbxImportUI * ImportUI, bool bShowOptionDialog, bool bIsAutomated, const FString & FullPath, bool & OutOperationCanceled, bool & bOutImportAll, bool bIsObjFormat, const FString & InFilename, bool bForceImportType, EFBXImportType ImportType) Line 312 C++
UnrealEditor-UnrealEd.dll!UFbxFactory::FactoryCreateFile(UClass * Class, UObject * InParent, FName Name, EObjectFlags Flags, const FString & InFilename, const wchar_t * Parms, FFeedbackContext * Warn, bool & bOutOperationCanceled) Line 369 C++
UnrealEditor-UnrealEd.dll!UFactory::ImportObject(UClass * InClass, UObject * InOuter, FName InName, EObjectFlags InFlags, const FString & Filename, const wchar_t * Parms, bool & OutCanceled) Line 206 C++
UnrealEditor-AssetTools.dll!UAssetToolsImpl::ImportAssetsInternal(const TArray<FString,TSizedDefaultAllocator<32>> & Files, const FString & RootDestinationPath, TArray<TTuple<FString,FString>,TSizedDefaultAllocator<32>> * FilesAndDestinationsPtr, const FAssetImportParams & Params) Line 4141 C++
UnrealEditor-AssetTools.dll!UAssetToolsImpl::ImportAssets(const TArray<FString,TSizedDefaultAllocator<32>> & Files, const FString & DestinationPath, UFactory * ChosenFactory, bool bSyncToBrowser, TArray<TTuple<FString,FString>,TSizedDefaultAllocator<32>> * FilesAndDestinations, bool bAllowAsyncImport, bool bSceneImport) Line 2997 C++
UnrealEditor-AssetTools.dll!UAssetToolsImpl::ImportAssetsWithDialogImplementation(const FString & DestinationPath, bool bAllowAsyncImport) Line 6332 C++
UnrealEditor-AssetTools.dll!UAssetToolsImpl::ImportAssetsWithDialogAsync(const FString & DestinationPath) Line 2826 C++
[External Code]
UnrealEditor-AssetTools.dll!UAssetToolsImpl::ImportAssetsWithDialogAsync(const FString & DestinationPath) Line 2824 C++
[External Code]
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-228880 in the post.
0 |
Component | UE - Editor - Content Pipeline - Import and Export |
---|---|
Affects Versions | 5.4.4 |
Target Fix | 5.6 |
Created | Oct 27, 2024 |
---|---|
Updated | Nov 27, 2024 |