godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.35k stars 19.22k forks source link

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

Open Ebbombe opened 3 months ago

Ebbombe commented 3 months ago

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

Minimal reproduction project (MRP)

N/A

github-actions[bot] commented 3 months ago

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 commented 2 months ago

Following the instructions exactly:

After editing

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 commented 1 month ago

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 commented 1 month ago

Did you mean to link another issue number?

caioraphael1 commented 1 month ago

Did you mean to link another issue number?

ooops, now the link is correct

Rindbee commented 1 month ago

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 commented 3 weeks ago

I initially thought that this is a duplicate of my issue https://github.com/godotengine/godot/issues/90659. In https://github.com/godotengine/godot/issues/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 commented 4 days ago

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 commented 4 days ago

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 commented 4 days ago

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

Can you check if https://github.com/godotengine/godot/pull/92279 fixes or doesn't fix this issue?

passivestar commented 4 days ago

Can you check if https://github.com/godotengine/godot/pull/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