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
Don't store the .import file when using the default settings #24177
Comments
+1 also, another question is why does .import exist in the first place, of which it duplicates my files? this wasn't there in previous godot versions. for example, i have a background texture for my scene which is around 53kb. then, inside the .import folder, that file is in there again as a .stex, and is 53kb. it basically duplicated my .png file. |
Setting files for some resources like image files were always there (.flag I think?). Default settings without files could make more confusing without a default settings setup on project creation and defaults manager inside the editor (plus current defaults are not too good). |
I don't think there's much of a difference since it creates the files with defaults without asking anything already. The difference is just not creating the files with the defaults. Also this all can be improved, and maybe they should anyway regardless of this proposal (same goes for the current defaults).
This is not a big deal because it's only on the working directory. The imported assets can be ignored in the repository and the originals don't go to the exported version. In fact, this proposal does not get rid of the duplication, which is necessary to make Godot recognize the files (many resource types can change a lot in size after imported). |
imo it's a big deal because all the developer's files (textures, etc) are duplicated in the .import folder. this can drastically increase the project's file size. my example might be bad because it's just one 53kb file, which now the developer will need 106kb of space. i'm trying to say: imagine larger projects with tons of textures. i think the .import file that sits next to the file should be sufficient |
what about having |
It's not actually duplicating the files though. It's importing them into a format that can be used by the engine. So, without the import folder your machine would have to re-import these files each time you open the project and then store all of these assets in RAM. So, it's highly necessary to have an import folder. It really isn't that bad as far as space goes. Unity does the same thing. I have countless 3D projects that I've worked on for clients over the years and have plenty of drive space. :) |
A note about the space .import takes, I think it has been reported that files in it are not always cleaned up, so it often grows unnecessarily over time (though I can't seem to find an issue about it?). This in particular should be an improvement to work on as far as space is concerned, but otherwise I agree with @NathanWarden. About .import files cluttering the project... I just don't bother anymore. I'm used to it (and all points listed), working with Unity half of my time in a team project, there are such files even for scripts. We know what they are for, they aren't complicated (even readable) and in the end clutter is relative, because we don't work often directly with the raw filesystem for convenience and perhaps even scalability (editor's asset browser, IDE script explorer etc). How come they end up in exported projects though? I thought they were mostly useful for project edition cycle? |
But if you change the default import settings, what happens? All already imported resources are going to have a new .import file so that their import setrings stay the same ? Honestly the current system is a little bit more clutter but at least it is simple. |
They contain the path remap information, so the the engine knows that the PNG you're referring to is now a STEX in the
That's one of the problems. IMO though, if you are importing everything with default is because you want the defaults, even if they change.
This can be done. Right now the changed defaults are stored in I want to add that a major point is that it's not always immediately clear what the The current behavior is not as intuitive as one might think. |
I think that's a good enough reason to accept the change. |
I'm fine with not saving default import flags, but only if users are asked to select import presets for their resources when they create a new project, and this setting is saved (in |
For the last 2 points, perhaps existing files should never be deleted, but new files are not created unless the user changes anything. So then if you want to preserve the existing settings regardless of the defaults changing, you simply change a setting and then change it back. This would mean that existing projects would have the same files, but... Perhaps there could be a button in Godot that removes all default-only |
well, i don't know how else to word it then lol. i just see a 53kb .png background in my Textures folder. then, there is a file that has the same name of it, inside .import, that is 53kb. i just thought of the word duplicate, but even if it's not a 100% duplicate of the file, it basically does x * 2 on storage space. which imo is not needed. and this was not a problem in previous godot versions AFAIK |
@girng 53kb is too much for import flags, even 1kb is a lot |
@eon-s: He probably means .etc or .tex in .import folder, not .import file. |
@girng @Zireael07 In that case: #23368 |
Oh, files inside the import folder, right... Maybe the |
@aaronfranke: I was gonna link that issue but I couldn't find it. |
BTW I did a proof of concept of this proposal. Still don't solve all the issues. I save the Link to my changes: jahd2602/godot@3882e0d...98eb965 |
The .import file problem is manifested when there are a lot of assets and they are in different directories. This is a big game problem. |
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine. The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker. If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance! |
Godot version:
master
@ 99640acI know this has been dismissed before but I didn't find a proper issue about the topic, so I'm reviving the points about it. This is the result of a discussion I had with @jahd2602.
The problems
.import
files sitting besides the assets clutter the folders. Essentially we have double the amount of files in the project, making it harder to manage..import
file. Failing to do so make the.import
live there on its own, since there's no cleanup tool. While doing those operations with the FileSystem dock makes the.import
file go with it, it's not always feasible to use the Godot editor for this..import
files related to them.The solution
Don't store the
.import
file when the resource is imported with default settings.The problems with the solution
.import
, it's not clear whether it should be removed..import
file (though there could be UI for this).The text was updated successfully, but these errors were encountered: