-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add an editor tool to automatically upgrade and re-save meshes #83613
Conversation
3cd54ad
to
92797cf
Compare
92797cf
to
0cfc207
Compare
0cfc207
to
91be05a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested it, but from the code point of few it looks good, aside from a couple nits and small suggestions.
I tested importing a project with 4.1.1 and then opening it with the windows-editor artifact generated by this PR and it seems to work well overall. I only had an issue with a large gltf file, getting a "Safe save failed" error message. I could reproduce it on Windows 10 and Windows 11, even with Windows Defender disabled. Disabling safe save and reloading the project to re-trigger the conversion worked well. Even with safe save active, just clicking on reimport after the error also seemed to work well. The rest of the gltf files converted flawlessly so it's probably an unrelated issue. In terms of UX I think everything's much clearer now. |
As reported here #83429 the importer on 4.2 will change the names of some meshes (due to previous bug with mesh name that is now fixed) breaking references. Could this tool be a good place to detect/warn or even deal with this as well when the reimport happens? |
@lostminds This is tightly related to checks done in the rendering server, which has nothing to do with the importer. So without a completely different implementation this is not compatible with your suggestion. For the linked issue we want to introduce a way to version importer behavior, so you can keep the old logic for existing scenes. |
91be05a
to
129aeac
Compare
Tested on https://github.com/team-godog/NGJ2023_Godog and another local prototype, both options work great! |
I approve of the idea and it's necessary to avoid usability problems upgrading the mesh format. |
129aeac
to
318ef84
Compare
Thanks! |
Is there now versioning inside of ArrayMesh? |
Yes.
That's right |
Upgrading engine from v4.2.dev.custom_build [f7bc653] to v4.2.beta.custom_build [9144457] I'm upgrading a reasonable size project and it corrupts many scenes, removing everything from the tscn file except the first line. It is corrupting scenes that have no meshes in them but I'll try to gather more information before opening an issue. |
FYI, only certain GDExtensions like Godot-Jolt and Terrain3D use this prompt. What creates the restart prompt is |
@TokisanGames this tool doesn't interact with add-ons at all. If you are having problems with the add-on prompt, I suggest you open an issue about it. There are known problems with the surface upgrade tool (see #83991) and I am fixing them as quickly as I can. |
Fixes: #83287
This PR adds a popup the first time a surface that needs to be upgraded is encountered. The user can select "Upgrade" to have the engine automatically re-import/re-save all meshes so they are saved with the new format.
Also, changes the warning message (when p_path is available) to: