Skip to content

Naming scheme change for meshes imported from .glb breaking scenes #83429

@lostminds

Description

@lostminds

Godot version

v4.2.beta1.official [b137180]

System information

Godot v4.2.beta1 - macOS 13.6.0 - Vulkan (Mobile) - integrated Apple M2 Pro - Apple M2 Pro (10 Threads)

Issue description

It appears 4.2.beta1 has introduced a new internal mesh format, and when you first open a project from a previous version you get a warning that all the meshes have been re-imported, and if you save them like this they'll be incompatible with previous versions.
servers/rendering_server.cpp:2035 - Upgrading mesh from older surface format. Once saved again (or re-imported), this mesh will be incompatible with earlier versions of Godot. (User)

However, it seems that this new mesh import has also broken all my meshes due to a naming issue:
This might have been a bug in the previous importer, but for some reason in the imported mesh scenes of my .glb (and hence in the scenes instancing these) the meshes often have "2" after their name. So, for example the Block.glb file import I've supplied as an example resulted (pre 4.2beta1) in an imported scene with a MeshInstance3D name called "Block2". But the new format importer instead results in a MeshInstance3D called simply "Block". This new name in turn means all references to the mesh in the scene (as far as I can tell in this project, all references to all meshes in all scenes) break, since they are overrides, node_paths etc for "Block2" and this no longer exists in the node hierarchy.

scene/resources/packed_scene.cpp:231 - Node 'Model/Block/Block2' was modified from inside an instance, but it has vanished

Steps to reproduce

  • Import a glb file in a pre 4.2.beta1 (or maybe earlier?) godot project (applied example file below).
  • Instance this in a scene. Notice that the MeshInstance3D in the imported scene is called "Block2"
  • Make some reference to this in the scene, for example set an override material or make a script referencing the mesh as an export var.
  • Open the project in 4.2beta1
  • Observer that the new re-imported MeshInstance3D is now called just "Block" instead of "Block2", and that the references/overrides in your scene are broken.

Minimal reproduction project

Test model file: Block.glb.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions