Closed willnationsdev closed 6 years ago
@Noshyaar Is this the kind of thing you were talking about with the "Edit Dependencies" window?
Hmm. I meant that some functionality of this dock is already in the editor in form of "Edit Dependencies" dialog. I may have misunderstood the point of the dock. I see them as a (better than currently available) way to see and manage dependencies/inheritance while it might be better for navigating between files of the same parent.
Well, the other big reason for it was the desire to extend scripts that are custom types and quickly add them to a node. Right now, the work of removing the script, extending the addon's custom type script, and then adding that script onto a node is just too much work to make a reliance on deriving from custom types viable. The new workflow can reduce that task to a two button process (extend script, attach script).
Given that...
The Editor already supports forward and backward identification of references (Edit Dependencies and View Owners from the FileSystem dock)...
In most cases, you only want to view one or the other for a SINGLE resource, not see a listing of everything's deps/owners at the same time...
Creating a tab dedicated to lists would put an even larger strain on the loading of resources...
...there just isn't enough of an incentive to build an additional tab for this.
It would be convenient to be able to see a list of every scene in your project along with a flat sub-list of the various resources that scene references (not just scenes, scripts, & resources, but textures, audio files, etc. too!).
The way this could be done is by cycling through each scene, creating a
TreeItem
for each of them, and then creating ANOTHERTreeItem
for every ExtResource that is defined in the scene file.It would be especially nice if one could click on a button within the TreeItem entry to flip from the scene in the Dependencies tab to the scene in the Scenes tab and vice versa.
However, people would actually want to be able to do this backwards as well. I would want to be able to select a .png file and find a listing of every scene that uses it.
In order to do this, we would actually have to locate EVERY single file in the res folder (not filtering based on a file extension) and then try to load it. If we CAN load it, i.e. it must be a resource of some kind that Godot recognizes, then we can search for it in the previously gathered list of scene ExtResources. Every time you find an entry, you add a sub-TreeItem. We'd then have to make the scenes, scripts, and resources implement the button that lets you flip-flop between the appropriate tab (would be REALLY sweet to do this).
Additionally, you'd have to implement functionality that makes it so that you only see the sub-items of the currently selected first-child. So if I click on another resource/scene's TreeItem, the current one auto-collapses and the new one auto-expands.