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

Add an option to sort the editor's FileSystem dock by file type #1582

Closed
Arecher opened this issue Sep 29, 2020 · 1 comment · Fixed by godotengine/godot#42654
Closed

Add an option to sort the editor's FileSystem dock by file type #1582

Arecher opened this issue Sep 29, 2020 · 1 comment · Fixed by godotengine/godot#42654
Assignees
Milestone

Comments

@Arecher
Copy link

Arecher commented Sep 29, 2020

Describe the project you are working on:
I'm currently working on a project, in which we're making a world with a lot of different animals, plants, etc. We recently decided to reorganize our Godot project, and instead of having one folder for scenes, one folder for sprites, and one folder for audiofiles (each with a folder for each entity in the world), we merged them together. That way everything that belongs to a single object in the world can be found in one folder. That feels a lot more organized and more efficient to work with.
But that is when I ran into a small inconvenience/problem.

Describe the problem or limitation you are having in your project:
As soon as I added .wav files, .pngs and .tscn files in a single folder, they organized themselves based on alphabetical order (as they should) in the filesystem. However, since all these files belong to a single entity, their names are very similar. After all, bird.wav belongs to bird.tscn, with sprite bird0.png and bird1.png.

image

This makes the filesystem look quite unorganized and harder to read. I quickly went looking for a setting in the Editor settings to sort the filesystem by filetype, rather than by alphabetical order, but was surprised not to find such a feature.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Having a setting that can be changed to adjust the default sorting behaviour of Godot's Filesystem, would help a lot in this case. Sorting it in a way that has all the audiofiles next to each other makes it easier to implement them into a scene. And having all the scene files next to each other means you won't have to scour through a lot of other files to find them. All in all it would speed up the process of working in Godot (in this case, and similar cases).

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
In my mind there are two options to implement a setting to allow the editor
a) A editor-wide setting in the editor settings that changes the behaviour of the default sorting of the Filesystem. Most likely in Editor Settings > Docks > Filesystem.
image

A drop-down button with options such as 'Alphabetical' and 'By Filetype' would work.

b) A fancier way of implementing it would be to add a dropdown button at the top of the Filesystem, which can change the sorting method of the filesystem.

image

That would allow more ease of access, which would likely make the feature used more often. Switching between sorting methods on the fly could be useful whenever you're looking for files of a specific type in a folder that is a bit too crowded, while allowing you to switch back to Alphabetical for folders that are less so.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
Although adjustable sorting methods are practically a core feature in any filesystem, I was surprised to not find requests to add it to Godot, so I fear this isn't a priority for a lot of developers. And I would agree this is a lower priority request. Nothing is broken here, or NEEDS to be changed. But it would sure be useful to have, nonetheless.

And I would love to presume how much work adding this feature is, but I have no clue, so I'll leave that up to people smarter than me.

Is there a reason why this should be core and not an add-on in the asset library?:
This feature would be at the core of how an integral part of the engine works. I think it would most definitely be a core feature, and shouldn't be left as an add-on.

@Arecher Arecher changed the title Editor Setting to sort Editor Filesystem by filetype Option to sort Editor Filesystem by filetype Sep 29, 2020
@Calinou
Copy link
Member

Calinou commented Sep 29, 2020

I prefer the b) implementation, as its design makes it much faster to switch between sorting by name and type (no need to open the Editor Settings).

@groud groud self-assigned this Sep 29, 2020
@Calinou Calinou changed the title Option to sort Editor Filesystem by filetype Add an option to sort the editor's FileSystem dock by file type Sep 29, 2020
@akien-mga akien-mga added this to the 4.0 milestone Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants