Merge pull request #90916 from Naros/expose-classdb-class-get-property-default-value
Expose `ClassDB::class_get_property_default_value` method
This commit is contained in:
commit
2980a6b295
3 changed files with 21 additions and 0 deletions
|
|
@ -1442,6 +1442,15 @@ Error ClassDB::class_set_property(Object *p_object, const StringName &p_property
|
|||
return OK;
|
||||
}
|
||||
|
||||
Variant ClassDB::class_get_property_default_value(const StringName &p_class, const StringName &p_property) const {
|
||||
bool valid;
|
||||
Variant ret = ::ClassDB::class_get_default_property_value(p_class, p_property, &valid);
|
||||
if (valid) {
|
||||
return ret;
|
||||
}
|
||||
return Variant();
|
||||
}
|
||||
|
||||
bool ClassDB::class_has_method(const StringName &p_class, const StringName &p_method, bool p_no_inheritance) const {
|
||||
return ::ClassDB::has_method(p_class, p_method, p_no_inheritance);
|
||||
}
|
||||
|
|
@ -1580,6 +1589,8 @@ void ClassDB::_bind_methods() {
|
|||
::ClassDB::bind_method(D_METHOD("class_get_property", "object", "property"), &ClassDB::class_get_property);
|
||||
::ClassDB::bind_method(D_METHOD("class_set_property", "object", "property", "value"), &ClassDB::class_set_property);
|
||||
|
||||
::ClassDB::bind_method(D_METHOD("class_get_property_default_value", "class", "property"), &ClassDB::class_get_property_default_value);
|
||||
|
||||
::ClassDB::bind_method(D_METHOD("class_has_method", "class", "method", "no_inheritance"), &ClassDB::class_has_method, DEFVAL(false));
|
||||
|
||||
::ClassDB::bind_method(D_METHOD("class_get_method_argument_count", "class", "method", "no_inheritance"), &ClassDB::class_get_method_argument_count, DEFVAL(false));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue