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)importing Assets breaks apart on GLB/GLTF materials at clean project import because of an CSV file #83200

Closed
wp2000x opened this issue Oct 12, 2023 · 6 comments · Fixed by #92320

Comments

@wp2000x
Copy link

wp2000x commented Oct 12, 2023

Godot version

4.1.2-stable

System information

Windows 11

Issue description

The auto (Re)Importing of assets breaks apart, when a CSV file is re-imported in a project?

I noticed that, when a clean git checkout of an project is made (without the .godot folder), the auto (re)import breaks apart at GLB/GLTF textures/materials. After some time i could narrow down the suspect to an CSV file in my project and the corresponding autogenerated .csv.import file. When the .csv.import file does not exist in the repo/project it gets successfuly imported, the file gets created and everything is fine. The problem starts when it gets commited and someone else checks it out and tries to rebuild the .godot folder.

This will result in following error (MRP example red texture cube model):
WARNING: glTF: Image index '0' couldn't be loaded with the name: Image_0. Skipping it.
Screenshot of it:
2023-10-12_17-33-58

The material is broken (at this state, only a manual reimport by hand can fix this):
2023-10-12_17-45-12
And here how the model looks when the csv files does not exist:
2023-10-12_17-45-44

Steps to reproduce

  • Run both MRP projects
  • MeshImportBug_OK should run fine and show a red textured cube at the dummy scene and the MeshImportBug_Broken one not.

Minimal reproduction project

MeshImportBug_OK.zip
MeshImportBug_Broken.zip

@fire
Copy link
Member

fire commented Oct 12, 2023

I have no idea. Maybe there is a text comparison that treats .gltf.import and .gltf.csv.import the same

@bitsawer
Copy link
Member

bitsawer commented Oct 13, 2023

Can confirm, tested on current master (37ee293). The broken project starts working after deleting the .csv file, its generated .translation + .import files and the .godot folder and letting Godot reimport everything.

Hard to say what exactly goes wrong, but it does seem that the .csv file does cause some import issues. Might be worth checking out if the ResourceImporterCSVTranslation does something weird or if this is a regression.

@mstarongithub
Copy link

Can confirm CSV imports to be at least weird, but in at least one case broken on v4.2.stable.official [46dc277] (copied from about window).

Creating an empty project and adding a new csv with the content of

foo
bar
this
fails
imports

will have the import of that csv fail with the error editor/import/resource_importer_csv_translation.cpp:95 - Condition "line.size() <= 1" is true. Returning: ERR_PARSE_ERROR

Extending the example csv file with an additional value per line "fixes" it. It shows up as a translation file, but trying to open it results in the error

- Failed loading resource: res://example.csv. Make sure resources have been imported by opening the project in the editor at least once.
- editor/editor_node.cpp:1225 - Condition "!res.is_valid()" is true. Returning: ERR_CANT_OPEN

The extended csv file may look like this

foo,bar
bar,adfsg
this,keysmash
fails,still
imports,fails

@RPicster
Copy link
Contributor

I can also confirm this bug - in our case it's a working csv without problems and it it really a big impediment in our team.

@fire
Copy link
Member

fire commented Apr 16, 2024

I'm having trouble thinking of a workaround for this. Any suggestions?

@Oplexitie
Copy link

Can confirm this is an issue with Godot 4.2.2 and Godot 4.3 dev 6.

Pretty problematic if you plan to share your project with other people.
I had to work around it by adding the .csv.import file into my .gitignore on Github.

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

Successfully merging a pull request may close this issue.

7 participants