Skip to content

Commit

Permalink
Add support for dragging a shader to user exported material property
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjtxietian committed Jul 26, 2024
1 parent e343dbb commit fb5d4cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/editor_resource_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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("Texture2D", base)) {
allowed_types_with_convert.insert("Image");
}
}
Expand Down

0 comments on commit fb5d4cd

Please sign in to comment.