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

More user-friendly resource selector in inspector #24319

Closed
Jummit opened this issue Dec 13, 2018 · 11 comments
Closed

More user-friendly resource selector in inspector #24319

Jummit opened this issue Dec 13, 2018 · 11 comments

Comments

@Jummit
Copy link
Contributor

Jummit commented Dec 13, 2018

If you create a new resource in the FileSystem tab it gives you a nice window where you can search for resources, look at their descriptions, select favorites and even have a list of recent ones. So why is it that if I want to create a resource from the inspector, I get this:
2018-12-13-111837_1366x768_scrot
The total height is three times the picture, btw.

Edit: I also noticed that custom resources don't show up in this list.

@Zireael07
Copy link
Contributor

I believe this has been reported already and btw the answer to the question seems to be: filesystem window was overhauled recently, this was not ;)

@Zylann
Copy link
Contributor

Zylann commented Dec 13, 2018

No, the reason would rather be: you exported a Resource variable. As such, it can be anything, so Godot shows you everything.
Usually the common use cases only has a few items, and in those cases showing a full resource search window would be counter-productive and hinder the Load option.
Not sure how to handle the same features in case the menu gets that big, though...

@bojidar-bg
Copy link
Contributor

What about showing only a "New <Base Type>..." option (which opens the Create Resource menu) when the amount of possible classes is larger than, say, 16?

@Zylann
Copy link
Contributor

Zylann commented Dec 13, 2018

@bojidar-bg if it does, the Create Resource menu should also open scoped to the hierarchy of compatible types.

@ghost
Copy link

ghost commented Dec 13, 2018

Usually when I export Resource, it's because I created a custom resource type that the editor otherwise wouldn't be able to understand. Once that problem goes away, I don't think I'll ever need to look at the giant list of resources again, even if this problem does get solved, as you would rather export what you actually want, MyResource or descendants thereof. #6763

@bojidar-bg's idea would be one step closer to that goal, in any case, as this would allow you to create a custom resource using class_name in-place, something which is currently not possible.

Another improvement would be to move Load and others from the bottom of the list to the top, that way you don't need to scroll through the whole list to reach those options.

Ultimately, however, getting the editor to understand class_name exports would be most ideal, as this would display only the relevant entries in the drop-down menu (which in most cases would be a brief list), and allow for type safety. I think the odds of having more than 16 entries for a single export type (assuming you can export it) is rare, so I think it's lower priority than the custom resource export issue.

@Zylann
Copy link
Contributor

Zylann commented Dec 13, 2018

@somnivore As a workaround, this is how I export my custom resource:

func _get_property_list():
	var props = [
		{
			# Must do this to export a custom resource type
			"name": "data",
			"type": TYPE_OBJECT,
			"usage": PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR,
			"hint": PROPERTY_HINT_RESOURCE_TYPE,
			"hint_string": "HTerrainData"
		},

@xDGameStudios
Copy link
Contributor

@somnivore As a workaround, this is how I export my custom resource:

func _get_property_list():
	var props = [
		{
			# Must do this to export a custom resource type
			"name": "data",
			"type": TYPE_OBJECT,
			"usage": PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR,
			"hint": PROPERTY_HINT_RESOURCE_TYPE,
			"hint_string": "HTerrainData"
		},

Does this work @Zylann ? I get an error:

captura de ecra 2019-02-02 as 06 44 29

how do you define the custom resource type?! btw.. do you have a workaround for arrays either? :)

@Zylann
Copy link
Contributor

Zylann commented Feb 2, 2019

@xDGameStudios The error doesn't say much, but did you return props? I didn't include it in the snippet for some reason

@Xrayez
Copy link
Contributor

Xrayez commented Sep 12, 2019

This is currently discussed in godotengine/godot-proposals#43.

@YuriSizov
Copy link
Contributor

While the enormous list of options is a separate issue, I think that at least a way to quickly select recent items for a particular resource type can be a big step in improving usability of the editor.

Right now things like theming are painful, because setting a new resource to a bunch of scenes requires you to rely on Load menu. The file dialog that opens always seems to bring you to the root directory of your project. From where you have to navigate to a folder, where you store the required resource. And then repeat this process for the next scene. Quick select for the last 3-5 used items is pretty basic functionality.

@akien-mga
Copy link
Member

Closing as superseded by godotengine/godot-proposals#43.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants