Merge pull request #82093 from jsjtxietian/add-support-for-drag-a-shader-to-material

Add support for dragging a shader to user exported material property
This commit is contained in:
Rémi Verschelde 2024-08-20 10:01:19 +02:00
commit 7f8b4364e8
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 2 deletions

View File

@ -618,9 +618,9 @@ void EditorResourcePicker::_ensure_allowed_types() const {
const String base = allowed_types[i].strip_edges();
if (base == "BaseMaterial3D") {
allowed_types_with_convert.insert("Texture2D");
} else if (base == "ShaderMaterial") {
} else if (ClassDB::is_parent_class("ShaderMaterial", base)) {
allowed_types_with_convert.insert("Shader");
} else if (base == "Texture2D") {
} else if (ClassDB::is_parent_class("ImageTexture", base)) {
allowed_types_with_convert.insert("Image");
}
}