Browse Source

Merge pull request #71479 from raulsntos/virtual-return-type

Use enum instead of int in virtual methods return type
Rémi Verschelde 2 years ago
parent
commit
e8240031e7
41 changed files with 114 additions and 110 deletions
  1. 2 2
      core/io/resource_loader.cpp
  2. 1 1
      core/io/resource_loader.h
  3. 3 3
      core/io/resource_saver.cpp
  4. 1 1
      core/io/resource_saver.h
  5. 1 1
      doc/classes/EditorImportPlugin.xml
  6. 3 3
      doc/classes/EditorInspectorPlugin.xml
  7. 4 4
      doc/classes/MultiplayerAPIExtension.xml
  8. 1 1
      doc/classes/ResourceFormatLoader.xml
  9. 1 1
      doc/classes/ResourceFormatSaver.xml
  10. 3 3
      doc/classes/VisualShaderNodeCustom.xml
  11. 3 3
      doc/classes/XRInterfaceExtension.xml
  12. 1 1
      editor/editor_inspector.cpp
  13. 2 2
      editor/editor_inspector.h
  14. 2 2
      editor/editor_properties.cpp
  15. 2 2
      editor/editor_properties.h
  16. 2 4
      editor/import/editor_import_plugin.cpp
  17. 1 1
      editor/import/editor_import_plugin.h
  18. 1 1
      editor/import/resource_importer_scene.cpp
  19. 1 1
      editor/import/resource_importer_scene.h
  20. 1 1
      editor/plugins/control_editor_plugin.cpp
  21. 1 1
      editor/plugins/control_editor_plugin.h
  22. 3 3
      editor/plugins/font_config_plugin.cpp
  23. 3 3
      editor/plugins/font_config_plugin.h
  24. 1 1
      editor/plugins/root_motion_editor_plugin.cpp
  25. 1 1
      editor/plugins/root_motion_editor_plugin.h
  26. 1 1
      editor/plugins/texture_region_editor_plugin.cpp
  27. 1 1
      editor/plugins/texture_region_editor_plugin.h
  28. 1 1
      editor/plugins/tiles/tile_set_atlas_source_editor.cpp
  29. 1 1
      editor/plugins/tiles/tile_set_atlas_source_editor.h
  30. 1 1
      editor/plugins/visual_shader_editor_plugin.cpp
  31. 1 1
      editor/plugins/visual_shader_editor_plugin.h
  32. 8 8
      modules/gltf/doc_classes/GLTFDocumentExtension.xml
  33. 16 16
      modules/gltf/extensions/gltf_document_extension.cpp
  34. 8 8
      modules/gltf/extensions/gltf_document_extension.h
  35. 8 8
      scene/main/multiplayer_api.cpp
  36. 4 4
      scene/main/multiplayer_api.h
  37. 1 1
      scene/main/multiplayer_peer.cpp
  38. 8 2
      scene/resources/visual_shader.cpp
  39. 3 3
      scene/resources/visual_shader.h
  40. 4 4
      servers/xr/xr_interface_extension.cpp
  41. 3 3
      servers/xr/xr_interface_extension.h

+ 2 - 2
core/io/resource_loader.cpp

@@ -176,9 +176,9 @@ Error ResourceFormatLoader::rename_dependencies(const String &p_path, const Hash
 		deps_dict[E.key] = E.value;
 	}
 
-	int64_t err = OK;
+	Error err = OK;
 	GDVIRTUAL_CALL(_rename_dependencies, p_path, deps_dict, err);
-	return (Error)err;
+	return err;
 }
 
 void ResourceFormatLoader::_bind_methods() {

+ 1 - 1
core/io/resource_loader.h

@@ -58,7 +58,7 @@ protected:
 	GDVIRTUAL1RC(ResourceUID::ID, _get_resource_uid, String)
 	GDVIRTUAL2RC(Vector<String>, _get_dependencies, String, bool)
 	GDVIRTUAL1RC(Vector<String>, _get_classes_used, String)
-	GDVIRTUAL2RC(int64_t, _rename_dependencies, String, Dictionary)
+	GDVIRTUAL2RC(Error, _rename_dependencies, String, Dictionary)
 	GDVIRTUAL1RC(bool, _exists, String)
 
 	GDVIRTUAL4RC(Variant, _load, String, String, bool, int)

+ 3 - 3
core/io/resource_saver.cpp

@@ -42,9 +42,9 @@ ResourceSavedCallback ResourceSaver::save_callback = nullptr;
 ResourceSaverGetResourceIDForPath ResourceSaver::save_get_id_for_path = nullptr;
 
 Error ResourceFormatSaver::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
-	int64_t res = ERR_METHOD_NOT_FOUND;
-	GDVIRTUAL_CALL(_save, p_resource, p_path, p_flags, res);
-	return (Error)res;
+	Error err = ERR_METHOD_NOT_FOUND;
+	GDVIRTUAL_CALL(_save, p_resource, p_path, p_flags, err);
+	return err;
 }
 
 Error ResourceFormatSaver::set_uid(const String &p_path, ResourceUID::ID p_uid) {

+ 1 - 1
core/io/resource_saver.h

@@ -41,7 +41,7 @@ class ResourceFormatSaver : public RefCounted {
 protected:
 	static void _bind_methods();
 
-	GDVIRTUAL3R(int64_t, _save, Ref<Resource>, String, uint32_t)
+	GDVIRTUAL3R(Error, _save, Ref<Resource>, String, uint32_t)
 	GDVIRTUAL2R(Error, _set_uid, String, ResourceUID::ID)
 	GDVIRTUAL1RC(bool, _recognize, Ref<Resource>)
 	GDVIRTUAL1RC(Vector<String>, _get_recognized_extensions, Ref<Resource>)

+ 1 - 1
doc/classes/EditorImportPlugin.xml

@@ -216,7 +216,7 @@
 			</description>
 		</method>
 		<method name="_import" qualifiers="virtual const">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="source_file" type="String" />
 			<param index="1" name="save_path" type="String" />
 			<param index="2" name="options" type="Dictionary" />

+ 3 - 3
doc/classes/EditorInspectorPlugin.xml

@@ -56,11 +56,11 @@
 		<method name="_parse_property" qualifiers="virtual">
 			<return type="bool" />
 			<param index="0" name="object" type="Object" />
-			<param index="1" name="type" type="int" />
+			<param index="1" name="type" type="int" enum="Variant.Type" />
 			<param index="2" name="name" type="String" />
-			<param index="3" name="hint_type" type="int" />
+			<param index="3" name="hint_type" type="int" enum="PropertyHint" />
 			<param index="4" name="hint_string" type="String" />
-			<param index="5" name="usage_flags" type="int" />
+			<param index="5" name="usage_flags" type="int" enum="PropertyUsageFlags" />
 			<param index="6" name="wide" type="bool" />
 			<description>
 				Called to allow adding property-specific editors to the property list for [param object]. The added editor control must extend [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.

+ 4 - 4
doc/classes/MultiplayerAPIExtension.xml

@@ -99,7 +99,7 @@
 			</description>
 		</method>
 		<method name="_object_configuration_add" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="object" type="Object" />
 			<param index="1" name="configuration" type="Variant" />
 			<description>
@@ -107,7 +107,7 @@
 			</description>
 		</method>
 		<method name="_object_configuration_remove" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="object" type="Object" />
 			<param index="1" name="configuration" type="Variant" />
 			<description>
@@ -115,13 +115,13 @@
 			</description>
 		</method>
 		<method name="_poll" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<description>
 				Callback for [method MultiplayerAPI.poll].
 			</description>
 		</method>
 		<method name="_rpc" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="peer" type="int" />
 			<param index="1" name="object" type="Object" />
 			<param index="2" name="method" type="StringName" />

+ 1 - 1
doc/classes/ResourceFormatLoader.xml

@@ -88,7 +88,7 @@
 			</description>
 		</method>
 		<method name="_rename_dependencies" qualifiers="virtual const">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="path" type="String" />
 			<param index="1" name="renames" type="Dictionary" />
 			<description>

+ 1 - 1
doc/classes/ResourceFormatSaver.xml

@@ -34,7 +34,7 @@
 			</description>
 		</method>
 		<method name="_save" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="resource" type="Resource" />
 			<param index="1" name="path" type="String" />
 			<param index="2" name="flags" type="int" />

+ 3 - 3
doc/classes/VisualShaderNodeCustom.xml

@@ -81,7 +81,7 @@
 			</description>
 		</method>
 		<method name="_get_input_port_type" qualifiers="virtual const">
-			<return type="int" />
+			<return type="int" enum="VisualShaderNode.PortType" />
 			<param index="0" name="port" type="int" />
 			<description>
 				Override this method to define the returned type of each input port of the associated custom node (see [enum VisualShaderNode.PortType] for possible types).
@@ -111,7 +111,7 @@
 			</description>
 		</method>
 		<method name="_get_output_port_type" qualifiers="virtual const">
-			<return type="int" />
+			<return type="int" enum="VisualShaderNode.PortType" />
 			<param index="0" name="port" type="int" />
 			<description>
 				Override this method to define the returned type of each output port of the associated custom node (see [enum VisualShaderNode.PortType] for possible types).
@@ -119,7 +119,7 @@
 			</description>
 		</method>
 		<method name="_get_return_icon_type" qualifiers="virtual const">
-			<return type="int" />
+			<return type="int" enum="VisualShaderNode.PortType" />
 			<description>
 				Override this method to define the return icon of the associated custom node in the Visual Shader Editor's members dialog.
 				Defining this method is [b]optional[/b]. If not overridden, no return icon is shown.

+ 3 - 3
doc/classes/XRInterfaceExtension.xml

@@ -64,7 +64,7 @@
 			</description>
 		</method>
 		<method name="_get_play_area_mode" qualifiers="virtual const">
-			<return type="int" />
+			<return type="int" enum="XRInterface.PlayAreaMode" />
 			<description>
 				Returns the [enum XRInterface.PlayAreaMode] that sets up our play area.
 			</description>
@@ -99,7 +99,7 @@
 			</description>
 		</method>
 		<method name="_get_tracking_status" qualifiers="virtual const">
-			<return type="int" />
+			<return type="int" enum="XRInterface.TrackingStatus" />
 			<description>
 				Returns a [enum XRInterface.TrackingStatus] specifying the current status of our tracking.
 			</description>
@@ -177,7 +177,7 @@
 		</method>
 		<method name="_set_play_area_mode" qualifiers="virtual const">
 			<return type="bool" />
-			<param index="0" name="mode" type="int" />
+			<param index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
 			<description>
 				Set the play area mode for this interface.
 			</description>

+ 1 - 1
editor/editor_inspector.cpp

@@ -1084,7 +1084,7 @@ void EditorInspectorPlugin::parse_group(Object *p_object, const String &p_group)
 	GDVIRTUAL_CALL(_parse_group, p_object, p_group);
 }
 
-bool EditorInspectorPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	bool ret = false;
 	GDVIRTUAL_CALL(_parse_property, p_object, p_type, p_path, p_hint, p_hint_text, p_usage, p_wide, ret);
 	return ret;

+ 2 - 2
editor/editor_inspector.h

@@ -227,7 +227,7 @@ protected:
 	GDVIRTUAL1(_parse_begin, Object *)
 	GDVIRTUAL2(_parse_category, Object *, String)
 	GDVIRTUAL2(_parse_group, Object *, String)
-	GDVIRTUAL7R(bool, _parse_property, Object *, int, String, int, String, int, bool)
+	GDVIRTUAL7R(bool, _parse_property, Object *, Variant::Type, String, PropertyHint, String, BitField<PropertyUsageFlags>, bool)
 	GDVIRTUAL1(_parse_end, Object *)
 
 public:
@@ -239,7 +239,7 @@ public:
 	virtual void parse_begin(Object *p_object);
 	virtual void parse_category(Object *p_object, const String &p_category);
 	virtual void parse_group(Object *p_object, const String &p_group);
-	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false);
+	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false);
 	virtual void parse_end(Object *p_object);
 };
 

+ 2 - 2
editor/editor_properties.cpp

@@ -4154,7 +4154,7 @@ bool EditorInspectorDefaultPlugin::can_handle(Object *p_object) {
 	return true; // Can handle everything.
 }
 
-bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	Control *editor = EditorInspectorDefaultPlugin::get_editor_for_property(p_object, p_type, p_path, p_hint, p_hint_text, p_usage, p_wide);
 	if (editor) {
 		add_property_editor(p_path, editor);
@@ -4228,7 +4228,7 @@ static EditorPropertyRangeHint _parse_range_hint(PropertyHint p_hint, const Stri
 	return hint;
 }
 
-EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	double default_float_step = EDITOR_GET("interface/inspector/default_float_step");
 
 	switch (p_type) {

+ 2 - 2
editor/editor_properties.h

@@ -863,9 +863,9 @@ class EditorInspectorDefaultPlugin : public EditorInspectorPlugin {
 
 public:
 	virtual bool can_handle(Object *p_object) override;
-	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
 
-	static EditorProperty *get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false);
+	static EditorProperty *get_editor_for_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false);
 };
 
 #endif // EDITOR_PROPERTIES_H

+ 2 - 4
editor/import/editor_import_plugin.cpp

@@ -172,17 +172,15 @@ Error EditorImportPlugin::import(const String &p_source_file, const String &p_sa
 		++E;
 	}
 
-	int err = 0;
+	Error err = OK;
 	if (GDVIRTUAL_CALL(_import, p_source_file, p_save_path, options, platform_variants, gen_files, err)) {
-		Error ret_err = Error(err);
-
 		for (int i = 0; i < platform_variants.size(); i++) {
 			r_platform_variants->push_back(platform_variants[i]);
 		}
 		for (int i = 0; i < gen_files.size(); i++) {
 			r_gen_files->push_back(gen_files[i]);
 		}
-		return ret_err;
+		return err;
 	}
 	ERR_FAIL_V_MSG(ERR_METHOD_NOT_FOUND, "Unimplemented _import in add-on.");
 }

+ 1 - 1
editor/import/editor_import_plugin.h

@@ -51,7 +51,7 @@ protected:
 	GDVIRTUAL0RC(float, _get_priority)
 	GDVIRTUAL0RC(int, _get_import_order)
 	GDVIRTUAL3RC(bool, _get_option_visibility, String, StringName, Dictionary)
-	GDVIRTUAL5RC(int, _import, String, String, Dictionary, TypedArray<String>, TypedArray<String>)
+	GDVIRTUAL5RC(Error, _import, String, String, Dictionary, TypedArray<String>, TypedArray<String>)
 
 public:
 	EditorImportPlugin();

+ 1 - 1
editor/import/resource_importer_scene.cpp

