Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Advanced Import Settings" when opening a .glb show empty for "Root Type" and "Root Name" but in 4.1.2 it had "Node3D" and "Scene Root". Is this expected? #84305

Closed
nikywilliams opened this issue Nov 1, 2023 · 2 comments

Comments

@nikywilliams
Copy link

Godot version

v4.2.beta3.mono.official [e8d57af]

System information

Godot v4.2.beta3.mono - Windows 10.0.19045 - Vulkan (Mobile) - dedicated Radeon RX 580 Series (Advanced Micro Devices, Inc.; 31.0.21031.1005) - Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 Threads)

Issue description

I noticed that while importing a .glb file in v4.2-beta3 and reviewing the "Advanced Import Settings", both the "Root Type" and "Root Name" fields were empty while they had been populated in v4.1.2.

I wasn't sure if this behavior was expected in the new version of Godot

Steps to reproduce

Create new project
Import .glb file
Double click on the .glb file in the "FileSystem" tab
Review the values associated with the root node in the "Scene" tab

Image below comparing both versions:
image

Minimal reproduction project

Instructions above should be enough to follow to try and reproduce.

@aaronfranke
Copy link
Member

Yes, these fields are expected to be blank by default. This is intended behavior. See #79774

In Godot 4.1 and earlier, the GLTF import code generated a Node3D root on import by default, and then the general scene importer would check if this field != "Node3D" to decide if it should replace the root node. This means that the general scene importer code had no way to explicitly ask for a Node3D root.

In Godot 4.2 and later, we added a feature where optionally GLTF files can specify the details of the root node (currently the only tool that can use this feature is... Godot 4.2 and later when exporting GLTF, so if you go Godot 4.2 -> Godot 4.2 then the root node will be preserved). Without changing these settings in the general scene importer code, there would be no way to explicitly ask for a Node3D (in case a file had ex: RigidBody3D root and the user wanted to discard that in the importer). So this has been changed, now the default is empty (which means don't override). Existing .import files will continue to work the same, since it will replace Node3D with Node3D.

For the root name, it's generally the same situation. In Godot 4.1 and earlier, the general scene importer would check if this field != "Scene Root" to decide if it should replace the root node's name. This means that the general scene importer code had no way to explicitly ask for a scene named "Scene Root". I changed this to be an empty string by default (which means don't override), but I also kept a hack to ignore "Scene Root" for compatibility with existing files (this could be removed in the next compat breakage Godot 5.0 in the far future hopefully 2030s).

@nikywilliams
Copy link
Author

I appreciate the in-depth explanation, thank you. I'll close this issue.

@github-project-automation github-project-automation bot moved this from Pending Decision to Done in 4.x Release Blockers Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants