FBXProcessor
Post-processor that renames FBX nodes, materials, and animation clips based on ProcessorTable mappings using the Autodesk FBX SDK. Also remaps materials by name after renaming.
Definition
Namespace: Paragon.Editor.ThirdPartyPackageImporter Assembly: Paragon.Editor.dll
internal class FBXProcessor : ProcessorInherits: Processor
Remarks
This processor uses the Autodesk FBX SDK (Autodesk.Fbx) to directly modify FBX file internals. After renaming, it triggers Unity's ModelImporter to remap materials and save/reimport the asset.
Processing Pipeline
For each .fbx file:
FBX SDK pass — opens the file, recursively walks all nodes:
Renames nodes via
MESHEScontext lookupFor renamed nodes, also renames their attached materials via
MATERIALScontext lookupExports the modified FBX back to disk
ModelImporter pass — loads the
ModelImporterfor the asset:Calls
SearchAndRemapMaterials(by material name, search everywhere)Renames animation clips via
ANIMATIONScontext lookupSaves and reimports
Item Filtering
Skips local packages — returns empty for
IsLocalPackageFilters to
.fbxfiles — only enabled, non-folder items with.fbxextension (case-insensitive)
FBX SDK Lifecycle
The ProcessFBX helper manages the full Autodesk SDK lifecycle:
Create
FbxManager,FbxIOSettings,FbxImporterImport the FBX file into an
FbxSceneInvoke the processing callback on the scene
Export the modified scene via
FbxExporterDestroy all SDK objects in reverse order
Quick Lookup
Rename a mesh node
Add entry in ProcessorTable under MESHES context
Rename a material
Add entry in ProcessorTable under MATERIALS context
Rename an animation clip
Add entry in ProcessorTable under ANIMATIONS context
Methods
OnProcess (protected override)
Returns enabled .fbx items from the package. Returns empty for local packages.
OnProcessItem (protected override)
Processes a single FBX file: renames nodes and materials via FBX SDK, remaps materials, renames animation clips, and reimports.
ProcessFBX (private static)
Opens an FBX file via the Autodesk SDK, invokes a callback on the scene, and saves the modified file.
path
string
Path to the .fbx file
process
Action<FbxScene>
Callback to modify the scene
ProcessNode (private static)
Recursively walks the FBX node tree, invoking a callback on each node.
ProcessAnimationClips (private static)
Iterates all ModelImporterClipAnimation entries and invokes a callback on each, then reassigns the array to the importer.
Common Pitfalls
Autodesk FBX SDK dependency This processor requires the Autodesk.Fbx package. If the package is not installed, the class will fail to compile.
FBX file is modified on disk The processor directly modifies the .fbx file via export. The original node/material names are permanently changed in the file. There is no undo mechanism.
Material remap depends on naming SearchAndRemapMaterials uses BasedOnMaterialName with SearchEverywhere. If renamed materials don't match any existing material assets by name, the remap will fail silently and the model will use default materials.
See Also
PostProcessors Overview — post-processor subsystem
MaterialProcessor — upgrades materials to URP
ProcessorTable — lookup table for name mappings
Last updated