bImportCustomAttribute
bImportCustomAttribute
#Overview
name: bImportCustomAttribute
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 16
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bImportCustomAttribute is to control whether node attributes should be imported as either Animation Curves or Animation Attributes during the import process of FBX animations into Unreal Engine.
This setting variable is primarily used in the animation system of Unreal Engine, specifically in the FBX import pipeline for skeletal animations. It is utilized by the Interchange Editor plugin and the UnrealEd module.
The value of this variable is typically set in the import settings UI or through the UFbxAnimSequenceImportData class. It defaults to true in most cases, as seen in the constructor of UFbxAnimSequenceImportData.
This variable interacts with several other import-related variables, such as:
- bDeleteExistingCustomAttributeCurves
- bDeleteExistingNonCurveCustomAttributes
- bAddCurveMetadataToSkeleton
- bSetMaterialDriveParameterOnCustomAttribute
Developers must be aware that:
- This setting affects the way animation data is imported and stored in the engine.
- It can impact the size and complexity of imported animations.
- Changing this setting may require re-importing animations to take effect.
Best practices when using this variable include:
- Consider the needs of your project when deciding whether to import custom attributes.
- Be consistent in your use of this setting across your project to maintain uniformity in your animation data.
- If you’re working with material-driven parameters, ensure this is set to true along with bSetMaterialDriveParameterOnCustomAttribute.
- When re-importing animations, be aware of how this setting interacts with the deletion of existing custom attribute data.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:687, section: [/Script/UnrealEd.FbxAnimSequenceImportData]
- INI Section:
/Script/UnrealEd.FbxAnimSequenceImportData
- Raw value:
True
- 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:272
Scope (from outer to inner):
file
namespace UE::Interchange::Private
function void FillInterchangeGenericAssetsPipelineFromFbxAnimSequenceImportData
Source code excerpt:
GenericAssetPipeline->AnimationPipeline->bDoNotImportCurveWithZero = AnimSequenceImportData->bDoNotImportCurveWithZero;
GenericAssetPipeline->AnimationPipeline->bImportBoneTracks = AnimSequenceImportData->bImportBoneTracks;
GenericAssetPipeline->AnimationPipeline->bImportCustomAttribute = AnimSequenceImportData->bImportCustomAttribute;
GenericAssetPipeline->CommonSkeletalMeshesAndAnimationsProperties->bImportMeshesInBoneHierarchy = AnimSequenceImportData->bImportMeshesInBoneHierarchy;
GenericAssetPipeline->AnimationPipeline->bRemoveCurveRedundantKeys = AnimSequenceImportData->bRemoveRedundantKeys;
GenericAssetPipeline->AnimationPipeline->bSetMaterialDriveParameterOnCustomAttribute = AnimSequenceImportData->bSetMaterialDriveParameterOnCustomAttribute;
GenericAssetPipeline->AnimationPipeline->bSnapToClosestFrameBoundary = AnimSequenceImportData->bSnapToClosestFrameBoundary;
GenericAssetPipeline->AnimationPipeline->bUse30HzToBakeBoneAnimation = AnimSequenceImportData->bUseDefaultSampleRate;
GenericAssetPipeline->AnimationPipeline->CustomBoneAnimationSampleRate = AnimSequenceImportData->CustomSampleRate;
#Loc: <Workspace>/Engine/Plugins/Interchange/Editor/Source/InterchangeEditor/Private/InterchangeFbxAssetImportDataConverter.cpp:492
Scope (from outer to inner):
file
namespace UE::Interchange::Private
function UAssetImportData* ConvertToLegacyFbx
Source code excerpt:
DestinationAnimSequenceImportData->bDoNotImportCurveWithZero = GenericAssetPipeline->AnimationPipeline->bDoNotImportCurveWithZero;
DestinationAnimSequenceImportData->bImportBoneTracks = GenericAssetPipeline->AnimationPipeline->bImportBoneTracks;
DestinationAnimSequenceImportData->bImportCustomAttribute = GenericAssetPipeline->AnimationPipeline->bImportCustomAttribute;
DestinationAnimSequenceImportData->bImportMeshesInBoneHierarchy = GenericAssetPipeline->CommonSkeletalMeshesAndAnimationsProperties->bImportMeshesInBoneHierarchy;
DestinationAnimSequenceImportData->bPreserveLocalTransform = false;
DestinationAnimSequenceImportData->bRemoveRedundantKeys = GenericAssetPipeline->AnimationPipeline->bRemoveCurveRedundantKeys;
DestinationAnimSequenceImportData->bSetMaterialDriveParameterOnCustomAttribute = GenericAssetPipeline->AnimationPipeline->bSetMaterialDriveParameterOnCustomAttribute;
DestinationAnimSequenceImportData->bSnapToClosestFrameBoundary = GenericAssetPipeline->AnimationPipeline->bSnapToClosestFrameBoundary;
DestinationAnimSequenceImportData->bUseDefaultSampleRate = GenericAssetPipeline->AnimationPipeline->bUse30HzToBakeBoneAnimation;
#Loc: <Workspace>/Engine/Plugins/Interchange/Runtime/Source/Pipelines/Private/InterchangeGenericAnimationPipeline.cpp:592
Scope (from outer to inner):
file
function void UInterchangeGenericAnimationPipeline::CreateAnimSequenceFactoryNode
Source code excerpt:
}
AnimSequenceFactoryNode->SetCustomImportAttributeCurves(bImportCustomAttribute);
AnimSequenceFactoryNode->SetCustomAddCurveMetadataToSkeleton(bAddCurveMetadataToSkeleton);
AnimSequenceFactoryNode->SetCustomDoNotImportCurveWithZero(bDoNotImportCurveWithZero);
AnimSequenceFactoryNode->SetCustomRemoveCurveRedundantKeys(bRemoveCurveRedundantKeys);
AnimSequenceFactoryNode->SetCustomDeleteExistingMorphTargetCurves(bDeleteExistingMorphTargetCurves);
AnimSequenceFactoryNode->SetCustomDeleteExistingCustomAttributeCurves(bDeleteExistingCustomAttributeCurves);
AnimSequenceFactoryNode->SetCustomDeleteExistingNonCurveCustomAttributes(bDeleteExistingNonCurveCustomAttributes);
#Loc: <Workspace>/Engine/Plugins/Interchange/Runtime/Source/Pipelines/Public/InterchangeGenericAnimationPipeline.h:80
Scope (from outer to inner):
file
class class UInterchangeGenericAnimationPipeline : public UInterchangePipelineBase
Source code excerpt:
/** If enabled, import node attributes as either Animation Curves or Animation Attributes. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Animations", meta = (SubCategory = "Curves", EditCondition = "bImportAnimations", DisplayName = "Import Attributes as Curves or Animation Attributes"))
bool bImportCustomAttribute = true;
/** Determines whether to automatically add curve metadata to an animation's skeleton. If this setting is disabled, curve metadata will be added to skeletal meshes for morph targets, but no metadata entry will be created for general curves. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Animations", meta = (SubCategory = "Curves", EditCondition = "bImportAnimations && bImportCustomAttribute"))
bool bAddCurveMetadataToSkeleton = true;
/** Set the material curve type for all custom attributes. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Factories/FbxAnimSequenceImportData.h:75
Scope (from outer to inner):
file
class class UFbxAnimSequenceImportData : public UFbxAssetImportData
Source code excerpt:
/** If true, import node attributes as either Animation Curves or Animation Attributes */
UPROPERTY(EditAnywhere, AdvancedDisplay, config, Category = ImportSettings, meta = (DisplayName = "Import Attributes as Curves or Animation Attributes"))
bool bImportCustomAttribute;
/** If true, all previous node attributes imported as Animation Curves will be deleted when doing a re-import. */
UPROPERTY(EditAnywhere, AdvancedDisplay, config, Category = ImportSettings, meta = (DisplayName = "Delete existing Animation Curves"))
bool bDeleteExistingCustomAttributeCurves;
/** If true, all previous node attributes imported as Animation Attributes will be deleted when doing a re-import. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Factories/FbxSceneImportOptionsSkeletalMesh.h:94
Scope (from outer to inner):
file
class class UFbxSceneImportOptionsSkeletalMesh : public UObject
Source code excerpt:
/** If true, import node attributes as either Animation Curves or Animation Attributes */
UPROPERTY(EditAnywhere, AdvancedDisplay, config, Category = Animation, meta = (DisplayName = "Import Attributes as Curves or Animation Attributes"))
bool bImportCustomAttribute;
/** If true, all previous node attributes imported as Animation Curves will be deleted when doing a re-import. */
UPROPERTY(EditAnywhere, AdvancedDisplay, config, Category = Animation, meta = (DisplayName = "Delete existing Animation Curves"))
bool bDeleteExistingCustomAttributeCurves;
/** If true, all previous node attributes imported as Animation Attributes will be deleted when doing a re-import. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxAnimSequenceImportData.cpp:6
Scope (from outer to inner):
file
function UFbxAnimSequenceImportData::UFbxAnimSequenceImportData
Source code excerpt:
: Super(ObjectInitializer)
, bImportMeshesInBoneHierarchy(true)
, bImportCustomAttribute(true)
, bImportBoneTracks(true)
, bAddCurveMetadataToSkeleton(true)
, bRemoveRedundantKeys(true)
, bDoNotImportCurveWithZero(true)
{
FrameImportRange.Min = 0;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxAnimSequenceImportData.cpp:89
Scope (from outer to inner):
file
function void UFbxAnimSequenceImportData::CopyAnimationValues
Source code excerpt:
bDoNotImportCurveWithZero = Other->bDoNotImportCurveWithZero;
bImportBoneTracks = Other->bImportBoneTracks;
bImportCustomAttribute = Other->bImportCustomAttribute;
bImportMeshesInBoneHierarchy = Other->bImportMeshesInBoneHierarchy;
bPreserveLocalTransform = Other->bPreserveLocalTransform;
bRemoveRedundantKeys = Other->bRemoveRedundantKeys;
bSetMaterialDriveParameterOnCustomAttribute = Other->bSetMaterialDriveParameterOnCustomAttribute;
bAddCurveMetadataToSkeleton = Other->bAddCurveMetadataToSkeleton;
bUseDefaultSampleRate = Other->bUseDefaultSampleRate;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxMainImport.cpp:510
Scope (from outer to inner):
file
namespace UnFbx
function void ApplyImportUIToImportOptions
Source code excerpt:
InOutImportOptions.bRemoveRedundantKeys = ImportUI->AnimSequenceImportData->bRemoveRedundantKeys;
InOutImportOptions.bDoNotImportCurveWithZero = ImportUI->AnimSequenceImportData->bDoNotImportCurveWithZero;
InOutImportOptions.bImportCustomAttribute = ImportUI->AnimSequenceImportData->bImportCustomAttribute;
InOutImportOptions.bDeleteExistingCustomAttributeCurves = ImportUI->AnimSequenceImportData->bDeleteExistingCustomAttributeCurves;
InOutImportOptions.bDeleteExistingNonCurveCustomAttributes = ImportUI->AnimSequenceImportData->bDeleteExistingNonCurveCustomAttributes;
InOutImportOptions.bImportBoneTracks = ImportUI->AnimSequenceImportData->bImportBoneTracks;
InOutImportOptions.bSetMaterialDriveParameterOnCustomAttribute = ImportUI->AnimSequenceImportData->bSetMaterialDriveParameterOnCustomAttribute;
InOutImportOptions.bAddCurveMetadataToSkeleton = ImportUI->AnimSequenceImportData->bAddCurveMetadataToSkeleton;
InOutImportOptions.MaterialCurveSuffixes = ImportUI->AnimSequenceImportData->MaterialCurveSuffixes;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxMainImport.cpp:1791
Scope (from outer to inner):
file
lambda-function
Source code excerpt:
Attribs.Add(FAnalyticsEventAttribute(TEXT("AnimOpt DoNotImportCurveWithZero"), CaptureImportOptions->bDoNotImportCurveWithZero));
Attribs.Add(FAnalyticsEventAttribute(TEXT("AnimOpt ImportBoneTracks"), CaptureImportOptions->bImportBoneTracks));
Attribs.Add(FAnalyticsEventAttribute(TEXT("AnimOpt ImportCustomAttribute"), CaptureImportOptions->bImportCustomAttribute));
Attribs.Add(FAnalyticsEventAttribute(TEXT("AnimOpt DeleteExistingCustomAttributeCurves"), CaptureImportOptions->bDeleteExistingCustomAttributeCurves));
Attribs.Add(FAnalyticsEventAttribute(TEXT("AnimOpt DeleteExistingNonCurveCustomAttributes"), CaptureImportOptions->bDeleteExistingNonCurveCustomAttributes));
Attribs.Add(FAnalyticsEventAttribute(TEXT("AnimOpt PreserveLocalTransform"), CaptureImportOptions->bPreserveLocalTransform));
Attribs.Add(FAnalyticsEventAttribute(TEXT("AnimOpt RemoveRedundantKeys"), CaptureImportOptions->bRemoveRedundantKeys));
Attribs.Add(FAnalyticsEventAttribute(TEXT("AnimOpt Resample"), CaptureImportOptions->bResample));
Attribs.Add(FAnalyticsEventAttribute(TEXT("AnimOpt SetMaterialDriveParameterOnCustomAttribute"), CaptureImportOptions->bSetMaterialDriveParameterOnCustomAttribute));
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSceneImportOptionsSkeletalMesh.cpp:29
Scope (from outer to inner):
file
function UFbxSceneImportOptionsSkeletalMesh::UFbxSceneImportOptionsSkeletalMesh
Source code excerpt:
, bUseDefaultSampleRate(false)
, CustomSampleRate(0)
, bImportCustomAttribute(true)
, bDeleteExistingCustomAttributeCurves(false)
, bDeleteExistingNonCurveCustomAttributes(false)
, bPreserveLocalTransform(false)
, bDeleteExistingMorphTargetCurves(false)
{
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxSceneImportOptionsSkeletalMesh.cpp:65
Scope (from outer to inner):
file
function void UFbxSceneImportOptionsSkeletalMesh::FillSkeletalMeshInmportData
Source code excerpt:
AnimSequenceImportData->AnimationLength = AnimationLength;
AnimSequenceImportData->bDeleteExistingMorphTargetCurves = bDeleteExistingMorphTargetCurves;
AnimSequenceImportData->bImportCustomAttribute = bImportCustomAttribute;
AnimSequenceImportData->bDeleteExistingCustomAttributeCurves = bDeleteExistingCustomAttributeCurves;
AnimSequenceImportData->bDeleteExistingNonCurveCustomAttributes = bDeleteExistingNonCurveCustomAttributes;
AnimSequenceImportData->bPreserveLocalTransform = bPreserveLocalTransform;
AnimSequenceImportData->bUseDefaultSampleRate = bUseDefaultSampleRate;
AnimSequenceImportData->CustomSampleRate = CustomSampleRate;
AnimSequenceImportData->FrameImportRange = FrameImportRange;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/SFbxSceneOptionWindow.cpp:1509
Scope (from outer to inner):
file
function void SFbxSceneOptionWindow::CopySkeletalMeshOptionsToFbxOptions
Source code excerpt:
ImportSettings->AnimationLengthImportType = SkeletalMeshOptions->AnimationLength;
ImportSettings->bDeleteExistingMorphTargetCurves = SkeletalMeshOptions->bDeleteExistingMorphTargetCurves;
ImportSettings->bImportCustomAttribute = SkeletalMeshOptions->bImportCustomAttribute;
ImportSettings->bDeleteExistingCustomAttributeCurves = SkeletalMeshOptions->bDeleteExistingCustomAttributeCurves;
ImportSettings->bDeleteExistingNonCurveCustomAttributes = SkeletalMeshOptions->bDeleteExistingNonCurveCustomAttributes;
ImportSettings->bPreserveLocalTransform = SkeletalMeshOptions->bPreserveLocalTransform;
ImportSettings->bResample = !SkeletalMeshOptions->bUseDefaultSampleRate;
ImportSettings->ResampleRate = SkeletalMeshOptions->CustomSampleRate;
ImportSettings->bSnapToClosestFrameBoundary = SkeletalMeshOptions->bSnapToClosestFrameBoundary;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/SFbxSceneOptionWindow.cpp:1538
Scope (from outer to inner):
file
function void SFbxSceneOptionWindow::CopyFbxOptionsToSkeletalMeshOptions
Source code excerpt:
SkeletalMeshOptions->AnimationLength = ImportSettings->AnimationLengthImportType;
SkeletalMeshOptions->bDeleteExistingMorphTargetCurves = ImportSettings->bDeleteExistingMorphTargetCurves;
SkeletalMeshOptions->bImportCustomAttribute = ImportSettings->bImportCustomAttribute;
SkeletalMeshOptions->bDeleteExistingCustomAttributeCurves = ImportSettings->bDeleteExistingCustomAttributeCurves;
SkeletalMeshOptions->bDeleteExistingNonCurveCustomAttributes = ImportSettings->bDeleteExistingNonCurveCustomAttributes;
SkeletalMeshOptions->bPreserveLocalTransform = ImportSettings->bPreserveLocalTransform;
SkeletalMeshOptions->bUseDefaultSampleRate = !ImportSettings->bResample;
SkeletalMeshOptions->CustomSampleRate = ImportSettings->ResampleRate;
SkeletalMeshOptions->FrameImportRange.Min = ImportSettings->AnimationRange.X;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/SkeletalMeshEdit.cpp:1813
Scope (from outer to inner):
file
function bool UnFbx::FFbxImporter::ImportAnimation
Source code excerpt:
// importing custom attribute START
TArray<FString> CurvesNotFound;
if (ImportOptions->bImportCustomAttribute)
{
int CustomAttributeKeyCount = 0;
ImportAnimationCustomAttribute(AnimImportSettings, CustomAttributeKeyCount, CurvesNotFound, bReimport);
CurveAttributeKeyCount = FMath::Max(CurveAttributeKeyCount, CustomAttributeKeyCount);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Public/FbxImporter.h:197
Scope (from outer to inner):
file
namespace UnFbx
Source code excerpt:
bool bPreserveLocalTransform;
bool bDeleteExistingMorphTargetCurves;
bool bImportCustomAttribute;
bool bDeleteExistingCustomAttributeCurves;
bool bDeleteExistingNonCurveCustomAttributes;
bool bImportBoneTracks;
bool bSetMaterialDriveParameterOnCustomAttribute;
bool bAddCurveMetadataToSkeleton;
bool bRemoveRedundantKeys;