Merge pull request #82682 from dsnopek/gdextension-dont-deprecate-script-category
GDExtension: Don't deprecate old method of getting script category
This commit is contained in:
commit
dbd4c79c38
|
@ -510,7 +510,7 @@ typedef struct {
|
||||||
GDExtensionScriptInstanceGet get_func;
|
GDExtensionScriptInstanceGet get_func;
|
||||||
GDExtensionScriptInstanceGetPropertyList get_property_list_func;
|
GDExtensionScriptInstanceGetPropertyList get_property_list_func;
|
||||||
GDExtensionScriptInstanceFreePropertyList free_property_list_func;
|
GDExtensionScriptInstanceFreePropertyList free_property_list_func;
|
||||||
GDExtensionScriptInstanceGetClassCategory get_class_category_func;
|
GDExtensionScriptInstanceGetClassCategory get_class_category_func; // Optional. Set to NULL for the default behavior.
|
||||||
|
|
||||||
GDExtensionScriptInstancePropertyCanRevert property_can_revert_func;
|
GDExtensionScriptInstancePropertyCanRevert property_can_revert_func;
|
||||||
GDExtensionScriptInstancePropertyGetRevert property_get_revert_func;
|
GDExtensionScriptInstancePropertyGetRevert property_get_revert_func;
|
||||||
|
|
|
@ -676,13 +676,11 @@ public:
|
||||||
if (native_info->get_class_category_func(instance, &gdext_class_category)) {
|
if (native_info->get_class_category_func(instance, &gdext_class_category)) {
|
||||||
p_list->push_back(PropertyInfo(gdext_class_category));
|
p_list->push_back(PropertyInfo(gdext_class_category));
|
||||||
}
|
}
|
||||||
#ifndef DISABLE_DEPRECATED
|
|
||||||
} else {
|
} else {
|
||||||
Ref<Script> script = get_script();
|
Ref<Script> script = get_script();
|
||||||
if (script.is_valid()) {
|
if (script.is_valid()) {
|
||||||
p_list->push_back(script->get_class_category());
|
p_list->push_back(script->get_class_category());
|
||||||
}
|
}
|
||||||
#endif // DISABLE_DEPRECATED
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // TOOLS_ENABLED
|
#endif // TOOLS_ENABLED
|
||||||
|
|
Loading…
Reference in New Issue