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

"CSV" import preset (for CSV files) doesn't work as default preset #33979

Closed
burstina opened this issue Nov 28, 2019 · 7 comments
Closed

"CSV" import preset (for CSV files) doesn't work as default preset #33979

burstina opened this issue Nov 28, 2019 · 7 comments

Comments

@burstina
Copy link

Godot version:
3.2 beta2

OS/device including version:
W10

Issue description:
Setting CSV default import preset to "CSV" (instead of "CSV Translation") allow editor to import as "CSV" the selected file only

Steps to reproduce:
Create a blank project
create 4 CSV file, names file1.csv, file2.csv, file3.csv, file4.csv in project folder
go back to editor to allow autoimport: 4 errors are reported, one for each csv file, that's normal
immagine

select file1.csv,
click "import" tab
in "import" dropdown box you see "CSV translation": choose "CSV"
click "preset" button next ro the import dropdown box
select "set as default for CSV"
immagine

click "Reimport" button at the bottom
click "Save scene, reimport and restart"
Now 3 import errors are reported: yes, they were 4 before, but I'm expecting no import errors.
CSVtest.zip
immagine
immagine

I'm expecting this:
immagine

Minimal reproduction project:

CSVtest.zip

@burstina burstina changed the title CSV import preset doesn't work as default preset "CSV" import preset (for CSV files) doesn't work as default preset Nov 28, 2019
@akien-mga
Copy link
Member

The option to set a default preset applies to new imports, not already imported resources. So you need to reimport those (you can multi-select and click "Import"), or delete them .import file to let them be reimported with the new default preset.

@burstina
Copy link
Author

burstina commented Nov 28, 2019

I did it.
Same result.
To be sure, I deleted ".import" folder and all ".import" files in the directory and subs, but no luck.

@burstina
Copy link
Author

burstina commented Nov 28, 2019

I also created a "file5.csv" to check if new files are imported as expected, but editor tries for translation file and report error.
immagine

@akien-mga
Copy link
Member

Ah yes, "Save as Default for "Import Type"" doesn't change the default for the file, but the default settings when using this import type. For example if you use "CSV Translation" and change the delimter option to "Semicolon", you can set this as default for all future imports of "CSV Translation".

As it is now I don't think there's a way to define what kind of import type should be used as default for a given file extension.

@burstina
Copy link
Author

burstina commented Nov 28, 2019

Ah, now I understand.

As it is now I don't think there's a way to define what kind of import type should be used as default for a given file extension.

Ouch, sad story.

I guess any other file has no issue like that due to direct extension's nature (jpg=image, ogg=sound,TXT=text, ecc); CSV is different, it can store virtually anything.
For example, in project A I use CSV files to store data for each game level, in project B I used CSV to store item data list.
Moreover the ability to use Excel to edit CSV make it a really easy file.

@akien-mga
Copy link
Member

I'll close this as "fixed" since the plain "CSV" importer is removed with #47301, and the proper way to achieve what was likely intended is now to use the "Keep" import option (see #47268), to prevent .csv files from being imported.

This doesn't address the more general issue about not being able to define what should be the default, but that should likely be re-opened as a formal proposal in https://github.com/godotengine/godot-proposals to match the current UX. Notably, there is now a Project Settings tab to set Importer Defaults: #46354. This could be expended to allow setting which importer to use by default for a given extension (including the new "Keep").

@akien-mga akien-mga added this to the 4.0 milestone Mar 24, 2021
@akien-mga
Copy link
Member

This doesn't address the more general issue about not being able to define what should be the default, but that should likely be re-opened as a formal proposal in https://github.com/godotengine/godot-proposals to match the current UX. Notably, there is now a Project Settings tab to set Importer Defaults: #46354. This could be expended to allow setting which importer to use by default for a given extension (including the new "Keep").

I opened a proposal for this: godotengine/godot-proposals#2500

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

No branches or pull requests

3 participants