glTF-Blender-IO
glTF-Blender-IO copied to clipboard
Inconsistent behaviour regarding multiple scenes in import vs. export
Describe the bug When exporting a project with multiple Blender scenes as glTF, the exporter will correctly create multiple scenes in the exported glTF.
However when importing a glTF with multiple scenes, including those exported with this addon, all scenes get collapsed into a singular "Scene" scene.
This extends to the scene name being lost and becoming "Scene" even in single scene exports.
To Reproduce Steps to reproduce the behavior:
- Open the provided blend_with_multiple_scenes.blend
- Export to glTF 2.0 2a. Optionally, check the exported file and verify that it does indeed include 2 scenes - "Scene A" and "Scene B"
- Create a new Blender file for a clean start.
- Import the exported glTF file
- Observe that the objects from both scenes have been collapsed into a singular "Scene" scene
Expected behavior Each glTF scene and its associated objects should be correctly imported into seperate Blender scenes with their original names.
Screenshots N/A
.blend file/ .gltf (mandatory) blend_with_multiple_scenes.zip
Version
- OS: Windows
- Blender Version: 4.1
Additional context I'm not sure if this is a bug or an intentional decision but in my opinion the way the addon handles multiple scenes should be consistent across both import and export - either don't support exporting them or properly support importing them. The latter would of course be preferable.
Hello, As far as I remember, this is a quite old behavior/workaround, at the time where 2.8 had a bug where it was not possible to switch scene in background. ... And this was never fixed in this addon since.
Setting as enhancement.
you are exporting 2 scenes to 1 gltf file? I don't need to do that, I just change the first scene in blender by changing the scene name(or add a scene like 000), and my whole gltf variant system is in complete discord. I didn't found this at first, I even re-organized my whole gltf variants. the code in this addon3.6.28 did not seem to handle multi scene situations. I tried Blender4.1, this issue still exists.
Maybe consider adding this reminder into the document, because this can make creators like me go crazy. I had a weekly backup of the file but is still not convenient.