Type
Overview
Every successful import writes MetaFileData::SourcePath (the original source file path) to the .meta sidecar alongside the cooked artifact. This data is available but there is no UI path to use it — users cannot reimport an asset when the source file changes without going through a fresh file-picker import.
Context
AssetImporterUIComponent::OnImportFileComplete() calls MetaFileIO::Write() with the source path populated. The .meta file is stored next to the .zemesh artifact under the VFS. However:
- The content browser has no right-click context menu.
AssetImporterUIComponent has no "reimport selected" action.
- There is no code path that reads
SourcePath back and triggers ImportFile.
Related code:
ZEngine/ZEngine/Core/VFS/Meta/MetaFileData.h — SourcePath field
ZEngine/ZEngine/Core/VFS/Meta/MetaFileIO.h/.cpp — read/write
Tetragrama/Components/AssetImporterUIComponent.cpp — OnImportFileComplete()
Tetragrama/Components/ContentBrowserUIComponent (or ProjectViewUIComponent) — future right-click target
What needs to be done
- Add a right-click context menu to the content browser grid for
.zemesh items.
- On "Reimport", read the
.meta sidecar for that asset via MetaFileIO::Read().
- If
SourcePath is non-empty and the file exists on disk, populate AssetImporterUIComponent::m_path_buf and call StartImport() with m_add_to_scene = false.
- If
SourcePath is empty or the file is missing, show an error in the importer log and fall back to opening the file picker.
- Add a visible "Reimport" button in the importer panel's Idle state history list (next to each successfully imported entry).
Testing
- Import a GLB → modify it externally → right-click the
.zemesh in the content browser → "Reimport" → verify the updated mesh is reflected in the scene.
- Right-click a
.zemesh with a missing source file → verify a clear error message is shown.
Acceptance criteria
Estimated effort
1 day
Type
Overview
Every successful import writes
MetaFileData::SourcePath(the original source file path) to the.metasidecar alongside the cooked artifact. This data is available but there is no UI path to use it — users cannot reimport an asset when the source file changes without going through a fresh file-picker import.Context
AssetImporterUIComponent::OnImportFileComplete()callsMetaFileIO::Write()with the source path populated. The.metafile is stored next to the.zemeshartifact under the VFS. However:AssetImporterUIComponenthas no "reimport selected" action.SourcePathback and triggersImportFile.Related code:
ZEngine/ZEngine/Core/VFS/Meta/MetaFileData.h—SourcePathfieldZEngine/ZEngine/Core/VFS/Meta/MetaFileIO.h/.cpp— read/writeTetragrama/Components/AssetImporterUIComponent.cpp—OnImportFileComplete()Tetragrama/Components/ContentBrowserUIComponent(orProjectViewUIComponent) — future right-click targetWhat needs to be done
.zemeshitems..metasidecar for that asset viaMetaFileIO::Read().SourcePathis non-empty and the file exists on disk, populateAssetImporterUIComponent::m_path_bufand callStartImport()withm_add_to_scene = false.SourcePathis empty or the file is missing, show an error in the importer log and fall back to opening the file picker.Testing
.zemeshin the content browser → "Reimport" → verify the updated mesh is reflected in the scene..zemeshwith a missing source file → verify a clear error message is shown.Acceptance criteria
.zemeshitems in the content browserSourcePathfrom the.metasidecar and triggersImportFileEstimated effort
1 day