glTF-Blender-IO icon indicating copy to clipboard operation
glTF-Blender-IO copied to clipboard

Inconsistent behaviour regarding multiple scenes in import vs. export

Open JillCrungus opened this issue 10 months ago • 2 comments

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:

  1. Open the provided blend_with_multiple_scenes.blend
  2. 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"
  3. Create a new Blender file for a clean start.
  4. Import the exported glTF file
  5. 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.

JillCrungus avatar Apr 13 '24 00:04 JillCrungus

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.

julienduroure avatar Apr 15 '24 10:04 julienduroure

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.

Rainbrony avatar May 07 '24 08:05 Rainbrony