@@ -54,7 +54,7 @@
 #include "scene/resources/world_boundary_shape_3d.h"
 
 uint32_t EditorSceneFormatImporter::get_import_flags() const {
-	int ret;
+	uint32_t ret;
 	if (GDVIRTUAL_CALL(_get_import_flags, ret)) {
 		return ret;
 	}

+ 1 - 1
editor/import/resource_importer_scene.h

@@ -56,7 +56,7 @@ protected:
 	Node *import_scene_wrapper(const String &p_path, uint32_t p_flags, Dictionary p_options);
 	Ref<Animation> import_animation_wrapper(const String &p_path, uint32_t p_flags, Dictionary p_options);
 
-	GDVIRTUAL0RC(int, _get_import_flags)
+	GDVIRTUAL0RC(uint32_t, _get_import_flags)
 	GDVIRTUAL0RC(Vector<String>, _get_extensions)
 	GDVIRTUAL3R(Object *, _import_scene, String, uint32_t, Dictionary)
 	GDVIRTUAL1(_get_import_options, String)

+ 1 - 1
editor/plugins/control_editor_plugin.cpp

@@ -423,7 +423,7 @@ void EditorInspectorPluginControl::parse_group(Object *p_object, const String &p
 	add_custom_control(pos_warning);
 }
 
-bool EditorInspectorPluginControl::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginControl::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	Control *control = Object::cast_to<Control>(p_object);
 	if (!control) {
 		return false;

+ 1 - 1
editor/plugins/control_editor_plugin.h

@@ -129,7 +129,7 @@ class EditorInspectorPluginControl : public EditorInspectorPlugin {
 public:
 	virtual bool can_handle(Object *p_object) override;
 	virtual void parse_group(Object *p_object, const String &p_group) override;
-	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
 };
 
 // Toolbar controls.

+ 3 - 3
editor/plugins/font_config_plugin.cpp

@@ -874,7 +874,7 @@ bool EditorInspectorPluginFontVariation::can_handle(Object *p_object) {
 	return (Object::cast_to<FontVariation>(p_object) != nullptr) || (Object::cast_to<DynamicFontImportSettingsData>(p_object) != nullptr);
 }
 
-bool EditorInspectorPluginFontVariation::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginFontVariation::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	if (p_path == "variation_opentype") {
 		add_property_editor(p_path, memnew(EditorPropertyOTVariation));
 		return true;
@@ -976,7 +976,7 @@ void EditorInspectorPluginFontPreview::parse_begin(Object *p_object) {
 	add_custom_control(editor);
 }
 
-bool EditorInspectorPluginFontPreview::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginFontPreview::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	return false;
 }
 
@@ -1035,7 +1035,7 @@ bool EditorInspectorPluginSystemFont::can_handle(Object *p_object) {
 	return Object::cast_to<SystemFont>(p_object) != nullptr;
 }
 
-bool EditorInspectorPluginSystemFont::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginSystemFont::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	if (p_path == "font_names") {
 		EditorPropertyFontNamesArray *editor = memnew(EditorPropertyFontNamesArray);
 		editor->setup(p_type, p_hint_text);

+ 3 - 3
editor/plugins/font_config_plugin.h

@@ -212,7 +212,7 @@ class EditorInspectorPluginFontVariation : public EditorInspectorPlugin {
 
 public:
 	virtual bool can_handle(Object *p_object) override;
-	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
 };
 
 /*************************************************************************/
@@ -242,7 +242,7 @@ class EditorInspectorPluginFontPreview : public EditorInspectorPlugin {
 public:
 	virtual bool can_handle(Object *p_object) override;
 	virtual void parse_begin(Object *p_object) override;
-	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
 };
 
 /*************************************************************************/
@@ -269,7 +269,7 @@ class EditorInspectorPluginSystemFont : public EditorInspectorPlugin {
 
 public:
 	virtual bool can_handle(Object *p_object) override;
-	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
 };
 
 /*************************************************************************/

+ 1 - 1
editor/plugins/root_motion_editor_plugin.cpp

@@ -229,7 +229,7 @@ bool EditorInspectorRootMotionPlugin::can_handle(Object *p_object) {
 	return true; // Can handle everything.
 }
 
-bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	if (p_path == "root_motion_track" && p_object->is_class("AnimationTree") && p_type == Variant::NODE_PATH) {
 		EditorPropertyRootMotion *editor = memnew(EditorPropertyRootMotion);
 		add_property_editor(p_path, editor);

+ 1 - 1
editor/plugins/root_motion_editor_plugin.h

@@ -63,7 +63,7 @@ class EditorInspectorRootMotionPlugin : public EditorInspectorPlugin {
 
 public:
 	virtual bool can_handle(Object *p_object) override;
-	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
 };
 
 #endif // ROOT_MOTION_EDITOR_PLUGIN_H

+ 1 - 1
editor/plugins/texture_region_editor_plugin.cpp

@@ -1224,7 +1224,7 @@ void EditorInspectorPluginTextureRegion::_region_edit(Object *p_object) {
 	texture_region_editor->edit(p_object);
 }
 
-bool EditorInspectorPluginTextureRegion::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginTextureRegion::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	if ((p_type == Variant::RECT2 || p_type == Variant::RECT2I)) {
 		if (((Object::cast_to<Sprite2D>(p_object) || Object::cast_to<Sprite3D>(p_object) || Object::cast_to<NinePatchRect>(p_object) || Object::cast_to<StyleBoxTexture>(p_object)) && p_path == "region_rect") || (Object::cast_to<AtlasTexture>(p_object) && p_path == "region")) {
 			Button *button = EditorInspector::create_inspector_action_button(TTR("Edit Region"));

+ 1 - 1
editor/plugins/texture_region_editor_plugin.h

@@ -156,7 +156,7 @@ class EditorInspectorPluginTextureRegion : public EditorInspectorPlugin {
 
 public:
 	virtual bool can_handle(Object *p_object) override;
-	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) override;
+	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) override;
 
 	EditorInspectorPluginTextureRegion();
 };

+ 1 - 1
editor/plugins/tiles/tile_set_atlas_source_editor.cpp

@@ -2773,7 +2773,7 @@ bool EditorInspectorPluginTileData::can_handle(Object *p_object) {
 	return Object::cast_to<TileSetAtlasSourceEditor::AtlasTileProxyObject>(p_object) != nullptr;
 }
 
-bool EditorInspectorPluginTileData::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorPluginTileData::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	Vector<String> components = String(p_path).split("/", true, 2);
 	if (components.size() == 2 && components[0].begins_with("occlusion_layer_") && components[0].trim_prefix("occlusion_layer_").is_valid_int()) {
 		// Occlusion layers.

+ 1 - 1
editor/plugins/tiles/tile_set_atlas_source_editor.h

@@ -312,7 +312,7 @@ class EditorInspectorPluginTileData : public EditorInspectorPlugin {
 
 public:
 	virtual bool can_handle(Object *p_object) override;
-	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
 };
 
 #endif // TILE_SET_ATLAS_SOURCE_EDITOR_H

+ 1 - 1
editor/plugins/visual_shader_editor_plugin.cpp

@@ -6570,7 +6570,7 @@ bool EditorInspectorVisualShaderModePlugin::can_handle(Object *p_object) {
 	return true; // Can handle everything.
 }
 
-bool EditorInspectorVisualShaderModePlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
+bool EditorInspectorVisualShaderModePlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide) {
 	if (p_path == "mode" && p_object->is_class("VisualShader") && p_type == Variant::INT) {
 		EditorPropertyVisualShaderMode *mode_editor = memnew(EditorPropertyVisualShaderMode);
 		Vector<String> options = p_hint_text.split(",");

+ 1 - 1
editor/plugins/visual_shader_editor_plugin.h

@@ -561,7 +561,7 @@ class EditorInspectorVisualShaderModePlugin : public EditorInspectorPlugin {
 
 public:
 	virtual bool can_handle(Object *p_object) override;
-	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide = false) override;
+	virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const BitField<PropertyUsageFlags> p_usage, const bool p_wide = false) override;
 };
 
 class VisualShaderNodePortPreview : public Control {

+ 8 - 8
modules/gltf/doc_classes/GLTFDocumentExtension.xml

@@ -22,7 +22,7 @@
 			</description>
 		</method>
 		<method name="_export_node" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="state" type="GLTFState" />
 			<param index="1" name="gltf_node" type="GLTFNode" />
 			<param index="2" name="json" type="Dictionary" />
@@ -33,7 +33,7 @@
 			</description>
 		</method>
 		<method name="_export_post" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="state" type="GLTFState" />
 			<description>
 				Part of the export process. This method is run last, after all other parts of the export process.
@@ -41,7 +41,7 @@
 			</description>
 		</method>
 		<method name="_export_preflight" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="state" type="GLTFState" />
 			<param index="1" name="root" type="Node" />
 			<description>
@@ -67,7 +67,7 @@
 			</description>
 		</method>
 		<method name="_import_node" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="state" type="GLTFState" />
 			<param index="1" name="gltf_node" type="GLTFNode" />
 			<param index="2" name="json" type="Dictionary" />
@@ -78,7 +78,7 @@
 			</description>
 		</method>
 		<method name="_import_post" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="state" type="GLTFState" />
 			<param index="1" name="root" type="Node" />
 			<description>
@@ -87,7 +87,7 @@
 			</description>
 		</method>
 		<method name="_import_post_parse" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="state" type="GLTFState" />
 			<description>
 				Part of the import process. This method is run after [method _generate_scene_node] and before [method _import_node].
@@ -95,7 +95,7 @@
 			</description>
 		</method>
 		<method name="_import_preflight" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="state" type="GLTFState" />
 			<param index="1" name="extensions" type="PackedStringArray" />
 			<description>
@@ -104,7 +104,7 @@
 			</description>
 		</method>
 		<method name="_parse_node_extensions" qualifiers="virtual">
-			<return type="int" />
+			<return type="int" enum="Error" />
 			<param index="0" name="state" type="GLTFState" />
 			<param index="1" name="gltf_node" type="GLTFNode" />
 			<param index="2" name="extensions" type="Dictionary" />

+ 16 - 16
modules/gltf/extensions/gltf_document_extension.cpp

@@ -49,9 +49,9 @@ void GLTFDocumentExtension::_bind_methods() {
 // Import process.
 Error GLTFDocumentExtension::import_preflight(Ref<GLTFState> p_state, Vector<String> p_extensions) {
 	ERR_FAIL_NULL_V(p_state, ERR_INVALID_PARAMETER);
-	int err = OK;
+	Error err = OK;
 	GDVIRTUAL_CALL(_import_preflight, p_state, p_extensions, err);
-	return Error(err);
+	return err;
 }
 
 Vector<String> GLTFDocumentExtension::get_supported_extensions() {
@@ -63,9 +63,9 @@ Vector<String> GLTFDocumentExtension::get_supported_extensions() {
 Error GLTFDocumentExtension::parse_node_extensions(Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Dictionary &p_extensions) {
 	ERR_FAIL_NULL_V(p_state, ERR_INVALID_PARAMETER);
 	ERR_FAIL_NULL_V(p_gltf_node, ERR_INVALID_PARAMETER);
-	int err = OK;
+	Error err = OK;
 	GDVIRTUAL_CALL(_parse_node_extensions, p_state, p_gltf_node, p_extensions, err);
-	return Error(err);
+	return err;
 }
 
 Node3D *GLTFDocumentExtension::generate_scene_node(Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Node *p_scene_parent) {
@@ -79,34 +79,34 @@ Node3D *GLTFDocumentExtension::generate_scene_node(Ref<GLTFState> p_state, Ref<G
 
 Error GLTFDocumentExtension::import_post_parse(Ref<GLTFState> p_state) {
 	ERR_FAIL_NULL_V(p_state, ERR_INVALID_PARAMETER);
-	int err = OK;
+	Error err = OK;
 	GDVIRTUAL_CALL(_import_post_parse, p_state, err);
-	return Error(err);
+	return err;
 }
 
 Error GLTFDocumentExtension::import_node(Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Dictionary &r_dict, Node *p_node) {
 	ERR_FAIL_NULL_V(p_state, ERR_INVALID_PARAMETER);
 	ERR_FAIL_NULL_V(p_gltf_node, ERR_INVALID_PARAMETER);
 	ERR_FAIL_NULL_V(p_node, ERR_INVALID_PARAMETER);
-	int err = OK;
+	Error err = OK;
 	GDVIRTUAL_CALL(_import_node, p_state, p_gltf_node, r_dict, p_node, err);
-	return Error(err);
+	return err;
 }
 
 Error GLTFDocumentExtension::import_post(Ref<GLTFState> p_state, Node *p_root) {
 	ERR_FAIL_NULL_V(p_root, ERR_INVALID_PARAMETER);
 	ERR_FAIL_NULL_V(p_state, ERR_INVALID_PARAMETER);
-	int err = OK;
+	Error err = OK;
 	GDVIRTUAL_CALL(_import_post, p_state, p_root, err);
-	return Error(err);
+	return err;
 }
 
 // Export process.
 Error GLTFDocumentExtension::export_preflight(Ref<GLTFState> p_state, Node *p_root) {
 	ERR_FAIL_NULL_V(p_root, ERR_INVALID_PARAMETER);
-	int err = OK;
+	Error err = OK;
 	GDVIRTUAL_CALL(_export_preflight, p_state, p_root, err);
-	return Error(err);
+	return err;
 }
 
 void GLTFDocumentExtension::convert_scene_node(Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Node *p_scene_node) {
@@ -120,14 +120,14 @@ Error GLTFDocumentExtension::export_node(Ref<GLTFState> p_state, Ref<GLTFNode> p
 	ERR_FAIL_NULL_V(p_state, ERR_INVALID_PARAMETER);
 	ERR_FAIL_NULL_V(p_gltf_node, ERR_INVALID_PARAMETER);
 	ERR_FAIL_NULL_V(p_node, ERR_INVALID_PARAMETER);
-	int err = OK;
+	Error err = OK;
 	GDVIRTUAL_CALL(_export_node, p_state, p_gltf_node, r_dict, p_node, err);
-	return Error(err);
+	return err;
 }
 
 Error GLTFDocumentExtension::export_post(Ref<GLTFState> p_state) {
 	ERR_FAIL_NULL_V(p_state, ERR_INVALID_PARAMETER);
-	int err = OK;
+	Error err = OK;
 	GDVIRTUAL_CALL(_export_post, p_state, err);
-	return Error(err);
+	return err;
 }

+ 8 - 8
modules/gltf/extensions/gltf_document_extension.h

@@ -55,18 +55,18 @@ public:
 	virtual Error export_post(Ref<GLTFState> p_state);
 
 	// Import process.
-	GDVIRTUAL2R(int, _import_preflight, Ref<GLTFState>, Vector<String>);
+	GDVIRTUAL2R(Error, _import_preflight, Ref<GLTFState>, Vector<String>);
 	GDVIRTUAL0R(Vector<String>, _get_supported_extensions);
-	GDVIRTUAL3R(int, _parse_node_extensions, Ref<GLTFState>, Ref<GLTFNode>, Dictionary);
+	GDVIRTUAL3R(Error, _parse_node_extensions, Ref<GLTFState>, Ref<GLTFNode>, Dictionary);
 	GDVIRTUAL3R(Node3D *, _generate_scene_node, Ref<GLTFState>, Ref<GLTFNode>, Node *);
-	GDVIRTUAL1R(int, _import_post_parse, Ref<GLTFState>);
-	GDVIRTUAL4R(int, _import_node, Ref<GLTFState>, Ref<GLTFNode>, Dictionary, Node *);
-	GDVIRTUAL2R(int, _import_post, Ref<GLTFState>, Node *);
+	GDVIRTUAL1R(Error, _import_post_parse, Ref<GLTFState>);
+	GDVIRTUAL4R(Error, _import_node, Ref<GLTFState>, Ref<GLTFNode>, Dictionary, Node *);
+	GDVIRTUAL2R(Error, _import_post, Ref<GLTFState>, Node *);
 	// Export process.
-	GDVIRTUAL2R(int, _export_preflight, Ref<GLTFState>, Node *);
+	GDVIRTUAL2R(Error, _export_preflight, Ref<GLTFState>, Node *);
 	GDVIRTUAL3(_convert_scene_node, Ref<GLTFState>, Ref<GLTFNode>, Node *);
-	GDVIRTUAL4R(int, _export_node, Ref<GLTFState>, Ref<GLTFNode>, Dictionary, Node *);
-	GDVIRTUAL1R(int, _export_post, Ref<GLTFState>);
+	GDVIRTUAL4R(Error, _export_node, Ref<GLTFState>, Ref<GLTFNode>, Dictionary, Node *);
+	GDVIRTUAL1R(Error, _export_post, Ref<GLTFState>);
 };
 
 #endif // GLTF_DOCUMENT_EXTENSION_H

+ 8 - 8
scene/main/multiplayer_api.cpp

@@ -329,9 +329,9 @@ void MultiplayerAPI::_bind_methods() {
 /// MultiplayerAPIExtension
 
 Error MultiplayerAPIExtension::poll() {
-	int err = OK;
+	Error err = OK;
 	GDVIRTUAL_CALL(_poll, err);
-	return (Error)err;
+	return err;
 }
 
 void MultiplayerAPIExtension::set_multiplayer_peer(const Ref<MultiplayerPeer> &p_peer) {
@@ -364,9 +364,9 @@ Error MultiplayerAPIExtension::rpcp(Object *p_obj, int p_peer_id, const StringNa
 	for (int i = 0; i < p_argcount; i++) {
 		args.push_back(*p_arg[i]);
 	}
-	int ret = FAILED;
+	Error ret = FAILED;
 	GDVIRTUAL_CALL(_rpc, p_peer_id, p_obj, p_method, args, ret);
-	return (Error)ret;
+	return ret;
 }
 
 int MultiplayerAPIExtension::get_remote_sender_id() {
@@ -376,15 +376,15 @@ int MultiplayerAPIExtension::get_remote_sender_id() {
 }
 
 Error MultiplayerAPIExtension::object_configuration_add(Object *p_object, Variant p_config) {
-	int err = ERR_UNAVAILABLE;
+	Error err = ERR_UNAVAILABLE;
 	GDVIRTUAL_CALL(_object_configuration_add, p_object, p_config, err);
-	return (Error)err;
+	return err;
 }
 
 Error MultiplayerAPIExtension::object_configuration_remove(Object *p_object, Variant p_config) {
-	int err = ERR_UNAVAILABLE;
+	Error err = ERR_UNAVAILABLE;
 	GDVIRTUAL_CALL(_object_configuration_remove, p_object, p_config, err);
-	return (Error)err;
+	return err;
 }
 
 void MultiplayerAPIExtension::_bind_methods() {

+ 4 - 4
scene/main/multiplayer_api.h

@@ -101,15 +101,15 @@ public:
 	virtual Error object_configuration_remove(Object *p_object, Variant p_config) override;
 
 	// Extensions
-	GDVIRTUAL0R(int, _poll);
+	GDVIRTUAL0R(Error, _poll);
 	GDVIRTUAL1(_set_multiplayer_peer, Ref<MultiplayerPeer>);
 	GDVIRTUAL0R(Ref<MultiplayerPeer>, _get_multiplayer_peer);
 	GDVIRTUAL0RC(int, _get_unique_id);
 	GDVIRTUAL0RC(PackedInt32Array, _get_peer_ids);
-	GDVIRTUAL4R(int, _rpc, int, Object *, StringName, Array);
+	GDVIRTUAL4R(Error, _rpc, int, Object *, StringName, Array);
 	GDVIRTUAL0RC(int, _get_remote_sender_id);
-	GDVIRTUAL2R(int, _object_configuration_add, Object *, Variant);
-	GDVIRTUAL2R(int, _object_configuration_remove, Object *, Variant);
+	GDVIRTUAL2R(Error, _object_configuration_add, Object *, Variant);
+	GDVIRTUAL2R(Error, _object_configuration_remove, Object *, Variant);
 };
 
 #endif // MULTIPLAYER_API_H

+ 1 - 1
scene/main/multiplayer_peer.cpp

@@ -163,7 +163,7 @@ Error MultiplayerPeerExtension::put_packet(const uint8_t *p_buffer, int p_buffer
 		if (!GDVIRTUAL_CALL(_put_packet_script, a, err)) {
 			return FAILED;
 		}
-		return (Error)err;
+		return err;
 	}
 	WARN_PRINT_ONCE("MultiplayerPeerExtension::_put_packet_native is unimplemented!");
 	return FAILED;

+ 8 - 2
scene/resources/visual_shader.cpp

@@ -427,7 +427,10 @@ void VisualShaderNodeCustom::update_ports() {
 				if (!GDVIRTUAL_CALL(_get_input_port_name, i, port.name)) {
 					port.name = "in" + itos(i);
 				}
-				if (!GDVIRTUAL_CALL(_get_input_port_type, i, port.type)) {
+				PortType port_type;
+				if (GDVIRTUAL_CALL(_get_input_port_type, i, port_type)) {
+					port.type = (int)port_type;
+				} else {
 					port.type = (int)PortType::PORT_TYPE_SCALAR;
 				}
 
@@ -445,7 +448,10 @@ void VisualShaderNodeCustom::update_ports() {
 				if (!GDVIRTUAL_CALL(_get_output_port_name, i, port.name)) {
 					port.name = "out" + itos(i);
 				}
-				if (!GDVIRTUAL_CALL(_get_output_port_type, i, port.type)) {
+				PortType port_type;
+				if (GDVIRTUAL_CALL(_get_output_port_type, i, port_type)) {
+					port.type = (int)port_type;
+				} else {
 					port.type = (int)PortType::PORT_TYPE_SCALAR;
 				}
 

+ 3 - 3
scene/resources/visual_shader.h

@@ -369,12 +369,12 @@ protected:
 	GDVIRTUAL0RC(String, _get_name)
 	GDVIRTUAL0RC(String, _get_description)
 	GDVIRTUAL0RC(String, _get_category)
-	GDVIRTUAL0RC(int, _get_return_icon_type)
+	GDVIRTUAL0RC(PortType, _get_return_icon_type)
 	GDVIRTUAL0RC(int, _get_input_port_count)
-	GDVIRTUAL1RC(int, _get_input_port_type, int)
+	GDVIRTUAL1RC(PortType, _get_input_port_type, int)
 	GDVIRTUAL1RC(String, _get_input_port_name, int)
 	GDVIRTUAL0RC(int, _get_output_port_count)
-	GDVIRTUAL1RC(int, _get_output_port_type, int)
+	GDVIRTUAL1RC(PortType, _get_output_port_type, int)
 	GDVIRTUAL1RC(String, _get_output_port_name, int)
 	GDVIRTUAL4RC(String, _get_code, TypedArray<String>, TypedArray<String>, Shader::Mode, VisualShader::Type)
 	GDVIRTUAL2RC(String, _get_func_code, Shader::Mode, VisualShader::Type)

+ 4 - 4
servers/xr/xr_interface_extension.cpp

@@ -136,9 +136,9 @@ PackedStringArray XRInterfaceExtension::get_suggested_pose_names(const StringNam
 }
 
 XRInterface::TrackingStatus XRInterfaceExtension::get_tracking_status() const {
-	uint32_t status = XR_UNKNOWN_TRACKING;
+	XRInterface::TrackingStatus status = XR_UNKNOWN_TRACKING;
 	GDVIRTUAL_CALL(_get_tracking_status, status);
-	return TrackingStatus(status);
+	return status;
 }
 
 void XRInterfaceExtension::trigger_haptic_pulse(const String &p_action_name, const StringName &p_tracker_name, double p_frequency, double p_amplitude, double p_duration_sec, double p_delay_sec) {
@@ -152,9 +152,9 @@ bool XRInterfaceExtension::supports_play_area_mode(XRInterface::PlayAreaMode p_m
 }
 
 XRInterface::PlayAreaMode XRInterfaceExtension::get_play_area_mode() const {
-	uint32_t mode = XR_PLAY_AREA_UNKNOWN;
+	XRInterface::PlayAreaMode mode = XR_PLAY_AREA_UNKNOWN;
 	GDVIRTUAL_CALL(_get_play_area_mode, mode);
-	return XRInterface::PlayAreaMode(mode);
+	return mode;
 }
 
 bool XRInterfaceExtension::set_play_area_mode(XRInterface::PlayAreaMode p_mode) {

+ 3 - 3
servers/xr/xr_interface_extension.h

@@ -71,7 +71,7 @@ public:
 
 	GDVIRTUAL0RC(PackedStringArray, _get_suggested_tracker_names);
 	GDVIRTUAL1RC(PackedStringArray, _get_suggested_pose_names, const StringName &);
-	GDVIRTUAL0RC(uint32_t, _get_tracking_status);
+	GDVIRTUAL0RC(XRInterface::TrackingStatus, _get_tracking_status);
 	GDVIRTUAL6(_trigger_haptic_pulse, const String &, const StringName &, double, double, double, double);
 
 	/** specific to VR **/
@@ -81,8 +81,8 @@ public:
 	virtual PackedVector3Array get_play_area() const override; /* if available, returns an array of vectors denoting the play area the player can move around in */
 
 	GDVIRTUAL1RC(bool, _supports_play_area_mode, XRInterface::PlayAreaMode);
-	GDVIRTUAL0RC(uint32_t, _get_play_area_mode);
-	GDVIRTUAL1RC(bool, _set_play_area_mode, uint32_t);
+	GDVIRTUAL0RC(XRInterface::PlayAreaMode, _get_play_area_mode);
+	GDVIRTUAL1RC(bool, _set_play_area_mode, XRInterface::PlayAreaMode);
 	GDVIRTUAL0RC(PackedVector3Array, _get_play_area);
 
 	/** specific to AR **/