Closed lucbf closed 2 years ago
I have to say that I've tried to fix this bug by making godot save the changes on the .import folder but I gave up when I saw that (at least aparently) godot just wants to save .tscn and .tres files.
You mean that changes get lost on the inherited scene when editing the source model?
No, when you create a MeshInstance node and load a obj mesh
Tested locally, seems like a slight useability issue. The "Changes may be lost!" warning does appear on imported .obj meshes: Unfortunatelly, when you edit the mesh in-place, the warning is nowhere to be seen (I guess we shouldn't allow the user to edit imported resources in-place?)
Editing resources in place can be useful for testing, but maybe can be partially locked and force you to open a "preview mode" with a button or something.
I would like to work on this.
@elizaho Thanks for your interest in contributing. Go ahead :slightly_smiling_face:
I have a solution but it's not cover everery possibilities where current_node have a mesh
Another thing, the button warning was not update when I add or delete a mesh .obj
editor/editor_node.cpp
I would like to add a commit but i have a PR open (#39141) , what can I do?
@ChristopheLY You can use separate branches to make several PRs. See https://docs.godotengine.org/en/latest/community/contributing/pr_workflow.html#branching
In general you should avoid making PRs from your fork's master
branch, but since you already have one, it's not a problem, you just need to create a new branch and then reset it to the upstream master
branch's state.
It took me a while to understand what the issue is exactly so I'll rephrase it.
When editing the .obj directly, as Bojidar pointed out, it does show "changes may be lost".
When editing the Mesh resource assigned to a MeshInstance3D, whether it's saved as a custom .tres or builtin in its parent node, you can change things. You can assign a material, etc.
The part which is problematic is that if you didn't save this modified Mesh resource as a .tres
, and you then reimport the .obj
file, any changes made on top of it in the scene will be lost.
I'll close this as duplicate of #42128 which is a bit clearer.
Godot version: 3.0.x, 3.1
I suspect Material_OV was added because of this, nevertheless there's no workaround for other nodes such as gridmap and multimesh and even if there was it would be impossible to set a .obj file as local to scene for example.