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

Custom resource type appears in every resource dropdown, even if the class would mismatch #24643

Closed
Zylann opened this issue Dec 28, 2018 · 4 comments

Comments

@Zylann
Copy link
Contributor

Zylann commented Dec 28, 2018

Godot 3.1 alpha4
Windows 7 64 bits

I defined a custom resource type named HTerrainData, which is registered this way:

const HTerrainData = preload("../hterrain_data.gd")
[...]
add_custom_type("HTerrainData", "Resource", HTerrainData, get_icon("heightmap_data"))

However, I noticed that my resource type now shows up everywhere, sometimes multiple times, even in places where it has nothing to do:
image

Even for textures:
image

Reproduction steps:
Create an editor plugin that registers a custom resource type.

@JFonS
Copy link
Contributor

JFonS commented Dec 28, 2018

Comment on note: I's fine to have ShaderMaterial in the process material slot, that's expected.

@Zylann
Copy link
Contributor Author

Zylann commented Dec 28, 2018

@JFonS my mistake indeed

@Zylann Zylann changed the title Custom resource type appears everywhere, even in places where unrelated subclasses are shown Custom resource type appears in every resource dropdown, even if the class would mismatch Dec 28, 2018
@Phischermen
Copy link
Contributor

Phischermen commented May 28, 2020

I've been working on a pull request (#34828) to solve this. It works on the 3.2 branch, and I can't really test on the 4.0 branch due to some other issue regarding custom resources (#39136).

@KoBeWi
Copy link
Member

KoBeWi commented Nov 11, 2024

Looks like custom types don't appear in resource lists at all now. They are only listed in New Resource menu in FileSystem Dock, but only if the base type is Resource.

Technically the original issue is fixed, so closing. Custom types are supposed to have been deprecated by now. class_name custom type will work correctly.

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

5 participants