Merge pull request #84446 from KoBeWi/EditorYOLOPicker

Don't check resource type assigned in property
This commit is contained in:
Rémi Verschelde 2024-04-26 15:13:06 +02:00
commit 8063ea9e32
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 5 additions and 1 deletions

View File

@ -3408,7 +3408,7 @@ void EditorPropertyResource::update_property() {
}
}
resource_picker->set_edited_resource(res);
resource_picker->set_edited_resource_no_check(res);
}
void EditorPropertyResource::collapse_all_folding() {

View File

@ -896,7 +896,10 @@ void EditorResourcePicker::set_edited_resource(Ref<Resource> p_resource) {
ERR_FAIL_MSG(vformat("Failed to set a resource of the type '%s' because this EditorResourcePicker only accepts '%s' and its derivatives.", class_str, base_type));
}
}
set_edited_resource_no_check(p_resource);
}
void EditorResourcePicker::set_edited_resource_no_check(Ref<Resource> p_resource) {
edited_resource = p_resource;
_update_resource();
}

View File

@ -127,6 +127,7 @@ public:
Vector<String> get_allowed_types() const;
void set_edited_resource(Ref<Resource> p_resource);
void set_edited_resource_no_check(Ref<Resource> p_resource);
Ref<Resource> get_edited_resource();
void set_toggle_mode(bool p_enable);