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

Re-import glb model doesn't change the old glb model #90241

Closed
daenimal opened this issue Apr 5, 2024 · 11 comments · Fixed by #94020
Closed

Re-import glb model doesn't change the old glb model #90241

daenimal opened this issue Apr 5, 2024 · 11 comments · Fixed by #94020

Comments

@daenimal
Copy link

daenimal commented Apr 5, 2024

Tested versions

Bug found in 4.2.1 (Forward+)

System information

Windows 11

Issue description

I imported some 3d models in the editor with drag and drop in a folder and then put in a scene, after that i modified (change origin of the 3d model) and re-exported from blender as glb with the same name (overwriting) and re-imported them (using the re-import command in Godot to refresh the glb file) no changes at all neither in the scene nor in the re-importef model

Steps to reproduce

  • export a 3d model in glb from blender (4.1)
  • import 3d model in godot (drag and drop in a folder in the editor)
  • put model in the scene
  • return to blender and cahnge the origin to the model and export overwriting the glb model
  • re-import the 3d model in godot (by refreshing button in the godot editor)

Minimal reproduction project (MRP)

N/A

Copy link

github-actions bot commented Apr 5, 2024

Hello from the maintainer team!

First of all, thank you for taking the time to report an issue here.

In case you haven't already, be sure to attach an MRP (minimal reproduction project) if specific steps or assets are needed in order to reproduce the issue. Contributors will use the MRP to validate that the fix is working as intended.

The time it will take to assess and fix your issue may vary. Follow the blog about our new releases and pre-releases to track new fixes or go to our forum where users could help you in the meantime.

Thank you for your patience.

@huwpascoe
Copy link
Contributor

Following the instructions exactly:

  • path/model.blend is exported as...
  • exportpath/model.glb is user copied to...
  • godotproj/model.glb is imported by Godot.

After editing

  • path/model.blend is re-exported as...
  • exportpath/model.glb.
  • godotproj/model.glb is unchanged.

Even if reimport is clicked, there's no way Godot can know about the exported file if it's not drag dropped over the existing one?

@caioraphael1
Copy link

caioraphael1 commented May 11, 2024

I use 4.3-dev5, and I'm also having this problem consistently when reimporting .gltf files. This happens whether the node is from the .gltf file itself, or from an Inherited Scene. This makes that every time I reimport something, I have to delete the old instance and create a new one, or check every single 'undo' icon in the Inherited Scene, to update manually the changes made in the re-import.

I've only tested it with .gltf, I don't use .glb or .blend.

Also, this seems related to #90659

@fire
Copy link
Member

fire commented May 11, 2024

Did you mean to link another issue number?

@caioraphael1
Copy link

Did you mean to link another issue number?

ooops, now the link is correct

@Rindbee
Copy link
Contributor

Rindbee commented May 24, 2024

It actually changes, but it automatically overwrites the changed properties to keep the scene as it was when it was opened.

It might be better to add these automatically overwritten changes to undo/redo.

If you don't want this behavior, you can close the scene tab when importing. Or click the revert icon of the related node properties.

@passivestar
Copy link
Contributor

I initially thought that this is a duplicate of my issue #90659. In #90659 I mentioned that modifying geometry in such a way that it would change its dimensions or adding/removing objects forces the whole imported scene to update. However recently I'm often facing a problem where that workaround doesn't work. Not even clicking "Reimport" works. Which is what this issue is describing. I have to do this for a mesh to get updated:

I have to delete the old instance and create a new one

@passivestar
Copy link
Contributor

I have to do this for a mesh to get updated:
I have to delete the old instance and create a new one

Just found out that instead of deleting and creating a new instance pressing "Scene -> Reload Saved Scene" works too. So the problem is that the host scene doesn't get updated when a gltf inside of it gets reimported

That is only the case when editable children is disabled though, if editable children are enabled then indeed you need to press every revert icon near every transform and subresource like meshes because for some reason godot overwrites those in inherited scenes or when editable children is used, dumping all of that data into the host scene. Isn't the point of scene inheritance to be able to add/modify data selectively?

@caioraphael1
Copy link

caioraphael1 commented Jun 30, 2024

Just found out that instead of deleting and creating a new instance pressing "Scene -> Reload Saved Scene" works too. So the problem is that the host scene doesn't get updated when a gltf inside of it gets reimported

that's really good to know, thanks! I wish this got fixed tho, its quite annoying

@fire
Copy link
Member

fire commented Jun 30, 2024

Fix script properties being lost and prevent node reference corruption upon scene reimport

Can you check if #92279 fixes or doesn't fix this issue?

@passivestar
Copy link
Contributor

Can you check if #92279 fixes or doesn't fix this issue?

It doesn't fix this issue, I was using only the master branch for the past month

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants