How to Rename Meshes imported as Separate Files from .gltf file?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By druidpeter

When reimporting a landscape .glb file to store separate objects as files, the output name for the landscape mesh is /TERR_0_0_Plane057.mesh.

I want to rename this file so that it is simply “lod0.mesh”. Each of the .glb scenes need to be reimported with separate object files in a sub-directory that is named after the .glb scene, and each of these sub-directories need to contain similarly imported objects: “lod0.mesh”, “lod1.mesh”, and “lod2.mesh”. Which correspond to the lod levels of each terrain segment on the map.

The reason I’m doing it like this is so that the .tscn scenes which inherit from each .glb scene don’t attach all 3 lod levels to their scene trees at once. For performance reasons, I want to simply load the *.mesh files via a ResourceLoader and swap out the different lod levels on each MeshInstance at runtime.

My code for managing swapping out instances relies on this naming convention inside each terrain subdirectory, as well.

The problem I’m facing is that if I rename “TERR_0_0_Plane057.mesh” to “lod0.mesh” in the file browser, the .glb scene will throw an error when trying to save it, “Unknown format: .glb”. Hence, the file will be renamed in the file browser, but the .glb will still point to the old filename, and this will break the program whenever trying to build the application.

Does anyone know how to solve this?