godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91k stars 21.17k forks source link

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

Open Zylann opened 5 years ago

Zylann commented 5 years ago

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 commented 5 years ago

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

Zylann commented 5 years ago

@JFonS my mistake indeed

Phischermen commented 4 years ago

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).