-
-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Describe the project you are working on
Godot
Describe the problem or limitation you are having in your project
Godot users, in one way or another, want to reference subresources from scenes. The most common example of this is being able to reference meshes or materials from imported scenes (GLTF or FBX) directly, like they do in other engines such as Unity. But there are also other cases, such as slicing a texture manually and accessing its sub-atlas textures.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
While this is possible to some degree, it is not to others. Not every resource type makes the built-in subresources easily accessible, as example:
- Binary resources (including imported scenes such as FBX or gltf) have easily accessible subresources.
- Text resources (such as tscn, scripts, etc) are very inefficient for subresource access because the whole file needs to be parsed until the subresource is found.
So, ultimately, this feature would work in some file formats but not others. Or, alternatively, it will work in all file formats but with a warning when you open an inefficient one (like .tscn) that accessing these subresources is very inefficient, hence discouraged (which one should it be?).
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
There is an implementation for this feature here, so as you can see It's not too complicated to add. What would be missing is extending the filesystem access for this.
This work would consist of:
- EditorFileSystem, which caches the filesystem state, needs to keep a cache of subresources in each file, or at least store that the file has subresources.
- FileSystemDock, EditorFileSystemDialog and QuickOpen need to provide a way to explore the sub-resources.
- The Editor previewer needs to be able to create thumbnails for subresources.
For FileSystemDock we can add this icon:
Or, if in this mode:
This would change the filesystem dock to a sub-resource explorer:
(yes its the same thing, use your imagination as if these were meshes and materials):

This way of exploring sub-resources can be a reusable control that can be used in EditorFileSystemDialog and QuickOpen (replacing the current list by this control). The sub-resources control would just show the icons of the sub resources (that you can turn into a list if you want) and that lets you search.
This way, the other dialogs can have this too:
FAQ
Q: Why a subresource button and not directly show them as part of the filesystem?
A: I think this is really hard to do on many levels. First, It's something that is both a file and a folder, so it does not fit the traditional folder structure. Additionally, these files can have thousands of subresources, so it may not be a great idea to make them part of the regular filesystem transparently. Finally, I think usability wise, it is better they are considered an exceptional case for simplicity.
If this enhancement will not be used often, can it be worked around with a few lines of script?
N/A
Is there a reason why this should be core and not an add-on in the asset library?
N/A
Metadata
Metadata
Assignees
Labels
Type
Projects
Status



