Partially revert 96780, remove warnings from project/editor settings _get.

This commit is contained in:
bruvzg 2024-10-04 19:09:53 +03:00
parent 3576e840c7
commit 794920b1ff
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
4 changed files with 54 additions and 62 deletions

View file

@ -348,7 +348,6 @@ bool ProjectSettings::_get(const StringName &p_name, Variant &r_ret) const {
_THREAD_SAFE_METHOD_ _THREAD_SAFE_METHOD_
if (!props.has(p_name)) { if (!props.has(p_name)) {
WARN_PRINT("Property not found: " + String(p_name));
return false; return false;
} }
r_ret = props[p_name].variant; r_ret = props[p_name].variant;

View file

@ -845,7 +845,6 @@ Error ResourceLoaderBinary::load() {
} }
} }
if (ClassDB::has_property(res->get_class_name(), name)) {
if (value.get_type() == Variant::ARRAY) { if (value.get_type() == Variant::ARRAY) {
Array set_array = value; Array set_array = value;
bool is_get_valid = false; bool is_get_valid = false;
@ -870,7 +869,6 @@ Error ResourceLoaderBinary::load() {
} }
} }
} }
}
if (set_valid) { if (set_valid) {
res->set(name, value); res->set(name, value);

View file

@ -221,7 +221,6 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
const VariantContainer *v = props.getptr(p_name); const VariantContainer *v = props.getptr(p_name);
if (!v) { if (!v) {
WARN_PRINT("EditorSettings::_get - Property not found: " + String(p_name));
return false; return false;
} }
r_ret = v->variant; r_ret = v->variant;

View file

@ -612,7 +612,6 @@ Error ResourceLoaderText::load() {
} }
} }
if (ClassDB::has_property(res->get_class_name(), assign)) {
if (value.get_type() == Variant::ARRAY) { if (value.get_type() == Variant::ARRAY) {
Array set_array = value; Array set_array = value;
bool is_get_valid = false; bool is_get_valid = false;
@ -637,7 +636,6 @@ Error ResourceLoaderText::load() {
} }
} }
} }
}
if (set_valid) { if (set_valid) {
res->set(assign, value); res->set(assign, value);
@ -754,7 +752,6 @@ Error ResourceLoaderText::load() {
} }
} }
if (ClassDB::has_property(resource->get_class_name(), assign)) {
if (value.get_type() == Variant::ARRAY) { if (value.get_type() == Variant::ARRAY) {
Array set_array = value; Array set_array = value;
bool is_get_valid = false; bool is_get_valid = false;
@ -779,7 +776,6 @@ Error ResourceLoaderText::load() {
} }
} }
} }
}
if (set_valid) { if (set_valid) {
resource->set(assign, value); resource->set(assign, value);