Navigation
API > API/Editor > API/Editor/UnrealEd
References
| Module | UnrealEd |
| Header | /Engine/Source/Editor/UnrealEd/Public/FbxImporter.h |
| Include | #include "FbxImporter.h" |
Syntax
class FFbxImporter
Remarks
Main FBX Importer class.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bFirstMesh | Flag that the mesh is the first mesh to import in current FBX scene FBX scene may contain multiple meshes, importer can import them at one time. | |
| FbxMap< FbxString, TSharedPtr< FbxArray< FbxNode * > > > | CollisionModels | Collision model list. | |
| FFbxDataConverter | Converter | Scene management | |
| TArray< TWeakObjectPtr< UObject > > | CreatedObjects | ||
| IMPORTPHASE | CurPhase | ||
| FString | ErrorMessage | ||
| EFbxCreator | FbxCreator | Value is true if the file was create by blender. | |
| FString | FbxFileCreator | ||
| FString | FbxFileVersion | ||
| TMap< FbxFileTexture *, FString > | FbxTextureToUniqueNameMap | A map holding pairs of fbx texture that needs to be renamed with the associated string to avoid name conflicts. | |
| FbxAxisSystem | FileAxisSystem | Original File Info. | |
| FString | FileBasePath | Base path of fbx file | |
| FbxSystemUnit | FileUnitSystem | ||
| FbxGeometryConverter * | GeometryConverter | ||
| FbxImporter * | Importer | ||
| FBXImportOptions * | ImportOptions | ||
| EAppReturnType::Type | LastMergeBonesChoice | Set when importing skeletal meshes if the merge bones step fails. | |
| FMD5Hash | Md5Hash | We cache the hash of the file when we open the file. This is to avoid calculating the hash many time when importing many asset in one fbx file. | |
| FbxMap< FbxString, FbxString > | NodeUniqueNameToOriginalNameMap | A map holding the original name of the renamed fbx nodes, It is used namely to associate collision meshes to their corresponding static mesh if it has been renamed. | |
| TWeakObjectPtr< UObject > | Parent | ||
| FbxScene * | Scene | Current Fbx scene we are importing. Make sure to release it after import | |
| FbxManager * | SdkManager | ||
| TArray< FbxNode * > | TransformSettingsToFbxApply | Make sure we are not applying two time the option transform to the same node |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FFbxImporter () |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddStaticMeshSourceModelGeneratedLOD
(
UStaticMesh* StaticMesh, |
Add a GeneratedLOD to the staticmesh at the specified LOD index | |
| void | AddTokenizedErrorMessage
(
TSharedRef< FTokenizedMessage > Error, |
Error message handler | |
| void | ApplyTransformSettingsToFbxNode
(
FbxNode* Node, |
Apply asset import settings for transform to an FBX node | |
| void | BuildFbxMatrixForImportTransform
(
FbxAMatrix& OutMatrix, |
Populate the given matrix with the correct information for the asset data, in a format that matches FBX internals or without conversion | |
| void | BuildSkeletonSystem
(
TArray< FbxCluster* >& ClusterArray, |
Fill FBX skeletons to OutSortedLinks | |
| bool | BuildStaticMeshFromGeometry
(
FbxNode* Node, |
Set up the static mesh data from Fbx Mesh. | |
| bool | CanCreateClass
(
UClass* Class |
The asset tool have a filter mecanism for CreateAsset, return true if the asset can be created, false otherwise | |
| bool | CanImportClass
(
UClass* Class |
The asset tool have a filter mecanism for ImportAsset, return true if the asset can be imported, false otherwise | |
| void | CheckSmoothingInfo
(
FbxMesh* FbxMesh |
||
| void | CleanUp () |
Clean up for destroy the Importer. | |
| void | CleanUpUnusedMaterials
(
FSkeletalMeshImportData& ImportData |
Make sure there is no unused material in the raw data. | |
| void | Clear all data that need to be clear when we start importing a fbx file. | ||
| void | |||
| FbxAMatrix | ComputeSkeletalMeshTotalMatrix
(
FbxNode* Node, |
Compute the matrix for skeletal Fbx Node If we import don't import a scene it will call ComputeTotalMatrix with Node as the parameter. | |
| FbxAMatrix | ComputeTotalMatrix
(
FbxNode* Node |
Compute the global matrix for Fbx Node If we import scene it will return identity plus the pivot if we turn the bake pivot option | |
| void | ConvertScene () |
Convert the scene from the current options. | |
| bool | CreateAndLinkExpressionForMaterialProperty
(
const FbxSurfaceMaterial& FbxMaterial, |
Material | |
| T * | CreateAsset
(
FString ParentPackageName, |
Templated function to create an asset with given package and name | |
| UObject * | CreateAssetOfClass
(
UClass* AssetClass, |
Create a new asset from the package and objectname and class | |
| ACameraActor * | CreateCamera
(
FbxCamera* InCamera, |
Import Fbx Camera object | |
| ALight * | CreateLight
(
FbxLight* InLight, |
Various actors, current the Fbx importer don't importe them | |
| UMaterialInterface * | CreateUnrealMaterial
(
const FbxSurfaceMaterial& FbxMaterial, |
Create Unreal material from Fbx material. | |
| void | |||
| int32 | DoUnSmoothVerts
(
FSkeletalMeshImportData& ImportData, |
Make un-smooth faces work. | |
| bool | FacesAreSmoothlyConnected
(
FSkeletalMeshImportData& ImportData, |
Check if two faces belongs to same smoothing group | |
| void | Fill up and verify bone names for animation | ||
| bool | FillAnimSequenceByKey
(
FbxNode* Node, |
Anims | |
| bool | FillCollisionModelList
(
FbxNode* Node |
If the node model is a collision model, then fill it into collision model list | |
| void | FillFbxCollisionMeshArray
(
FbxNode* Node |
Fill the collision models array by going through all mesh node recursively | |
| void | FillFbxMeshAndLODGroupArray
(
FbxNode* Node, |
Get all Fbx mesh objects not under a LOD group and all LOD group node | |
| void | FillFbxMeshArray
(
FbxNode* Node, |
Get all Fbx mesh objects | |
| void | FillFbxSkelMeshArrayInScene
(
FbxNode* Node, |
Get all Fbx skeletal mesh objects in the scene. these meshes are grouped by skeleton they bind to | |
| bool | FillLightComponent
(
FbxLight* Light, |
Import Light detail info | |
| bool | FillSkeletalMeshImportData
(
TArray< FbxNode* >& NodeArray, |
Fill FSkeletalMeshIMportData from Fbx Nodes and FbxShape Array if exists. | |
| bool | FillSkeletalMeshImportPoints
(
FSkeletalMeshImportData* OutData, |
Fill the Points in FSkeletalMeshIMportData from a Fbx Node and a FbxShape if it exists. | |
| bool | FillSkelMeshImporterFromFbx
(
FSkeletalMeshImportData& ImportData, |
Meshes | |
| void | FindAllLODGroupNode
(
TArray< FbxNode* >& OutNodeInLod, |
Find the all the node containing a mesh attribute for the specified LOD index. | |
| UMaterialInterface * | FindExistingMaterialFromFbxMaterial
(
const FbxSurfaceMaterial& FbxMaterial, |
Tries to find an existing UnrealMaterial from the FbxMaterial, returns nullptr if could not find a material. | |
| FbxNode * | FindFBXMeshesByBone
(
const FName& RootBoneName, |
Find FBX meshes that match Unreal skeletal mesh according to the bone of mesh | |
| FbxNode * | FindLODGroupNode
(
FbxNode* NodeLodGroup, |
Find the first node containing a mesh attribute for the specified LOD index. | |
| void | FindOrImportMaterialsFromNode
(
FbxNode* FbxNode, |
Create materials from Fbx node. | |
| void | FixupMaterial
(
const FbxSurfaceMaterial& FbxMaterial, |
Add a basic white diffuse color if no expression is linked to diffuse input. | |
| void | FlushToTokenizedErrorMessage
(
enum EMessageSeverity::Type Severity |
||
| bool | GatherPointsForMorphTarget
(
FSkeletalMeshImportData* OutData, |
Fill the Points in FSkeletalMeshIMportData from Fbx Nodes and FbxShape Array if it exists. | |
| void | GetAnimationIntervalMultiLayer
(
FbxNode* RootNode, |
When we get exported time we call GetanimationInterval from fbx sdk and it return the layer 0 by default This function return the sum of all layer instead of just the layer 0. | |
| FbxTimeSpan | GetAnimationTimeSpan
(
FbxNode* RootNode, |
Get Animation Time Span - duration of the animation | |
| const TArray< TWeakObjectPtr< UObject > > & | Get the UObjects that have been created so far during the import process. | ||
| const TCHAR * | Retrieve the FBX loader's error message explaining its failure to read a given FBX file. | ||
| FString | |||
| int32 | GetFbxMeshCount
(
FbxNode* Node, |
Get mesh count (including static mesh and skeletal mesh, except collision models) and find collision models | |
| FString | |||
| FString | |||
| FString | |||
| FbxGeometryConverter * | |||
| int32 | GetGlobalAnimStackSampleRate
(
FbxAnimStack* CurAnimStack |
Calculate the global Sample Rate for all the nodes in the FbxAnimStack pass in parameter | |
| bool | Returns true if the last import operation was canceled. | ||
| FBXImportOptions * | Get the object of import options | ||
| int32 | GetImportType
(
const FString& InFilename |
Detect if the FBX file has skeletal mesh model. | |
| FFbxImporter * | GetInstance () |
Returns the importer singleton. It will be created on the first request. | |
| FString | GetMaterialBasePackageName
(
const FString& MaterialFullName |
||
| FString | GetMaterialFullName
(
const FbxSurfaceMaterial& FbxMaterial |
Make material Unreal asset name from the Fbx material | |
| int32 | GetMaxSampleRate
(
TArray< FbxNode* >& SortedLinks |
Calculate Max Sample Rate - separate out of the original ImportAnimations | |
| FbxNode * | GetMeshNodesFromName
(
const FString& ReimportMeshName, |
Return the node that match the mesh name. Return nullptr in case there is no match | |
| float | |||
| FbxNode * | GetRootSkeleton
(
FbxNode* Link |
Get Unreal skeleton root from the FBX skeleton node. Mesh and dummy can be used as skeleton. | |
| bool | GetSceneInfo
(
FString Filename, |
Get detail infomation in the Fbx scene | |
| bool | ImportAnimation
(
USkeleton* Skeleton, |
Import one animation from CurAnimStack | |
| UAnimSequence * | ImportAnimations
(
USkeleton* Skeleton, |
Add to the animation set, the animations contained within the FBX scene, for the given skeletal mesh | |
| bool | ImportBones
(
TArray< FbxNode* >& NodeArray, |
Import bones from skeletons that NodeArray bind to. | |
| bool | ImportCollisionModels
(
UStaticMesh* StaticMesh, |
Import collision models for one static mesh if it has collision models | |
| bool | ImportCurve
(
const FbxAnimCurve* FbxCurve, |
Import FbxCurve to Curve | |
| void | ImportFbxMorphTarget
(
TArray< FbxNode* >& SkelMeshNodeArray, |
Import Fbx Morph object for the Skeletal Mesh. In Fbx, morph object is a property of the Fbx Node. | |
| bool | ImportFile
(
FString Filename, |
Import Fbx file. | |
| bool | ImportFromFile
(
const FString& Filename, |
Attempt to load an FBX scene from a given filename. | |
| void | ImportNodeCustomProperties
(
UObject* Object, |
Import the user-defined properties on the node as FBX metadata on the object | |
| USkeletalMesh * | ImportSkeletalMesh
(
FImportSkeletalMeshArgs& ImportSkeletalMeshArgs |
||
| bool | ImportSkeletalMeshLOD
(
USkeletalMesh* InSkeletalMesh, |
Import LOD object for skeletal mesh | |
| UStaticMesh * | ImportStaticMesh
(
UObject* InParent, |
Creates a static mesh with the given name and flags, imported from within the FBX scene. | |
| UStaticMesh * | ImportStaticMeshAsSingle
(
UObject* InParent, |
Creates a static mesh from all the meshes in FBX scene with the given name and flags. | |
| void | ImportStaticMeshGlobalSockets
(
UStaticMesh* StaticMesh |
||
| void | ImportStaticMeshLocalSockets
(
UStaticMesh* StaticMesh, |
||
| UTexture * | ImportTexture
(
FbxFileTexture* FbxTexture, |
Generate Unreal texture object from FBX texture. | |
| void | ImportTexturesFromNode
(
FbxNode* Node |
Visit all materials of one node, import textures from materials. | |
| bool | IsOddNegativeScale
(
FbxAMatrix& TotalMatrix |
Check if there are negative scale in the transform matrix and its number is odd. | |
| bool | IsUnrealBone
(
FbxNode* Link |
Returns if the passed FbxNode can be used as a skeleton bone in Unreal. | |
| bool | IsUnrealTransformAttribute
(
FbxNode* Link |
Returns if the passed FbxNode can be used as a transform attribute in Unreal. | |
| bool | IsValidAnimationData
(
TArray< FbxNode* >& SortedLinks, |
Is valid animation data | |
| bool | LinkMaterialProperty
(
const FbxSurfaceMaterial& FbxMaterial, |
Create and link texture to the right material parameter value | |
| void | LoadNodeKeyframeAnimation
(
FbxNode* NodeToQuery, |
||
| void | LoadNodeKeyframeAnimationRecursively
(
FFbxCurvesAPI& CurvesAPI, |
||
| FString | MakeName
(
const ANSICHAR* name |
Help | |
| FName | MakeNameForMesh
(
FString InName, |
||
| FString | MakeString
(
const ANSICHAR* Name |
||
| void | MergeAllLayerAnimation
(
FbxAnimStack* AnimStack, |
Merge all layers of one AnimStack to one layer. | |
| bool | Initialize Fbx file for import. | ||
| void | Cleanup the fbx file data so we can read again another file | ||
| void | PopulateAnimatedCurveData
(
FFbxCurvesAPI& CurvesAPI |
For sequencer import | |
| void | PostImportStaticMesh
(
UStaticMesh* StaticMesh, |
Finish the import of the staticmesh after all LOD have been process (cannot be call before all LOD are imported). | |
| void | PrepareAndShowMaterialConflictDialog
(
const TArray< TMaterialType >& CurrentMaterial, |
||
| bool | ReadHeaderFromFile
(
const FString& Filename, |
Make sure the file header is read | |
| void | RecursiveBuildSkeleton
(
FbxNode* Link, |
Fill FBX skeletons to OutSortedLinks recursively | |
| FbxNode * | RecursiveFindParentLodGroup
(
FbxNode* ParentNode |
Find the first parent node containing a eLODGroup attribute. | |
| UStaticMesh * | ReimportSceneStaticMesh
(
uint64 FbxNodeUniqueId, |
Re-import Unreal static mesh from updated scene Fbx file if the Fbx mesh is in LODGroup, the LOD of mesh will be updated | |
| USkeletalMesh * | ReimportSkeletalMesh
(
USkeletalMesh* Mesh, |
Re-import Unreal skeletal mesh from updated Fbx file If the Fbx mesh is in LODGroup, the LOD of mesh will be updated. | |
| UStaticMesh * | ReimportStaticMesh
(
UStaticMesh* Mesh, |
Re-import Unreal static mesh from updated Fbx file if the Fbx mesh is in LODGroup, the LOD of mesh will be updated | |
| void | ReleaseScene () |
Empties the FBX scene, releasing its memory. | |
| void | RemoveTransformSettingsFromFbxNode
(
FbxNode* Node, |
Remove asset import settings for transform to an FBX node | |
| bool | ReplaceSkeletalMeshGeometryImportData
(
const USkeletalMesh* SkeletalMesh, |
||
| bool | ReplaceSkeletalMeshSkinningImportData
(
const USkeletalMesh* SkeletalMesh, |
||
| FbxNode * | RetrieveObjectFromName
(
const TCHAR* ObjectName, |
Retrieve the object inside the FBX scene from the name | |
| bool | RetrievePoseFromBindPose
(
const TArray< FbxNode* >& NodeArray, |
Retrieve pose array from bind pose | |
| void | SetMaterialOrderByName
(
FSkeletalMeshImportData& ImportData, |
||
| void | SetMaterialSkinXXOrder
(
FSkeletalMeshImportData& ImportData |
Get material mapping array according "Skinxx" flag in material name | |
| void | SetupAnimationDataFromMesh
(
USkeletalMesh* SkeletalMesh, |
Import and set up animation related data from mesh | |
| void | SetupTransformForNode
(
FbxNode* Node |
||
| void | ShowFbxMaterialConflictWindow
(
const TArray< TMaterialType >& InSourceMaterials, |
This function show a dialog to let the user resolve the material conflict that arise when re-importing a mesh | |
| void | ShowFbxSkeletonConflictWindow
(
USkeletalMesh* SkeletalMesh, |
This function show a dialog to let the user know what will be change in the skeleton if the fbx is imported | |
| void | SkinControlPointsToPose
(
FSkeletalMeshImportData& ImportData, |
Skins the control points of the given mesh or shape using either the default pose for skinning or the first frame of the default animation. | |
| void | TraverseHierarchyNodeRecursively
(
FbxSceneInfo& SceneInfo, |
Fill the FbxNodeInfo structure recursively to reflect the FbxNode hierarchy. | |
| void | UpdateSkeletalMeshImportData
(
USkeletalMesh* SkeletalMesh, |
||
| void | UpdateStaticMeshImportData
(
UStaticMesh* StaticMesh, |
||
| bool | ValidateAnimStack
(
TArray< FbxNode* >& SortedLinks, |
Validate Anim Stack - multiple check for validating animstack |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FFbxMaterial | |||
| FImportSkeletalMeshArgs | Creates a skeletal mesh from Fbx Nodes with the given name and flags, imported from within the FBX scene. |
Enums
| Type | Name | Description | |
|---|---|---|---|
| IMPORTPHASE |
Constants
| Name | Description |
|---|---|
| StaticInstance | |
| StaticPreviewInstance |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | SetScene
(
FbxScene* InScene |
Do not use this function. |