Type
Overview
The Options state in AssetImporterUIComponent exposes Scale, Axis, Generate Normals, Merge Identical Vertices, Import Materials, and Import Textures controls, but none of these values are read inside StartImport(). The ImportConfiguration is built without them and both importers ignore them entirely — the options panel is currently cosmetic.
Context
AssetImporterUIComponent::StartImport() builds an AssetCodec::ImportConfiguration from EditorConfiguration paths only. The five settings fields on the component (m_scale, m_axis_index, m_gen_normals, m_merge_vertices, m_import_materials, m_import_textures) are stored but never forwarded.
Related code:
Tetragrama/Components/AssetImporterUIComponent.cpp — StartImport()
ZEngine/ZEngine/Importers/AssetCodec.h — ImportConfiguration
ZEngine/ZEngine/Importers/AssimpImporter.cpp — ImportFile(), m_flags
ZEngine/ZEngine/Importers/GltfImporter.cpp — ImportFile()
What needs to be done
- Add optional fields to
ImportConfiguration for the user-facing settings:
float ImportScale (default 1.0)
bool UpAxisZ (default false — Y-up)
bool GenerateNormals (default true)
bool MergeIdenticalVertices (default true)
bool ImportMaterials (default true)
bool ImportTextures (default true)
- Populate these fields in
AssetImporterUIComponent::StartImport() from the component's member variables.
- In
AssimpImporter::ImportFile(), build the assimp post-process flags from the config fields instead of m_flags (the static bitmask).
- In
GltfImporter::ImportFile(), apply ImportScale to the root transform and skip material/texture extraction when the corresponding flags are false.
Testing
- Import a GLB with Scale = 0.01 → verify the mesh is visibly smaller in the viewport.
- Import an FBX with Generate Normals unchecked → verify no normals pass is run (check assimp log output).
- Import with Import Materials unchecked → verify no
.zematerial is written to disk.
Acceptance criteria
Estimated effort
1–2 days
Type
Overview
The Options state in
AssetImporterUIComponentexposes Scale, Axis, Generate Normals, Merge Identical Vertices, Import Materials, and Import Textures controls, but none of these values are read insideStartImport(). TheImportConfigurationis built without them and both importers ignore them entirely — the options panel is currently cosmetic.Context
AssetImporterUIComponent::StartImport()builds anAssetCodec::ImportConfigurationfromEditorConfigurationpaths only. The five settings fields on the component (m_scale,m_axis_index,m_gen_normals,m_merge_vertices,m_import_materials,m_import_textures) are stored but never forwarded.Related code:
Tetragrama/Components/AssetImporterUIComponent.cpp—StartImport()ZEngine/ZEngine/Importers/AssetCodec.h—ImportConfigurationZEngine/ZEngine/Importers/AssimpImporter.cpp—ImportFile(),m_flagsZEngine/ZEngine/Importers/GltfImporter.cpp—ImportFile()What needs to be done
ImportConfigurationfor the user-facing settings:float ImportScale(default 1.0)bool UpAxisZ(default false — Y-up)bool GenerateNormals(default true)bool MergeIdenticalVertices(default true)bool ImportMaterials(default true)bool ImportTextures(default true)AssetImporterUIComponent::StartImport()from the component's member variables.AssimpImporter::ImportFile(), build the assimp post-process flags from the config fields instead ofm_flags(the static bitmask).GltfImporter::ImportFile(), applyImportScaleto the root transform and skip material/texture extraction when the corresponding flags are false.Testing
.zematerialis written to disk.Acceptance criteria
AssetImporterUIComponenttoImportConfigurationAssimpImporterrespectsGenerateNormals,MergeIdenticalVertices,ImportMaterials,ImportTextures, andImportScaleGltfImporterrespectsImportScale,ImportMaterials, andImportTexturesEstimated effort
1–2 days