Skip to content

Import repair

After an FBX, glTF or Interchange import, the mesh materials are often not what you want: instances of the importer’s own base materials, plain materials the importer made next to the mesh, maps that point nowhere, or the default material. The Import repair page finds these materials, picks the texture set that belongs to each one and fixes it with your master material.

  • Content Browser: right-click static or skeletal meshes, or folders, and choose Repair Imported Materials. Folders are searched with their subfolders.
  • Panel: open the Import repair tab (Repair when the panel is narrow), select meshes or folders in the Content Browser and click Use selection in the header.
  • After a mesh import: a notification offers the repair. See Suggestion after a mesh import.
  • Python: open_import_repair(assets, folders). See Python.

The scan only reads. Nothing changes until you click Repair.

Material Smith checks every material slot of the meshes. Each material is listed once, with all the slots that use it.

Issue Pill What it means
Wrong parent Wrong parent A material instance whose parent is engine or importer content, for example a base material in /InterchangeAssets/... or /Engine/....
Imported material Imported material A material the importer made next to the mesh (in the mesh’s folder tree), not an instance of your master.
Missing textures Missing textures An instance of a known master (a Material Smith master, the master picked in Options, or a master with a saved profile) whose maps are switched on without a texture, or an instance whose texture parameters point to deleted textures.
Default material Default material The slot is empty or uses the engine’s default material (WorldGridMaterial, DefaultMaterial). Several such slots that get the same texture set become one row.

Engine or plugin materials picked on purpose, and instances of your own masters without missing textures, are left alone.

The texture sets are searched next to the meshes: in the mesh folder, or in its parent folder when the mesh folder has a name from Mesh Folder Names (Meshes, Models, StaticMeshes, FBX …: Rock/Meshes → Rock), with subfolders. Folders of the textures the material already reads are searched too.

For each material, Material Smith tries, in this order:

  1. The textures the material uses. The set that holds most of them wins, for example the material uses Chair_Wood_BaseColor.
  2. The material name, without its prefix: named like the material MI_Rock.
  3. The mesh and slot name: SM_Chair slot Wood → set Chair_Wood, named like SM_Chair, slot Wood.
  4. The slot name alone: named like the slot Wood.
  5. The mesh name, for meshes with one slot: named like the mesh SM_Leaf.

Names are compared without separators and case. When several sets have the name, the one inside the mesh’s folder tree, or else the one sharing the longest folder path, wins. Texture sets are detected with the same name table as everywhere else.

The page shows the title Import repair with the number of materials, the Source (the meshes and folders that were loaded) and Scan again, which checks the same meshes again. An intro line explains what is found and that old materials are not deleted.

Each row has:

  • A check box. It is off and disabled when no texture set was found.
  • A square thumbnail of the material (of the mesh for an empty slot).
  • The material name (for an empty slot SM_Name / Slot) and the problem, for example Instance of BasicShapeMaterial, which is engine or importer content (/Engine/BasicShapes). Used by SM_Rock. or No texture in Base Color Map. Used by SM_Crate.
  • The fix, with the reason the set was picked:
    • Reparent MI_Rock to the master and fill it from the set Rock (named like the material MI_Rock)
    • Refill MI_Crate from the set Crate (named like the material MI_Crate)
    • Put MI_Chair_Wood into the slot, made from the set Chair_Wood (the material uses Chair_Wood_BaseColor)
    • No texture set found
  • The issue pill. In a compact panel it moves under the material name.

Before a scan, the list says Select imported meshes or their folders in the Content Browser and click Use selection. When nothing needs a fix, it says No problems found. Every material of these meshes is fine.

At the bottom, a line says N without a texture set stay as they are (or Every listed material has a texture set.), next to the Repair N materials button.

  1. Uncheck the materials you want to keep as they are.

  2. Set the Options on the Texture sets page if needed: the master material (or Built-in Standard or Substrate), Virtual textures, Fix texture settings, Pack channels and Save assets apply to the repair too.

  3. Click Repair N materials.

Each checked material is fixed in one of two ways:

Material Fix
An instance in your project (Wrong parent, Imported material instance) The instance itself is kept, so every level, Blueprint and mesh that uses it gets the fix. It is reparented to the master from Options, the importer’s parameter values are cleared, and it is filled with the maps of the set like any Material Smith instance.
An instance with Missing textures The instance keeps its own parent and is refilled with the maps of the set.
A plain material, an engine material or an empty slot The set’s instance (MI_Name in the set’s instance folder) is created or updated and put into the slots.

Old materials are not deleted; remove them yourself once you are happy with the result. Several materials replaced by the same set’s instance share one instance.

When the repair is done, the list is scanned again and a notification sums it up, as after Create, for example ta Material Smith: 1 created, 2 updated, 3 meshes assigned.

With Suggest Repair After Import on (the default), Material Smith checks the materials of meshes you import (FBX, glTF, OBJ …) about 1.5 seconds after the import ends. If it can fix some of them, a notification says, for example, ta Material Smith can fix 3 materials of the imported meshes. Review and repair opens the Import repair page with those meshes; Dismiss closes it.

Turn the suggestion off in Project Settings > Plugins > ta Material Smith > Import. See Settings.

import unreal
smith = unreal.get_editor_subsystem(unreal.TAMaterialSmithSubsystem)
options = smith.get_default_options()
items = smith.find_import_problems([], ["/Game/Imported"], options)
for item in items:
print(item.material, item.issue, item.action, item.set.name, item.match_reason)
result = smith.repair_import_problems(items, options)

See Python for the fields of TAMaterialSmithRepairItem.