Navigation
API > API/Editor > API/Editor/UnrealEd
Main FBX Importer class.
| Name | FFbxImporter |
| Type | class |
| Header File | /Engine/Source/Editor/UnrealEd/Public/FbxImporter.h |
| Include Path | #include "FbxImporter.h" |
Syntax
class FFbxImporter
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FFbxImporter() |
FbxImporter.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FFbxImporter() |
FbxImporter.h |
Classes
| Name | Remarks |
|---|---|
| FImportSkeletalMeshArgs | Creates a skeletal mesh from Fbx Nodes with the given name and flags, imported from within the FBX scene. |
Structs
| Name | Remarks |
|---|---|
| FAnimCurveImportSettings | Helper structure to pass around the common animation parameters. |
| FFbxMaterial |
Enums
Protected
| Name | Remarks |
|---|---|
| IMPORTPHASE |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| StaticInstance | TSharedPtr< FFbxImporter > | FbxImporter.h | |
| StaticPreviewInstance | TSharedPtr< FFbxImporter > | FbxImporter.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ImportOptions | FBXImportOptions * | FbxImporter.h | ||
| Md5Hash | FMD5Hash | 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. | FbxImporter.h | |
| Scene | FbxScene * | Current Fbx scene we are importing. Make sure to release it after import | FbxImporter.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bImportOperationCanceled | bool | Holds if the current import operation was canceled or not. | FbxImporter.h | |
| ImportedMaterialData | FImportedMaterialData | FbxImporter.h | ||
| ImportOperationStack | int32 | Internal counter used to group import operation together when canceling (ie: Import Skeletal Mesh can trigger Import of Morph Targets.) | FbxImporter.h | |
| Logger | FFbxLogger * | Logger set/clear function | FbxImporter.h | |
| MeshNamesCache | TArray< FString > | Cache to create unique name for mesh. This is use to fix name clash. | FbxImporter.h | |
| OriginalFbxFramerate | float | FbxImporter.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddStaticMeshSourceModelGeneratedLOD
(
UStaticMesh* StaticMesh, |
Add a GeneratedLOD to the staticmesh at the specified LOD index | FbxImporter.h | |
void AddTokenizedErrorMessage
(
TSharedRef< FTokenizedMessage > Error, |
Error message handler | FbxImporter.h | |
void ApplyTransformSettingsToFbxNode
(
FbxNode* Node, |
Apply asset import settings for transform to an FBX node | FbxImporter.h | |
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 | FbxImporter.h | |
| Fill FBX skeletons to OutSortedLinks | FbxImporter.h | ||
bool CanCreateClass
(
UClass* Class |
The asset tool have a filter mecanism for CreateAsset, return true if the asset can be created, false otherwise | FbxImporter.h | |
bool CanImportClass
(
UClass* Class |
The asset tool have a filter mecanism for ImportAsset, return true if the asset can be imported, false otherwise | FbxImporter.h | |
void ClearAllCaches() |
Clear all data that need to be clear when we start importing a fbx file. | FbxImporter.h | |
void ClearTokenizedErrorMessages() |
FbxImporter.h | ||
void ConvertScene () |
Convert the scene from the current options. | FbxImporter.h | |
bool FillCollisionModelList
(
FbxNode* Node |
If the node model is a collision model, then fill it into collision model list | FbxImporter.h | |
void FillFbxCollisionMeshArray
(
FbxNode* Node |
Fill the collision models array by going through all mesh node recursively | FbxImporter.h | |
| Get all Fbx mesh objects not under a LOD group and all LOD group node | FbxImporter.h | ||
void FillFbxMeshArray
(
FbxNode* Node, |
Get all Fbx mesh objects | FbxImporter.h | |
| Get all Fbx skeletal mesh objects in the scene. these meshes are grouped by skeleton they bind to | FbxImporter.h | ||
bool FillSkeletalMeshImportData
(
TArray< FbxNode* >& NodeArray, |
Fill FSkeletalMeshIMportData from Fbx Nodes and FbxShape Array if exists. | FbxImporter.h | |
void FindAllLODGroupNode
(
TArray< FbxNode* >& OutNodeInLod, |
Find the all the node containing a mesh attribute for the specified LOD index. | FbxImporter.h | |
| Find FBX meshes that match Unreal skeletal mesh according to the bone of mesh | FbxImporter.h | ||
FbxNode * FindLODGroupNode
(
FbxNode* NodeLodGroup, |
Find the first node containing a mesh attribute for the specified LOD index. | FbxImporter.h | |
void FlushToTokenizedErrorMessage
(
enum EMessageSeverity::Type Severity |
FbxImporter.h | ||
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. | FbxImporter.h | |
FbxTimeSpan GetAnimationTimeSpan
(
FbxNode* RootNode, |
Get Animation Time Span - duration of the animation | FbxImporter.h | |
const TArray< TWeakObjectPtr< UObject > > & GetCreatedObjects() |
Get the UObjects that have been created so far during the import process. | FbxImporter.h | |
const TCHAR * GetErrorMessage () |
Retrieve the FBX loader's error message explaining its failure to read a given FBX file. | FbxImporter.h | |
FString GetFbxFileVersion() |
FbxImporter.h | ||
int32 GetFbxMeshCount
(
FbxNode* Node, |
Get mesh count (including static mesh and skeletal mesh, except collision models) and find collision models | FbxImporter.h | |
FString GetFileAxisDirection() |
FbxImporter.h | ||
FString GetFileCreator() |
FbxImporter.h | ||
FString GetFileUnitSystem() |
FbxImporter.h | ||
FbxGeometryConverter * GetGeometryConverter() |
FbxImporter.h | ||
int32 GetGlobalAnimStackSampleRate
(
FbxAnimStack* CurAnimStack |
Calculate the global Sample Rate for all the nodes in the FbxAnimStack pass in parameter | FbxImporter.h | |
bool GetImportOperationCancelled() |
Returns true if the last import operation was canceled. | FbxImporter.h | |
FBXImportOptions * GetImportOptions() |
Get the object of import options | FbxImporter.h | |
int32 GetImportType
(
const FString& InFilename |
Detect if the FBX file has skeletal mesh model. | FbxImporter.h | |
int32 GetMaxSampleRate
(
TArray< FbxNode* >& SortedLinks |
Calculate Max Sample Rate - separate out of the original ImportAnimations | FbxImporter.h | |
FbxNode * GetMeshNodesFromName
(
const FString& ReimportMeshName, |
Return the node that match the mesh name. Return nullptr in case there is no match | FbxImporter.h | |
float GetOriginalFbxFramerate() |
FbxImporter.h | ||
FbxNode * GetRootSkeleton
(
FbxNode* Link |
Get Unreal skeleton root from the FBX skeleton node. Mesh and dummy can be used as skeleton. | FbxImporter.h | |
bool GetSceneInfo
(
FString Filename, |
Get detail infomation in the Fbx scene | FbxImporter.h | |
bool ImportAnimation
(
USkeleton* Skeleton, |
Import one animation from CurAnimStack | FbxImporter.h | |
UAnimSequence * ImportAnimations
(
USkeleton* Skeleton, |
Add to the animation set, the animations contained within the FBX scene, for the given skeletal mesh | FbxImporter.h | |
bool ImportCollisionModels
(
UStaticMesh* StaticMesh, |
Import collision models for one static mesh if it has collision models | FbxImporter.h | |
void ImportFbxMorphTarget
(
TArray< FbxNode* >& SkelMeshNodeArray, |
Import Fbx Morph object for the Skeletal Mesh. In Fbx, morph object is a property of the Fbx Node. | FbxImporter.h | |
bool ImportFile
(
FString Filename, |
Import Fbx file. | FbxImporter.h | |
bool ImportFromFile
(
const FString& Filename, |
Attempt to load an FBX scene from a given filename. | FbxImporter.h | |
USkeletalMesh * ImportSkeletalMesh
(
FImportSkeletalMeshArgs& ImportSkeletalMeshArgs |
FbxImporter.h | ||
bool ImportSkeletalMeshLOD
(
USkeletalMesh* InSkeletalMesh, |
Import LOD object for skeletal mesh | FbxImporter.h | |
UStaticMesh * ImportStaticMesh
(
UObject* InParent, |
Creates a static mesh with the given name and flags, imported from within the FBX scene. | FbxImporter.h | |
UStaticMesh * ImportStaticMeshAsSingle
(
UObject* InParent, |
Creates a static mesh from all the meshes in FBX scene with the given name and flags. | FbxImporter.h | |
void ImportStaticMeshGlobalSockets
(
UStaticMesh* StaticMesh |
FbxImporter.h | ||
void ImportStaticMeshLocalSockets
(
UStaticMesh* StaticMesh, |
FbxImporter.h | ||
bool IsUnrealBone
(
FbxNode* Link |
Returns if the passed FbxNode can be used as a skeleton bone in Unreal. | FbxImporter.h | |
bool IsUnrealTransformAttribute
(
FbxNode* Link |
Returns if the passed FbxNode can be used as a transform attribute in Unreal. | FbxImporter.h | |
FName MakeNameForMesh
(
FString InName, |
FbxImporter.h | ||
void MergeAllLayerAnimation
(
FbxAnimStack* AnimStack, |
Merge all layers of one AnimStack to one layer. | FbxImporter.h | |
bool OpenFile
(
FString Filename |
Initialize Fbx file for import. | FbxImporter.h | |
void PartialCleanUp() |
Cleanup the fbx file data so we can read again another file | FbxImporter.h | |
void PopulateAnimatedCurveData
(
FFbxCurvesAPI& CurvesAPI |
For sequencer import | FbxImporter.h | |
void PostImportStaticMesh
(
UStaticMesh* StaticMesh, |
Finish the import of the staticmesh after all LOD have been process (cannot be call before all LOD are imported). | FbxImporter.h | |
bool ReadHeaderFromFile
(
const FString& Filename, |
Make sure the file header is read | FbxImporter.h | |
void RecursiveBuildSkeleton
(
FbxNode* Link, |
Fill FBX skeletons to OutSortedLinks recursively | FbxImporter.h | |
FbxNode * RecursiveFindParentLodGroup
(
FbxNode* ParentNode |
Find the first parent node containing a eLODGroup attribute. | FbxImporter.h | |
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 | FbxImporter.h | |
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. | FbxImporter.h | |
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 | FbxImporter.h | |
void ReleaseScene () |
Empties the FBX scene, releasing its memory. | FbxImporter.h | |
void RemoveTransformSettingsFromFbxNode
(
FbxNode* Node, |
Remove asset import settings for transform to an FBX node | FbxImporter.h | |
FbxNode * RetrieveObjectFromName
(
const TCHAR* ObjectName, |
Retrieve the object inside the FBX scene from the name | FbxImporter.h | |
void SetScene
(
FbxScene* InScene |
Prime the importer with an already existing scene object. | FbxImporter.h | |
void SetupAnimationDataFromMesh
(
USkeletalMesh* SkeletalMesh, |
Import and set up animation related data from mesh | FbxImporter.h | |
| Validate Anim Stack - multiple check for validating animstack | FbxImporter.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool BuildStaticMeshFromGeometry
(
FbxNode* Node, |
Set up the static mesh data from Fbx Mesh. | FbxImporter.h | |
void CheckSmoothingInfo
(
FbxMesh* FbxMesh |
Return UMaterial* Check if the meshes in FBX scene contain smoothing group info. | FbxImporter.h | |
void CleanUp() |
Clean up for destroy the Importer. | FbxImporter.h | |
void CleanUpUnusedMaterials
(
FSkeletalMeshImportData& ImportData |
Make sure there is no unused material in the raw data. | FbxImporter.h | |
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. | FbxImporter.h | |
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 | FbxImporter.h | |
bool CreateAndLinkExpressionForMaterialProperty
(
const FbxSurfaceMaterial& FbxMaterial, |
Material | FbxImporter.h | |
ACameraActor * CreateCamera
(
FbxCamera* InCamera, |
Import Fbx Camera object | FbxImporter.h | |
| Various actors, current the Fbx importer don't importe them | FbxImporter.h | ||
UMaterialInterface * CreateUnrealMaterial
(
const FbxSurfaceMaterial& FbxMaterial, |
Create Unreal material from Fbx material. | FbxImporter.h | |
int32 DoUnSmoothVerts
(
FSkeletalMeshImportData& ImportData, |
Make un-smooth faces work. | FbxImporter.h | |
bool FacesAreSmoothlyConnected
(
FSkeletalMeshImportData& ImportData, |
Check if two faces belongs to same smoothing group | FbxImporter.h | |
| Fill up and verify bone names for animation | FbxImporter.h | ||
bool FillAnimSequenceByKey
(
FbxNode* Node, |
Anims | FbxImporter.h | |
bool FillLightComponent
(
FbxLight* Light, |
Import Light detail info | FbxImporter.h | |
bool FillSkeletalMeshImportPoints
(
FSkeletalMeshImportData* OutData, |
Fill the Points in FSkeletalMeshIMportData from a Fbx Node and a FbxShape if it exists. | FbxImporter.h | |
bool FillSkelMeshImporterFromFbx
(
FSkeletalMeshImportData& ImportData, |
Meshes | FbxImporter.h | |
UMaterialInterface * FindExistingMaterialFromFbxMaterial
(
const FbxSurfaceMaterial& FbxMaterial, |
Tries to find an existing UnrealMaterial from the FbxMaterial, returns nullptr if could not find a material. | FbxImporter.h | |
void FindOrImportMaterialsFromNode
(
FbxNode* FbxNode, |
Create materials from Fbx node. | FbxImporter.h | |
void FixupMaterial
(
const FbxSurfaceMaterial& FbxMaterial, |
Add a basic white diffuse color if no expression is linked to diffuse input. | FbxImporter.h | |
bool GatherPointsForMorphTarget
(
FSkeletalMeshImportData* OutData, |
Fill the Points in FSkeletalMeshIMportData from Fbx Nodes and FbxShape Array if it exists. | FbxImporter.h | |
FString GetMaterialBasePackageName
(
const FString& MaterialFullName |
FbxImporter.h | ||
FString GetMaterialFullName
(
const FbxSurfaceMaterial& FbxMaterial |
Make material Unreal asset name from the Fbx material | FbxImporter.h | |
bool ImportBones
(
TArray< FbxNode* >& NodeArray, |
Import bones from skeletons that NodeArray bind to. | FbxImporter.h | |
void ImportNodeCustomProperties
(
UObject* Object, |
Import the user-defined properties on the node as FBX metadata on the object | FbxImporter.h | |
UTexture * ImportTexture
(
FbxFileTexture* FbxTexture, |
Generate Unreal texture object from FBX texture. | FbxImporter.h | |
void ImportTexturesFromNode
(
FbxNode* Node |
Visit all materials of one node, import textures from materials. | FbxImporter.h | |
bool IsOddNegativeScale
(
FbxAMatrix& TotalMatrix |
Check if there are negative scale in the transform matrix and its number is odd. | FbxImporter.h | |
| Is valid animation data | FbxImporter.h | ||
bool LinkMaterialProperty
(
const FbxSurfaceMaterial& FbxMaterial, |
Create and link texture to the right material parameter value | FbxImporter.h | |
void LoadNodeKeyframeAnimation
(
FbxNode* NodeToQuery, |
FbxImporter.h | ||
void LoadNodeKeyframeAnimationRecursively
(
FFbxCurvesAPI& CurvesAPI, |
FbxImporter.h | ||
bool ReplaceSkeletalMeshGeometryImportData
(
const USkeletalMesh* SkeletalMesh, |
FbxImporter.h | ||
bool ReplaceSkeletalMeshSkinningImportData
(
const USkeletalMesh* SkeletalMesh, |
FbxImporter.h | ||
bool RetrievePoseFromBindPose
(
const TArray< FbxNode* >& NodeArray, |
Retrieve pose array from bind pose | FbxImporter.h | |
void SetMaterialOrderByName
(
FSkeletalMeshImportData& ImportData, |
FbxImporter.h | ||
void SetMaterialSkinXXOrder
(
FSkeletalMeshImportData& ImportData |
Get material mapping array according "Skinxx" flag in material name | FbxImporter.h | |
void SetupTransformForNode
(
FbxNode* Node |
FbxImporter.h | ||
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. | FbxImporter.h | |
void TraverseHierarchyNodeRecursively
(
FbxSceneInfo& SceneInfo, |
Fill the FbxNodeInfo structure recursively to reflect the FbxNode hierarchy. | FbxImporter.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static T * CreateAsset
(
FString ParentPackageName, |
Templated function to create an asset with given package and name | FbxImporter.h | |
| Create a new asset from the package and objectname and class | FbxImporter.h | ||
static void DeleteInstance() |
FbxImporter.h | ||
static FFbxImporter * GetInstance
(
bool bDoNotCreate |
Returns the importer singleton. It will be created on the first request. | FbxImporter.h | |
static bool ImportCurve
(
const FbxAnimCurve* FbxCurve, |
Import FbxCurve to Curve | FbxImporter.h | |
static FString MakeName
(
const ANSICHAR* name |
Help | FbxImporter.h | |
static FString MakeString
(
const ANSICHAR* Name |
FbxImporter.h | ||
static void PrepareAndShowMaterialConflictDialog
(
const TArray< TMaterialType >& CurrentMaterial, |
FbxImporter.h | ||
static void RemoveFBXMetaData
(
const UObject* Object |
Remove metadata starting with the FBX_METADATA_PREFIX value associated to the specified UObject. | FbxImporter.h | |
static 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 | FbxImporter.h | |
static 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 | FbxImporter.h | |
static void UpdateSkeletalMeshImportData
(
USkeletalMesh* SkeletalMesh, |
FbxImporter.h | ||
static void UpdateStaticMeshImportData
(
UStaticMesh* StaticMesh, |
FbxImporter.h |