Open leonardschardijn opened 1 year ago
Still seeing this on v4.2.2.stable.official [15073afe3], despite PR 85922 being included.
I have a .glb
file in the project whose mesh is automatically extracted, on reimport, to a subdirectory (using the usual mesh paths feature of the advanced import window). A MeshInstance3D
in an opened scene references the extracted mesh. And, that scene is instantiated in the world scene.
When I export the .glb
file from Blender (triggering mesh extraction), the surface material override is cleared in the MeshInstance3D
inspector. The 3D viewport still appears to render the old material. But, playing the parent world scene reveals that the material is not assigned.
My current workaround is to make the mesh instance a child of yet another scene that is kept closed. As long as the MeshInstance3D
's direct parent scene isn't open during reimport, there seems to be no risk of the references breaking and those breakages being saved. Opening the scene after a reimport reveals that the material reference is still intact.
I get this issue on 4.3.dev6 and 4.3.beta1
Just adding some more data for whoever tackles this issue:
This bug also occurs if you use an import script to, say, extract multiple meshes from a single .blend
file. Or if you build new .scn
assets from the .blend
file without directly creating a mesh asset.
That is, I believe the bug isn't on the importing side, but in whatever is handling the "refresh" of currently loaded MeshInstance3D
s.
I also have noticed that the mesh data itself also sometimes does not refresh properly (it keeps displaying an outdated mesh after reimport), which could be related, although I don't have a proper repro yet.
Also happens when importing obj mesh.
Godot version
v4.2.dev1.official [0c2144da9]
System information
Arch Linux
Issue description
If you extract as Resources (save to file) the meshes from a glTF file, and use those meshes in MeshInstance3D nodes, when you reimport the glTF file all assigned Materials will be removed from your MeshInstance3D nodes.
Steps to reproduce
Steps to reproduce the issue in the Minimal reproduction project:
NOTES: If you close the project and reopen it, the Material will be back. If you save the project (even if there is no * indicating a modification), the Material is gone for good.
Minimal reproduction project
import_bug.zip