godotengine / godot

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

It's impossible to remove the import script from the import dialog. #78766

Open viksl opened 1 year ago

viksl commented 1 year ago

Godot version

4.1 RC1, 4.0.3

System information

Windows 10, Nvidia GTX 1660Ti, Vulkan

Issue description

I think I'm being dumb but I can't remove the import script in the import dialog so now I'm stuck with all my files with import scripts which they don't need.

I'd appreciate some advice, there's no circle arrow to back to the default.

I tried:

  1. right click and clear -> nothing.
  2. deleting the path manually -> nothing

If anything trying to remove it starts throwing a pop up window with an error message asking me if I forgot to retun the scene or so in the script (or return as a Node, I'm not sure what the whole message says since it gets covered by the import dialog or quickly disappears). But it appears everytime with import, reimport, and so on which breaks something since it throws an error that the pop up already has a parent and can't reparent or so, this happens multiple times depending on how many times I press the reimport - it seems something isn't cleared/freed from cache somewhere apart from the script being impossible to remove?

Thank you for help, my dumb brain can't figure this out.

Tested in: 4.1 RC1, 4.0.3

In case someone stumbles upon this, as a workaround you can remove the script directly from the file, in this test it would be cube.glb.import, find the import_script/path and leave there an empty string so it's like this: import_script/path=""

Steps to reproduce

  1. Double click the cube.glb and hit reimport
  2. Message in Output saying it's working should show.
  3. Double cick the cube.glb and try to clear the import script
  4. Hit reimport
  5. Message is there again
  6. Double click cube.glb
  7. Observe it was not cleared
  8. Reimport again
  9. You should be seeing a popup for a bit with the issues mentioned above.
  10. Repeat the steps above multiple times to get more errors

Minimal reproduction project

TestImportScriptGD.zip

tralph3 commented 1 year ago

I'm facing the same issue. Even tho I clear the import script entry, it doesn't get set to "nothing", and upon reimporting and reopening the advanced import menu, it's still set, and the changes are still taking effect.

A button to reset the entry like in the inspector would be much appreciated.

Myi4 commented 1 year ago

I think i found out how to remove the import Script (at least using the minimal reproduction project you provided & in Godot 4.1). It seems you can't remove the import script in the advanced import menu but you can remove it if you select the file and remove the import script in the "normal" import menu.