bImportMorphTargets
bImportMorphTargets
#Overview
name: bImportMorphTargets
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 18
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bImportMorphTargets is to control whether morph target meshes should be imported from an FBX file during the skeletal mesh import process in Unreal Engine 5.
This setting variable is primarily used in the skeletal mesh import system, which is part of the Interchange Editor plugin and the UnrealEd module. It’s also utilized in the Interchange Runtime plugin for generic asset pipelines.
The value of this variable is typically set through import options UI or programmatically when setting up import parameters. It’s often initialized in constructor functions of import option classes.
This variable interacts with other import settings, such as bImportVertexAttributes, ThresholdPosition, and various other skeletal mesh import parameters.
Developers should be aware that:
- This setting affects performance and memory usage, as importing morph targets increases the amount of data processed and stored.
- It’s part of the skeletal mesh import process and doesn’t affect static meshes.
- The morph target import process is subject to threshold values that determine vertex equality.
Best practices when using this variable include:
- Only enable it when morph targets are actually needed for the skeletal mesh.
- Consider performance implications, especially for complex meshes with many morph targets.
- Ensure that the source FBX file contains valid morph target data when this option is enabled.
- Adjust related threshold values (like MorphThresholdPosition) if needed to fine-tune the import process.
- Be aware of how this setting interacts with other import options to achieve the desired result.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:675, section: [/Script/UnrealEd.FbxSkeletalMeshImportData]
- INI Section:
/Script/UnrealEd.FbxSkeletalMeshImportData
- Raw value:
False
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Interchange/Editor/Source/InterchangeEditor/Private/InterchangeFbxAssetImportDataConverter.cpp:190
Scope (from outer to inner):
file
namespace UE::Interchange::Private
function void FillInterchangeGenericAssetsPipelineFromFbxSkeletalMeshImportData
Source code excerpt:
GenericAssetPipeline->CommonMeshesProperties->bKeepSectionsSeparate = SkeletalMeshImportData->bKeepSectionsSeparate;
GenericAssetPipeline->MeshPipeline->bCreatePhysicsAsset = false;
GenericAssetPipeline->MeshPipeline->bImportMorphTargets = SkeletalMeshImportData->bImportMorphTargets;
GenericAssetPipeline->MeshPipeline->bImportVertexAttributes = SkeletalMeshImportData->bImportVertexAttributes;
GenericAssetPipeline->MeshPipeline->bUpdateSkeletonReferencePose = SkeletalMeshImportData->bUpdateSkeletonReferencePose;
GenericAssetPipeline->CommonSkeletalMeshesAndAnimationsProperties->bUseT0AsRefPose = SkeletalMeshImportData->bUseT0AsRefPose;
if (SkeletalMeshImportData->ImportContentType == EFBXImportContentType::FBXICT_All)
{
GenericAssetPipeline->MeshPipeline->SkeletalMeshImportContentType = EInterchangeSkeletalMeshContentType::All;
#Loc: <Workspace>/Engine/Plugins/Interchange/Editor/Source/InterchangeEditor/Private/InterchangeFbxAssetImportDataConverter.cpp:377
Scope (from outer to inner):
file
namespace UE::Interchange::Private
function UAssetImportData* ConvertToLegacyFbx
Source code excerpt:
FillFbxMeshImportData(GenericAssetPipeline, DestinationSkeletalMeshImportData);
DestinationSkeletalMeshImportData->bImportMeshesInBoneHierarchy = GenericAssetPipeline->CommonSkeletalMeshesAndAnimationsProperties->bImportMeshesInBoneHierarchy;
DestinationSkeletalMeshImportData->bImportMorphTargets = GenericAssetPipeline->MeshPipeline->bImportMorphTargets;
DestinationSkeletalMeshImportData->bImportVertexAttributes = GenericAssetPipeline->MeshPipeline->bImportVertexAttributes;
DestinationSkeletalMeshImportData->bKeepSectionsSeparate = GenericAssetPipeline->CommonMeshesProperties->bKeepSectionsSeparate;
DestinationSkeletalMeshImportData->bPreserveSmoothingGroups = true;
DestinationSkeletalMeshImportData->bUpdateSkeletonReferencePose = GenericAssetPipeline->MeshPipeline->bUpdateSkeletonReferencePose;
DestinationSkeletalMeshImportData->bUseT0AsRefPose = GenericAssetPipeline->CommonSkeletalMeshesAndAnimationsProperties->bUseT0AsRefPose;
if (GenericAssetPipeline->MeshPipeline->SkeletalMeshImportContentType == EInterchangeSkeletalMeshContentType::All)
#Loc: <Workspace>/Engine/Plugins/Interchange/Runtime/Source/Pipelines/Private/InterchangeGenericAssetsPipeline.cpp:260
Scope (from outer to inner):
file
function void UInterchangeGenericAssetsPipeline::FilterPropertiesFromTranslatedData
Source code excerpt:
LocalHideProperty(CommonMeshesProperties, GET_MEMBER_NAME_CHECKED(UInterchangeGenericCommonMeshesProperties, VertexOverrideColor));
LocalHideProperty(CommonMeshesProperties, GET_MEMBER_NAME_CHECKED(UInterchangeGenericCommonMeshesProperties, VertexColorImportOption));
LocalHideProperty(MeshPipeline, GET_MEMBER_NAME_CHECKED(UInterchangeGenericMeshPipeline, bImportMorphTargets));
LocalHideProperty(MeshPipeline, GET_MEMBER_NAME_CHECKED(UInterchangeGenericMeshPipeline, ThresholdPosition));
LocalHideProperty(MeshPipeline, GET_MEMBER_NAME_CHECKED(UInterchangeGenericMeshPipeline, ThresholdTangentNormal));
LocalHideProperty(MeshPipeline, GET_MEMBER_NAME_CHECKED(UInterchangeGenericMeshPipeline, ThresholdUV));
LocalHideProperty(MeshPipeline, GET_MEMBER_NAME_CHECKED(UInterchangeGenericMeshPipeline, MorphThresholdPosition));
}
else if (MeshPipeline->SkeletalMeshImportContentType == EInterchangeSkeletalMeshContentType::Geometry)
#Loc: <Workspace>/Engine/Plugins/Interchange/Runtime/Source/Pipelines/Private/InterchangeGenericMeshPipeline.cpp:57
Scope (from outer to inner):
file
function void UInterchangeGenericMeshPipeline::AdjustSettingsForContext
Source code excerpt:
bImportStaticMeshes = false;
bBuildNanite = false;
bImportMorphTargets = false;
bImportVertexAttributes = false;
bUpdateSkeletonReferencePose = false;
SkeletalMeshImportContentType = EInterchangeSkeletalMeshContentType::All;
CommonSkeletalMeshesAndAnimationsProperties->Skeleton = nullptr;
CommonSkeletalMeshesAndAnimationsProperties->bImportOnlyAnimations = false;
}
#Loc: <Workspace>/Engine/Plugins/Interchange/Runtime/Source/Pipelines/Private/InterchangeGenericSkeletalMeshPipeline.cpp:406
Scope (from outer to inner):
file
function UInterchangeSkeletalMeshFactoryNode* UInterchangeGenericMeshPipeline::CreateSkeletalMeshFactoryNode
Source code excerpt:
AddLodDataToSkeletalMesh(SkeletonFactoryNode, SkeletalMeshFactoryNode, MeshUidsPerLodIndex);
SkeletalMeshFactoryNode->SetCustomImportMorphTarget(bImportMorphTargets);
SkeletalMeshFactoryNode->SetCustomImportVertexAttributes(bImportVertexAttributes);
SkeletalMeshFactoryNode->SetCustomImportContentType(SkeletalMeshImportContentType);
//If we have a specified skeleton
if (CommonSkeletalMeshesAndAnimationsProperties->Skeleton.IsValid())
#Loc: <Workspace>/Engine/Plugins/Interchange/Runtime/Source/Pipelines/Public/InterchangeGenericMeshPipeline.h:158
Scope (from outer to inner):
file
class class UInterchangeGenericMeshPipeline : public UInterchangePipelineBase
Source code excerpt:
/** If enabled, imports all morph target shapes found in the source. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Skeletal Meshes")
bool bImportMorphTargets = true;
/** If enabled, imports per-vertex attributes from the FBX file. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Skeletal Meshes", meta = (ToolTip = "If enabled, creates named vertex attributes for secondary vertex color data."))
bool bImportVertexAttributes = false;
/** Enable this option to update the reference pose of the Skeleton (of the mesh). The reference pose of the mesh is always updated. */
#Loc: <Workspace>/Engine/Plugins/Tests/EditorTests/Source/EditorTests/Private/UnrealEd/FbxAutomationTests.cpp:420
Scope (from outer to inner):
file
function BEGIN_FUNCTION_BUILD_OPTIMIZATION bool F
Source code excerpt:
ImportData->ImportContentType = TestPlan->ImportUI->SkeletalMeshImportData->ImportContentType;
ImportData->bImportMeshesInBoneHierarchy = TestPlan->ImportUI->SkeletalMeshImportData->bImportMeshesInBoneHierarchy;
ImportData->bImportMorphTargets = TestPlan->ImportUI->SkeletalMeshImportData->bImportMorphTargets;
ImportData->bImportVertexAttributes = TestPlan->ImportUI->SkeletalMeshImportData->bImportVertexAttributes;
ImportData->ThresholdPosition = TestPlan->ImportUI->SkeletalMeshImportData->ThresholdPosition;
ImportData->ThresholdTangentNormal = TestPlan->ImportUI->SkeletalMeshImportData->ThresholdTangentNormal;
ImportData->MorphThresholdPosition = TestPlan->ImportUI->SkeletalMeshImportData->MorphThresholdPosition;
ImportData->ThresholdUV = TestPlan->ImportUI->SkeletalMeshImportData->ThresholdUV;
ImportData->bPreserveSmoothingGroups = TestPlan->ImportUI->SkeletalMeshImportData->bPreserveSmoothingGroups;
#Loc: <Workspace>/Engine/Plugins/Tests/EditorTests/Source/EditorTests/Private/UnrealEd/FbxAutomationTests.cpp:518
Scope (from outer to inner):
file
function BEGIN_FUNCTION_BUILD_OPTIMIZATION bool F
Source code excerpt:
ImportData->ImportContentType = TestPlan->ImportUI->SkeletalMeshImportData->ImportContentType;
ImportData->bImportMeshesInBoneHierarchy = TestPlan->ImportUI->SkeletalMeshImportData->bImportMeshesInBoneHierarchy;
ImportData->bImportMorphTargets = TestPlan->ImportUI->SkeletalMeshImportData->bImportMorphTargets;
ImportData->bImportVertexAttributes = TestPlan->ImportUI->SkeletalMeshImportData->bImportVertexAttributes;
ImportData->ThresholdPosition = TestPlan->ImportUI->SkeletalMeshImportData->ThresholdPosition;
ImportData->ThresholdTangentNormal = TestPlan->ImportUI->SkeletalMeshImportData->ThresholdTangentNormal;
ImportData->ThresholdUV = TestPlan->ImportUI->SkeletalMeshImportData->ThresholdUV;
ImportData->MorphThresholdPosition = TestPlan->ImportUI->SkeletalMeshImportData->MorphThresholdPosition;
ImportData->bPreserveSmoothingGroups = TestPlan->ImportUI->SkeletalMeshImportData->bPreserveSmoothingGroups;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Factories/FbxSceneImportOptionsSkeletalMesh.h:44
Scope (from outer to inner):
file
class class UFbxSceneImportOptionsSkeletalMesh : public UObject
Source code excerpt:
/** True to import morph target meshes from the FBX file */
UPROPERTY(EditAnywhere, config, Category = SkeletalMesh, meta = (ToolTip = "If enabled, creates Unreal morph objects for the imported meshes"))
uint32 bImportMorphTargets : 1;
/** True to import morph target meshes from the FBX file */
UPROPERTY(EditAnywhere, config, Category = SkeletalMesh, meta = (ToolTip = "If enabled, import single-channel/weight/alpha vertex attributes"))
uint32 bImportVertexAttributes : 1;
/** Threshold to compare vertex position equality. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Factories/FbxSkeletalMeshImportData.h:86
Scope (from outer to inner):
file
class class UFbxSkeletalMeshImportData : public UFbxMeshImportData
Source code excerpt:
/** True to import morph target meshes from the FBX file */
UPROPERTY(EditAnywhere, AdvancedDisplay, config, Category=Mesh, meta=(ImportType="SkeletalMesh|GeoOnly", ToolTip="If enabled, creates Unreal morph objects for the imported meshes"))
uint32 bImportMorphTargets:1;
/** True to import per-vertex attributes from the FBX file */
UPROPERTY(EditAnywhere, AdvancedDisplay, config, Category=Mesh, meta=(ImportType="SkeletalMesh|GeoOnly", ToolTip="If enabled, creates a named vertex attribute for each single-channel weight map of the imported mesh."))
uint32 bImportVertexAttributes:1;
/** Threshold to compare vertex position equality. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxMainImport.cpp:472
Scope (from outer to inner):
file
namespace UnFbx
function void ApplyImportUIToImportOptions
Source code excerpt:
InOutImportOptions.bImportAsSkeletalGeometry = ImportUI->SkeletalMeshImportData->ImportContentType == EFBXImportContentType::FBXICT_Geometry;
InOutImportOptions.bImportAsSkeletalSkinning = ImportUI->SkeletalMeshImportData->ImportContentType == EFBXImportContentType::FBXICT_SkinningWeights;
InOutImportOptions.bImportMorph = ImportUI->SkeletalMeshImportData->bImportMorphTargets;
InOutImportOptions.bUpdateSkeletonReferencePose = ImportUI->SkeletalMeshImportData->bUpdateSkeletonReferencePose;
InOutImportOptions.bImportRigidMesh = ImportUI->OriginalImportType == FBXIT_StaticMesh && ImportUI->MeshTypeToImport == FBXIT_SkeletalMesh;
InOutImportOptions.bUseT0AsRefPose = ImportUI->SkeletalMeshImportData->bUseT0AsRefPose;
InOutImportOptions.bPreserveSmoothingGroups = ImportUI->SkeletalMeshImportData->bPreserveSmoothingGroups;
InOutImportOptions.bKeepSectionsSeparate = ImportUI->SkeletalMeshImportData->bKeepSectionsSeparate;
InOutImportOptions.OverlappingThresholds.ThresholdPosition = ImportUI->SkeletalMeshImportData->ThresholdPosition;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSceneImportData.cpp:121
Scope (from outer to inner):
file
function UnFbx::FBXImportOptions *JSONToFbxOption
Source code excerpt:
OptionObj->TryGetBoolField(TEXT("bKeepSectionsSeparate"), Option->bKeepSectionsSeparate);
OptionObj->TryGetBoolField(TEXT("bImportMeshesInBoneHierarchy"), Option->bImportMeshesInBoneHierarchy);
OptionObj->TryGetBoolField(TEXT("bImportMorphTargets"), Option->bImportMorph);
OptionObj->TryGetBoolField(TEXT("bImportVertexAttributes"), Option->bImportVertexAttributes);
if (OptionObj->TryGetObjectField(TEXT("OverlappingThresholds"), DataObj))
{
double Pos, NTB, UV, MorphPos;
if ((*DataObj)->TryGetNumberField(TEXT("ThresholdPosition"), Pos))
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSceneImportFactory.cpp:2043
Scope (from outer to inner):
file
function UObject* UFbxSceneImportFactory::ImportOneSkeletalMesh
Source code excerpt:
// import morph target
if (NewObject && SkeletalMeshImportData->bImportMorphTargets)
{
if (Pkg == nullptr)
continue;
USkeletalMesh *NewSkelMesh = Cast<USkeletalMesh>(NewObject);
if ((GlobalImportSettings->bImportSkeletalMeshLODs || LODIndex == 0) &&
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSceneImportOptionsSkeletalMesh.cpp:18
Scope (from outer to inner):
file
function UFbxSceneImportOptionsSkeletalMesh::UFbxSceneImportOptionsSkeletalMesh
Source code excerpt:
, bKeepSectionsSeparate(false)
, bImportMeshesInBoneHierarchy(true)
, bImportMorphTargets(false)
, bImportVertexAttributes(false)
, ThresholdPosition(THRESH_POINTS_ARE_SAME)
, ThresholdTangentNormal(THRESH_NORMALS_ARE_SAME)
, ThresholdUV(THRESH_UVS_ARE_SAME)
, MorphThresholdPosition(THRESH_POINTS_ARE_NEAR)
, bImportAnimations(true)
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSceneImportOptionsSkeletalMesh.cpp:41
Scope (from outer to inner):
file
function void UFbxSceneImportOptionsSkeletalMesh::FillSkeletalMeshInmportData
Source code excerpt:
check(SkeletalMeshImportData != nullptr);
SkeletalMeshImportData->bImportMeshesInBoneHierarchy = bImportMeshesInBoneHierarchy;
SkeletalMeshImportData->bImportMorphTargets = bImportMorphTargets;
SkeletalMeshImportData->bImportVertexAttributes = bImportVertexAttributes;
SkeletalMeshImportData->ThresholdPosition = ThresholdPosition;
SkeletalMeshImportData->ThresholdTangentNormal = ThresholdTangentNormal;
SkeletalMeshImportData->ThresholdUV = ThresholdUV;
SkeletalMeshImportData->MorphThresholdPosition = MorphThresholdPosition;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/SFbxSceneOptionWindow.cpp:1495
Scope (from outer to inner):
file
function void SFbxSceneOptionWindow::CopySkeletalMeshOptionsToFbxOptions
Source code excerpt:
ImportSettings->bCreatePhysicsAsset = SkeletalMeshOptions->bCreatePhysicsAsset;
ImportSettings->bImportMeshesInBoneHierarchy = SkeletalMeshOptions->bImportMeshesInBoneHierarchy;
ImportSettings->bImportMorph = SkeletalMeshOptions->bImportMorphTargets;
ImportSettings->bImportVertexAttributes = SkeletalMeshOptions->bImportVertexAttributes;
ImportSettings->OverlappingThresholds.ThresholdPosition = SkeletalMeshOptions->ThresholdPosition;
ImportSettings->OverlappingThresholds.ThresholdTangentNormal = SkeletalMeshOptions->ThresholdTangentNormal;
ImportSettings->OverlappingThresholds.ThresholdUV = SkeletalMeshOptions->ThresholdUV;
ImportSettings->OverlappingThresholds.MorphThresholdPosition = SkeletalMeshOptions->MorphThresholdPosition;
ImportSettings->bPreserveSmoothingGroups = SkeletalMeshOptions->bPreserveSmoothingGroups;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/SFbxSceneOptionWindow.cpp:1524
Scope (from outer to inner):
file
function void SFbxSceneOptionWindow::CopyFbxOptionsToSkeletalMeshOptions
Source code excerpt:
SkeletalMeshOptions->bCreatePhysicsAsset = ImportSettings->bCreatePhysicsAsset;
SkeletalMeshOptions->bImportMeshesInBoneHierarchy = ImportSettings->bImportMeshesInBoneHierarchy;
SkeletalMeshOptions->bImportMorphTargets = ImportSettings->bImportMorph;
SkeletalMeshOptions->bImportVertexAttributes = ImportSettings->bImportVertexAttributes;
SkeletalMeshOptions->ThresholdPosition = ImportSettings->OverlappingThresholds.ThresholdPosition;
SkeletalMeshOptions->ThresholdTangentNormal = ImportSettings->OverlappingThresholds.ThresholdTangentNormal;
SkeletalMeshOptions->ThresholdUV = ImportSettings->OverlappingThresholds.ThresholdUV;
SkeletalMeshOptions->MorphThresholdPosition = ImportSettings->OverlappingThresholds.MorphThresholdPosition;
SkeletalMeshOptions->bPreserveSmoothingGroups = ImportSettings->bPreserveSmoothingGroups;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/SkinWeightsUtilities.cpp:189
Scope (from outer to inner):
file
function bool FSkinWeightsUtilities::ImportAlternateSkinWeight
Source code excerpt:
{
FbxFactory->ImportUI->SkeletalMeshImportData->bImportMeshLODs = false;
FbxFactory->ImportUI->SkeletalMeshImportData->bImportMorphTargets = false;
FbxFactory->ImportUI->SkeletalMeshImportData->bUpdateSkeletonReferencePose = false;
FbxFactory->ImportUI->SkeletalMeshImportData->ImportContentType = EFBXImportContentType::FBXICT_All; //We need geo and skinning, so we can match the weights
}
//Force some material options
if (FbxFactory->ImportUI->TextureImportData)
{