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 a list of scene internals #4567

Closed
KoBeWi opened this issue May 20, 2022 · 9 comments · Fixed by godotengine/godot#75661
Closed

Add a list of scene internals #4567

KoBeWi opened this issue May 20, 2022 · 9 comments · Fixed by godotengine/godot#75661
Milestone

Comments

@KoBeWi
Copy link
Member

KoBeWi commented May 20, 2022

Describe the project you are working on

A project where I have some huge scenes with lots of internal scripts.

Describe the problem or limitation you are having in your project

I prefer workflow where I don't have milion files all over the place, so I use internal (build-in) resources anytime I can, including most scripts. But I have a few particularly big UI scenes (map editor, title screen etc) that have multiple internal scripts. Like this for example (this is just a small part of the scene):
image
I don't want to split it into mutliple scenes, because you can't easily edit a subscene - you need to go inside that scene, which means you lose the editing context (and some scenes have proper layout only when placed as a part of another scene, because they might be in a container etc.)

My only problem is that built-in scripts can only be opened by clicking the script icon next to the node name. So if you have a big scene, you can't easily jump to a script, the best you can do is to search for a node and then click the script icon. I'd like to be able to open the script directly.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

It would be nice to have a way to list all built-in resources in a scene. E.g. have a Tree with Resources categorized by type:
image
When a resource is named, display its name. When unnamed, display its id prefixed with ::. The resources from the list could be double-clicked to edit them.

As a bonus, maybe nodes with unique names could be listed too?

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

The resource list could be a popup. It would need to track sub-resources of the scene. It's probably easy when loading the scene, not sure how to handle changes.

A good place for this popup would be here:
image
It would either be integrated in the menu or be an option that opens a popup.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Not really. Finding all resources in a scene would require quite a bit of code.

Is there a reason why this should be core and not an add-on in the asset library?

It improves editor usability for big scenes.

@h0lley
Copy link

h0lley commented May 21, 2022

this reminds me of #1274 where @dalexeev posted this concept:

image

so their idea was to integrate the sub-resource list into the FileSystem panel, where scenes would show like folders containing the sub-resources. I don't have a super strong opinion on it but I think I'd prefer this over the popup idea. Discoverability for new users would be great and listing sub-resources this way seems very intuitive to me.

in addition, @dalexeev's idea included the possibility of moving resources in and out of the scene via drag and drop, effectively providing a more intuitive interface to the "Make unique" / "Save" context menu options. Btw dalexeev, did you ever post that as a separate proposal?

oh and I have a very similar siutation:

image

@dalexeev
Copy link
Member

Btw dalexeev, did you ever post that as a separate proposal?

No, I didn't post this because it seems to me that it requires significant changes to the system of subresources and dependencies. Maybe I'm wrong.

@YuriSizov
Copy link
Contributor

A good place for this popup would be here:
image
It would either be integrated in the menu or be an option that opens a popup.

We already have a list of resources and sub-resources for the selected node, it's located in the inspector. We can probably add a button next to it to open a bigger popup that would show a list of resources for the entire scene.

@reduz
Copy link
Member

reduz commented Jun 15, 2022

I added #4672 which sort of solves the more fundamental problem of confusion with shared internal subresources. That said, I think even if you want them intentionally its super difficult to see where they are used in a Godot scene.

I was thinking that a popup that shows everything (tree, resources and subresources, and with number of shares) and when you click then it highlights the shared ones, may be quite useful to avoid getting lost.

@YuriSizov
Copy link
Contributor

YuriSizov commented Jun 15, 2022

Crazy stupid idea: what if subresources were displayed directly in the scene dock, but visually highlighted differently? Kind of like we do with subinspectors in the inspector? So you can expand the node in a specific way to show its subresources, and if subresources have their own subresources, then their hierarchy is displayed as a tree?

@KoBeWi
Copy link
Member Author

KoBeWi commented Jun 15, 2022

Ooh that could work. Although it might make scene tree even slower.

@h0lley
Copy link

h0lley commented Jun 15, 2022

If I understood reduz correctly he attempted this in the past:

I think a popup to see this could be useful (I originally tried this in the scene tree but its very messy so I removed it.

not clear how big of an issue the "very messy" is though. perhaps it's solvable.

I'd very much like the idea - it's pretty much what I commented earlier (dalexeev's concept) but applied to the scene panel.

there is a bit more complexity though, as unlike with nesting sub-resources in the file system panel, in the scene panel they can have multiple owners (perhaps users is a better word when relating to nodes). a tree view of items with multiple owners might be confusing. would selecting a resource in the scene panel automatically select references of that resource listed under other nodes?

@dalexeev looking at the number of thumbs up your concept garnered in this thread alone, I think we should post it as a separate proposal after all. would you go for it?

@dalexeev
Copy link
Member

@dalexeev looking at the number of thumbs up your concept garnered in this thread alone, I think we should post it as a separate proposal after all. would you go for it?

Okay, I'll try to turn those ideas into a proposal over the next few days.

@Iniquitatis
Copy link

Crazy stupid idea: what if subresources were displayed directly in the scene dock, but visually highlighted differently?

Sorry for bumping, but there's nothing crazy about the idea: Blender (again) does exactly this, so it could be used as a reference.

@akien-mga akien-mga added this to the 4.1 milestone Apr 5, 2023
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.

7 participants