summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/config/engine.cpp2
-rw-r--r--core/config/project_settings.cpp1
-rw-r--r--core/object/object.cpp18
-rw-r--r--core/string/node_path.cpp33
-rw-r--r--core/string/node_path.h2
-rw-r--r--core/string/translation.cpp38
-rw-r--r--core/string/translation.h10
-rw-r--r--core/string/ustring.cpp21
-rw-r--r--core/string/ustring.h37
-rw-r--r--core/variant/variant_call.cpp1
-rw-r--r--core/version.h6
-rw-r--r--doc/classes/Button.xml2
-rw-r--r--doc/classes/EditorSettings.xml3
-rw-r--r--doc/classes/Engine.xml3
-rw-r--r--doc/classes/ItemList.xml2
-rw-r--r--doc/classes/Label.xml2
-rw-r--r--doc/classes/LineEdit.xml2
-rw-r--r--doc/classes/LinkButton.xml2
-rw-r--r--doc/classes/MenuBar.xml2
-rw-r--r--doc/classes/NodePath.xml10
-rw-r--r--doc/classes/PopupMenu.xml4
-rw-r--r--doc/classes/ProgressBar.xml2
-rw-r--r--doc/classes/RichTextLabel.xml2
-rw-r--r--doc/classes/TabBar.xml2
-rw-r--r--doc/classes/TabContainer.xml2
-rw-r--r--doc/classes/TextEdit.xml2
-rw-r--r--doc/classes/Tree.xml2
-rw-r--r--doc/classes/Window.xml2
-rw-r--r--doc/classes/XRBodyModifier3D.xml49
-rw-r--r--doc/classes/XRBodyTracker.xml307
-rw-r--r--doc/classes/XRServer.xml48
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp2
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.h2
-rw-r--r--drivers/gles3/storage/material_storage.cpp2
-rw-r--r--editor/SCsub9
-rw-r--r--editor/editor_about.cpp10
-rw-r--r--editor/editor_builders.py4
-rw-r--r--editor/editor_help.cpp4
-rw-r--r--editor/editor_node.cpp9
-rw-r--r--editor/editor_resource_picker.cpp2
-rw-r--r--editor/editor_settings.cpp4
-rw-r--r--editor/editor_translation.cpp59
-rw-r--r--editor/editor_translation.h5
-rw-r--r--editor/gui/editor_bottom_panel.cpp9
-rw-r--r--editor/localization_editor.cpp17
-rw-r--r--editor/localization_editor.h3
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp62
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.h4
-rw-r--r--editor/plugins/script_editor_plugin.cpp11
-rw-r--r--editor/plugins/script_editor_plugin.h1
-rw-r--r--editor/plugins/shader_editor_plugin.cpp25
-rw-r--r--editor/plugins/shader_editor_plugin.h1
-rw-r--r--editor/pot_generator.cpp13
-rw-r--r--editor/project_manager.cpp9
-rw-r--r--main/main.cpp23
-rw-r--r--main/main.h1
-rw-r--r--methods.py13
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml11
-rw-r--r--modules/gdscript/gdscript_parser.cpp21
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/export_enum_as_dictionary.gd15
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/export_enum_as_dictionary.out10
-rw-r--r--modules/gdscript/tests/scripts/parser/features/annotations.gd31
-rw-r--r--modules/gdscript/tests/scripts/parser/features/annotations.out36
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_enum.gd19
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_enum.out18
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_variable.gd35
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_variable.out35
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd12
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out9
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/member_info.gd2
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/member_info.out6
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/member_info_inheritance.gd2
-rw-r--r--modules/gdscript/tests/scripts/utils.notest.gd25
-rw-r--r--modules/gltf/gltf_document.cpp2
-rw-r--r--modules/mono/.editorconfig71
-rwxr-xr-xmodules/mono/build_scripts/build_assemblies.py6
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Bar.cs6
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ExportedFields.cs122
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ExportedProperties.cs166
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Foo.cs4
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic1T.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic2T.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/MoreExportedFields.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/NestedClass.cs4
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/AllReadOnly.cs8
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/AllWriteOnly.cs4
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/MixedReadOnlyWriteOnly.cs12
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ScriptBoilerplate.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/ScriptPropertiesGeneratorTests.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllReadOnly_ScriptProperties.generated.cs40
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllWriteOnly_ScriptProperties.generated.cs24
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptProperties.generated.cs840
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptPropertyDefVal.generated.cs240
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptProperties.generated.cs924
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptPropertyDefVal.generated.cs244
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/MixedReadOnlyWriteOnly_ScriptProperties.generated.cs64
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/AllReadOnly.cs8
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/AllWriteOnly.cs4
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Bar.cs6
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedFields.cs122
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedProperties.cs162
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Foo.cs4
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.GD0003.cs6
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/MixedReadOnlyWriteOnly.cs12
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/MoreExportedFields.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ScriptBoilerplate.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/GlobalClassAnalyzer.cs6
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs6
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs6
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs6
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs6
-rw-r--r--modules/mono/editor/GodotTools/GodotTools.OpenVisualStudio/Program.cs2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs4
-rw-r--r--modules/mono/editor/bindings_generator.cpp55
-rw-r--r--modules/mono/glue/GodotSharp/.editorconfig19
-rw-r--r--modules/mono/glue/GodotSharp/Godot.SourceGenerators.Internal/UnmanagedCallbacksGenerator.cs4
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Compat.cs2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs1
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RpcAttribute.cs4
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/AlcReloadCfg.cs4
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs32
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs18
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Colors.cs2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/CustomGCHandle.cs1
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/DebuggingUtils.cs6
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs24
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/DisposablesTracker.cs1
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/GodotObject.base.cs8
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs32
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs6
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs35
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs6
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs8
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.extended.cs2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.cs9
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs4
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs24
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs4
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharpEditor/Compat.cs3
-rw-r--r--platform/macos/display_server_macos.mm2
-rw-r--r--platform/windows/display_server_windows.cpp2
-rw-r--r--scene/3d/physics/ray_cast_3d.cpp67
-rw-r--r--scene/3d/physics/ray_cast_3d.h4
-rw-r--r--scene/3d/physics/shape_cast_3d.cpp65
-rw-r--r--scene/3d/physics/shape_cast_3d.h4
-rw-r--r--scene/3d/xr_body_modifier_3d.cpp415
-rw-r--r--scene/3d/xr_body_modifier_3d.h102
-rw-r--r--scene/gui/code_edit.cpp4
-rw-r--r--scene/gui/color_picker.cpp36
-rw-r--r--scene/gui/file_dialog.cpp62
-rw-r--r--scene/gui/graph_edit.cpp16
-rw-r--r--scene/gui/line_edit.cpp62
-rw-r--r--scene/gui/rich_text_label.cpp4
-rw-r--r--scene/gui/spin_box.cpp1
-rw-r--r--scene/gui/text_edit.cpp62
-rw-r--r--scene/gui/tree.cpp6
-rw-r--r--scene/main/node.cpp11
-rw-r--r--scene/main/viewport.cpp2
-rw-r--r--scene/register_scene_types.cpp2
-rw-r--r--scene/resources/packed_scene.cpp108
-rw-r--r--scene/resources/packed_scene.h4
-rw-r--r--scene/theme/default_theme.cpp46
-rw-r--r--servers/register_server_types.cpp2
-rw-r--r--servers/xr/xr_body_tracker.cpp171
-rw-r--r--servers/xr/xr_body_tracker.h170
-rw-r--r--servers/xr_server.cpp48
-rw-r--r--servers/xr_server.h10
-rw-r--r--tests/core/string/test_node_path.h53
172 files changed, 4107 insertions, 2121 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index 2bb8837849..d714ec42c2 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -114,6 +114,8 @@ Dictionary Engine::get_version_info() const {
String hash = String(VERSION_HASH);
dict["hash"] = hash.is_empty() ? String("unknown") : hash;
+ dict["timestamp"] = VERSION_TIMESTAMP;
+
String stringver = String(dict["major"]) + "." + String(dict["minor"]);
if ((int)dict["patch"] != 0) {
stringver += "." + String(dict["patch"]);
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index d9a5a5094a..d1c90ed7e6 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -1514,6 +1514,7 @@ ProjectSettings::ProjectSettings() {
GLOBAL_DEF_INTERNAL("internationalization/locale/translation_remaps", PackedStringArray());
GLOBAL_DEF_INTERNAL("internationalization/locale/translations", PackedStringArray());
GLOBAL_DEF_INTERNAL("internationalization/locale/translations_pot_files", PackedStringArray());
+ GLOBAL_DEF_INTERNAL("internationalization/locale/translation_add_builtin_strings_to_pot", false);
ProjectSettings::get_singleton()->add_hidden_prefix("input/");
}
diff --git a/core/object/object.cpp b/core/object/object.cpp
index 5db1d2534f..d9a5713c20 100644
--- a/core/object/object.cpp
+++ b/core/object/object.cpp
@@ -1483,10 +1483,15 @@ String Object::tr(const StringName &p_message, const StringName &p_context) cons
}
if (Engine::get_singleton()->is_editor_hint()) {
+ String tr_msg = TranslationServer::get_singleton()->extractable_translate(p_message, p_context);
+ if (!tr_msg.is_empty()) {
+ return tr_msg;
+ }
+
return TranslationServer::get_singleton()->tool_translate(p_message, p_context);
- } else {
- return TranslationServer::get_singleton()->translate(p_message, p_context);
}
+
+ return TranslationServer::get_singleton()->translate(p_message, p_context);
}
String Object::tr_n(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context) const {
@@ -1499,10 +1504,15 @@ String Object::tr_n(const StringName &p_message, const StringName &p_message_plu
}
if (Engine::get_singleton()->is_editor_hint()) {
+ String tr_msg = TranslationServer::get_singleton()->extractable_translate_plural(p_message, p_message_plural, p_n, p_context);
+ if (!tr_msg.is_empty()) {
+ return tr_msg;
+ }
+
return TranslationServer::get_singleton()->tool_translate_plural(p_message, p_message_plural, p_n, p_context);
- } else {
- return TranslationServer::get_singleton()->translate_plural(p_message, p_message_plural, p_n, p_context);
}
+
+ return TranslationServer::get_singleton()->translate_plural(p_message, p_message_plural, p_n, p_context);
}
void Object::_clear_internal_resource_paths(const Variant &p_var) {
diff --git a/core/string/node_path.cpp b/core/string/node_path.cpp
index 32e4564c5e..8ae2efb787 100644
--- a/core/string/node_path.cpp
+++ b/core/string/node_path.cpp
@@ -92,6 +92,14 @@ StringName NodePath::get_subname(int p_idx) const {
return data->subpath[p_idx];
}
+int NodePath::get_total_name_count() const {
+ if (!data) {
+ return 0;
+ }
+
+ return data->path.size() + data->subpath.size();
+}
+
void NodePath::unref() {
if (data && data->refcount.unref()) {
memdelete(data);
@@ -229,6 +237,27 @@ StringName NodePath::get_concatenated_subnames() const {
return data->concatenated_subpath;
}
+NodePath NodePath::slice(int p_begin, int p_end) const {
+ const int name_count = get_name_count();
+ const int total_count = get_total_name_count();
+
+ int begin = CLAMP(p_begin, -total_count, total_count);
+ if (begin < 0) {
+ begin += total_count;
+ }
+ int end = CLAMP(p_end, -total_count, total_count);
+ if (end < 0) {
+ end += total_count;
+ }
+ const int sub_begin = MAX(begin - name_count - 1, 0);
+ const int sub_end = MAX(end - name_count, 0);
+
+ const Vector<StringName> names = get_names().slice(begin, end);
+ const Vector<StringName> sub_names = get_subnames().slice(sub_begin, sub_end);
+ const bool absolute = is_absolute() && (begin == 0);
+ return NodePath(names, sub_names, absolute);
+}
+
NodePath NodePath::rel_path_to(const NodePath &p_np) const {
ERR_FAIL_COND_V(!is_absolute(), NodePath());
ERR_FAIL_COND_V(!p_np.is_absolute(), NodePath());
@@ -331,7 +360,7 @@ NodePath NodePath::simplified() const {
}
NodePath::NodePath(const Vector<StringName> &p_path, bool p_absolute) {
- if (p_path.size() == 0) {
+ if (p_path.size() == 0 && !p_absolute) {
return;
}
@@ -343,7 +372,7 @@ NodePath::NodePath(const Vector<StringName> &p_path, bool p_absolute) {
}
NodePath::NodePath(const Vector<StringName> &p_path, const Vector<StringName> &p_subpath, bool p_absolute) {
- if (p_path.size() == 0 && p_subpath.size() == 0) {
+ if (p_path.size() == 0 && p_subpath.size() == 0 && !p_absolute) {
return;
}
diff --git a/core/string/node_path.h b/core/string/node_path.h
index 876d69924e..56799839d7 100644
--- a/core/string/node_path.h
+++ b/core/string/node_path.h
@@ -57,10 +57,12 @@ public:
StringName get_name(int p_idx) const;
int get_subname_count() const;
StringName get_subname(int p_idx) const;
+ int get_total_name_count() const;
Vector<StringName> get_names() const;
Vector<StringName> get_subnames() const;
StringName get_concatenated_names() const;
StringName get_concatenated_subnames() const;
+ NodePath slice(int p_begin, int p_end = INT_MAX) const;
NodePath rel_path_to(const NodePath &p_np) const;
NodePath get_as_property_path() const;
diff --git a/core/string/translation.cpp b/core/string/translation.cpp
index db0c3f6006..2f25f56eac 100644
--- a/core/string/translation.cpp
+++ b/core/string/translation.cpp
@@ -772,6 +772,20 @@ StringName TranslationServer::tool_translate_plural(const StringName &p_message,
return p_message_plural;
}
+void TranslationServer::set_property_translation(const Ref<Translation> &p_translation) {
+ property_translation = p_translation;
+}
+
+StringName TranslationServer::property_translate(const StringName &p_message) const {
+ if (property_translation.is_valid()) {
+ StringName r = property_translation->get_message(p_message);
+ if (r) {
+ return r;
+ }
+ }
+ return p_message;
+}
+
void TranslationServer::set_doc_translation(const Ref<Translation> &p_translation) {
doc_translation = p_translation;
}
@@ -800,13 +814,13 @@ StringName TranslationServer::doc_translate_plural(const StringName &p_message,
return p_message_plural;
}
-void TranslationServer::set_property_translation(const Ref<Translation> &p_translation) {
- property_translation = p_translation;
+void TranslationServer::set_extractable_translation(const Ref<Translation> &p_translation) {
+ extractable_translation = p_translation;
}
-StringName TranslationServer::property_translate(const StringName &p_message) const {
- if (property_translation.is_valid()) {
- StringName r = property_translation->get_message(p_message);
+StringName TranslationServer::extractable_translate(const StringName &p_message, const StringName &p_context) const {
+ if (extractable_translation.is_valid()) {
+ StringName r = extractable_translation->get_message(p_message, p_context);
if (r) {
return r;
}
@@ -814,6 +828,20 @@ StringName TranslationServer::property_translate(const StringName &p_message) co
return p_message;
}
+StringName TranslationServer::extractable_translate_plural(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context) const {
+ if (extractable_translation.is_valid()) {
+ StringName r = extractable_translation->get_plural_message(p_message, p_message_plural, p_n, p_context);
+ if (r) {
+ return r;
+ }
+ }
+
+ if (p_n == 1) {
+ return p_message;
+ }
+ return p_message_plural;
+}
+
bool TranslationServer::is_pseudolocalization_enabled() const {
return pseudolocalization_enabled;
}
diff --git a/core/string/translation.h b/core/string/translation.h
index 4eca37f6be..bd7082dc9d 100644
--- a/core/string/translation.h
+++ b/core/string/translation.h
@@ -82,8 +82,9 @@ class TranslationServer : public Object {
HashSet<Ref<Translation>> translations;
Ref<Translation> tool_translation;
- Ref<Translation> doc_translation;
Ref<Translation> property_translation;
+ Ref<Translation> doc_translation;
+ Ref<Translation> extractable_translation;
bool enabled = true;
@@ -181,11 +182,14 @@ public:
Ref<Translation> get_tool_translation() const;
StringName tool_translate(const StringName &p_message, const StringName &p_context = "") const;
StringName tool_translate_plural(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context = "") const;
+ void set_property_translation(const Ref<Translation> &p_translation);
+ StringName property_translate(const StringName &p_message) const;
void set_doc_translation(const Ref<Translation> &p_translation);
StringName doc_translate(const StringName &p_message, const StringName &p_context = "") const;
StringName doc_translate_plural(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context = "") const;
- void set_property_translation(const Ref<Translation> &p_translation);
- StringName property_translate(const StringName &p_message) const;
+ void set_extractable_translation(const Ref<Translation> &p_translation);
+ StringName extractable_translate(const StringName &p_message, const StringName &p_context = "") const;
+ StringName extractable_translate_plural(const StringName &p_message, const StringName &p_message_plural, int p_n, const StringName &p_context = "") const;
void setup();
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index a8a96e6e3f..f4b00255a1 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -5391,9 +5391,7 @@ String DTRN(const String &p_text, const String &p_text_plural, int p_n, const St
/**
* "Run-time TRanslate". Performs string replacement for internationalization
- * within a running project. The translation string must be supplied by the
- * project, as Godot does not provide built-in translations for `RTR()` strings
- * to keep binary size low. A translation context can optionally be specified to
+ * without the editor. A translation context can optionally be specified to
* disambiguate between identical source strings in translations. When
* placeholders are desired, use `vformat(RTR("Example: %s"), some_string)`.
* If a string mentions a quantity (and may therefore need a dynamic plural form),
@@ -5407,9 +5405,8 @@ String RTR(const String &p_text, const String &p_context) {
String rtr = TranslationServer::get_singleton()->tool_translate(p_text, p_context);
if (rtr.is_empty() || rtr == p_text) {
return TranslationServer::get_singleton()->translate(p_text, p_context);
- } else {
- return rtr;
}
+ return rtr;
}
return p_text;
@@ -5417,13 +5414,10 @@ String RTR(const String &p_text, const String &p_context) {
/**
* "Run-time TRanslate for N items". Performs string replacement for
- * internationalization within a running project. The translation string must be
- * supplied by the project, as Godot does not provide built-in translations for
- * `RTRN()` strings to keep binary size low. A translation context can
- * optionally be specified to disambiguate between identical source strings in
- * translations. Use `RTR()` if the string doesn't need dynamic plural form.
- * When placeholders are desired, use
- * `vformat(RTRN("%d item", "%d items", some_integer), some_integer)`.
+ * internationalization without the editor. A translation context can optionally
+ * be specified to disambiguate between identical source strings in translations.
+ * Use `RTR()` if the string doesn't need dynamic plural form. When placeholders
+ * are desired, use `vformat(RTRN("%d item", "%d items", some_integer), some_integer)`.
* The placeholder must be present in both strings to avoid run-time warnings in `vformat()`.
*
* NOTE: Do not use `RTRN()` in editor-only code (typically within the `editor/`
@@ -5434,9 +5428,8 @@ String RTRN(const String &p_text, const String &p_text_plural, int p_n, const St
String rtr = TranslationServer::get_singleton()->tool_translate_plural(p_text, p_text_plural, p_n, p_context);
if (rtr.is_empty() || rtr == p_text || rtr == p_text_plural) {
return TranslationServer::get_singleton()->translate_plural(p_text, p_text_plural, p_n, p_context);
- } else {
- return rtr;
}
+ return rtr;
}
// Return message based on English plural rule if translation is not possible.
diff --git a/core/string/ustring.h b/core/string/ustring.h
index b1348ceb48..468a015302 100644
--- a/core/string/ustring.h
+++ b/core/string/ustring.h
@@ -556,6 +556,43 @@ String DTRN(const String &p_text, const String &p_text_plural, int p_n, const St
String RTR(const String &p_text, const String &p_context = "");
String RTRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context = "");
+/**
+ * "Extractable TRanslate". Used for strings that can appear inside an exported
+ * project (such as the ones in nodes like `FileDialog`), which are made possible
+ * to add in the POT generator. A translation context can optionally be specified
+ * to disambiguate between identical source strings in translations.
+ * When placeholders are desired, use vformat(ETR("Example: %s"), some_string)`.
+ * If a string mentions a quantity (and may therefore need a dynamic plural form),
+ * use `ETRN()` instead of `ETR()`.
+ *
+ * NOTE: This function is for string extraction only, and will just return the
+ * string it was given. The translation itself should be done internally by nodes
+ * with `atr()` instead.
+ */
+_FORCE_INLINE_ String ETR(const String &p_text, const String &p_context = "") {
+ return p_text;
+}
+
+/**
+ * "Extractable TRanslate for N items". Used for strings that can appear inside an
+ * exported project (such as the ones in nodes like `FileDialog`), which are made
+ * possible to add in the POT generator. A translation context can optionally be
+ * specified to disambiguate between identical source strings in translations.
+ * Use `ETR()` if the string doesn't need dynamic plural form. When placeholders
+ * are desired, use `vformat(ETRN("%d item", "%d items", some_integer), some_integer)`.
+ * The placeholder must be present in both strings to avoid run-time warnings in `vformat()`.
+ *
+ * NOTE: This function is for string extraction only, and will just return the
+ * string it was given. The translation itself should be done internally by nodes
+ * with `atr()` instead.
+ */
+_FORCE_INLINE_ String ETRN(const String &p_text, const String &p_text_plural, int p_n, const String &p_context = "") {
+ if (p_n == 1) {
+ return p_text;
+ }
+ return p_text_plural;
+}
+
bool select_word(const String &p_s, int p_col, int &r_beg, int &r_end);
_FORCE_INLINE_ void sarray_add_str(Vector<String> &arr) {
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index b551a7059e..503254d1d3 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -2033,6 +2033,7 @@ static void _register_variant_builtin_methods() {
bind_method(NodePath, get_subname, sarray("idx"), varray());
bind_method(NodePath, get_concatenated_names, sarray(), varray());
bind_method(NodePath, get_concatenated_subnames, sarray(), varray());
+ bind_method(NodePath, slice, sarray("begin", "end"), varray(INT_MAX));
bind_method(NodePath, get_as_property_path, sarray(), varray());
bind_method(NodePath, is_empty, sarray(), varray());
diff --git a/core/version.h b/core/version.h
index abb81312ac..18a97cadf0 100644
--- a/core/version.h
+++ b/core/version.h
@@ -33,6 +33,8 @@
#include "core/version_generated.gen.h"
+#include <stdint.h>
+
// Copied from typedefs.h to stay lean.
#ifndef _STR
#define _STR(m_x) #m_x
@@ -77,4 +79,8 @@
// Git commit hash, generated at build time in `core/version_hash.gen.cpp`.
extern const char *const VERSION_HASH;
+// Git commit date UNIX timestamp (in seconds), generated at build time in `core/version_hash.gen.cpp`.
+// Set to 0 if unknown.
+extern const uint64_t VERSION_TIMESTAMP;
+
#endif // VERSION_H
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index 7ba328c8b8..e5b47ffb89 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -94,7 +94,7 @@
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the [Button] is being hovered and pressed.
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the [Button].
</theme_item>
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 0e4dcacc56..dd0522e091 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -429,6 +429,9 @@
<member name="editors/panning/warped_mouse_panning" type="bool" setter="" getter="">
If [code]true[/code], warps the mouse around the 2D viewport while panning in the 2D editor. This makes it possible to pan over a large area without having to exit panning and adjust the mouse cursor.
</member>
+ <member name="editors/polygon_editor/auto_bake_delay" type="float" setter="" getter="">
+ The delay in seconds until more complex and performance costly polygon editors commit their outlines, e.g. the 2D navigation polygon editor rebakes the navigation mesh polygons. A negative value stops the auto bake.
+ </member>
<member name="editors/polygon_editor/point_grab_radius" type="int" setter="" getter="">
The radius in which points can be selected in the [Polygon2D] and [CollisionPolygon2D] editors (in pixels). Higher values make it easier to select points quickly, but can make it more difficult to select the expected point when several points are located close to each other.
</member>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index f9c9b72ed7..4c8859baf2 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -180,6 +180,7 @@
- [code]status[/code] - Status (such as "beta", "rc1", "rc2", "stable", etc.) as a String;
- [code]build[/code] - Build name (e.g. "custom_build") as a String;
- [code]hash[/code] - Full Git commit hash as a String;
+ - [code]timestamp[/code] - Holds the Git commit date UNIX timestamp in seconds as an int, or [code]0[/code] if unavailable;
- [code]string[/code] - [code]major[/code], [code]minor[/code], [code]patch[/code], [code]status[/code], and [code]build[/code] in a single String.
The [code]hex[/code] value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be [code]0x03010C[/code].
[b]Note:[/b] The [code]hex[/code] value is still an [int] internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for quick version comparisons from code:
@@ -261,7 +262,7 @@
func _enter_tree():
# Depending on when the node is added to the tree,
# prints either "true" or "false".
- print(Engine.is_in_physics_frame())
+ print(Engine.is_in_physics_frame())
func _process(delta):
print(Engine.is_in_physics_frame()) # Prints false
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 593f41bc70..70953609c0 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -461,7 +461,7 @@
<theme_item name="font_hovered_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the item is hovered and not selected yet.
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the item.
</theme_item>
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index edd8a3e436..f39f5616f0 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -115,7 +115,7 @@
<theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Default text [Color] of the [Label].
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The color of text outline.
</theme_item>
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index 1f25e926c9..77fff22157 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -454,7 +454,7 @@
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Default font color.
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the [LineEdit].
</theme_item>
<theme_item name="font_placeholder_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.6)">
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index aa81b6fde0..bcdffcd1ee 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -74,7 +74,7 @@
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
Text [Color] used when the [LinkButton] is being hovered and pressed.
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the [LinkButton].
</theme_item>
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/MenuBar.xml b/doc/classes/MenuBar.xml
index 8812017e49..9e4287331c 100644
--- a/doc/classes/MenuBar.xml
+++ b/doc/classes/MenuBar.xml
@@ -132,7 +132,7 @@
<theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the menu item is being hovered and pressed.
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the menu item.
</theme_item>
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index fa6f158b6e..6e0799e796 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -199,6 +199,16 @@
Returns [code]true[/code] if the node path has been constructed from an empty [String] ([code]""[/code]).
</description>
</method>
+ <method name="slice" qualifiers="const">
+ <return type="NodePath" />
+ <param index="0" name="begin" type="int" />
+ <param index="1" name="end" type="int" default="2147483647" />
+ <description>
+ Returns the slice of the [NodePath], from [param begin] (inclusive) to [param end] (exclusive), as a new [NodePath].
+ The absolute value of [param begin] and [param end] will be clamped to the sum of [method get_name_count] and [method get_subname_count], so the default value for [param end] makes it slice to the end of the [NodePath] by default (i.e. [code]path.slice(1)[/code] is a shorthand for [code]path.slice(1, path.get_name_count() + path.get_subname_count())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the [NodePath] (i.e. [code]path.slice(0, -2)[/code] is a shorthand for [code]path.slice(0, path.get_name_count() + path.get_subname_count() - 2)[/code]).
+ </description>
+ </method>
</methods>
<operators>
<operator name="operator !=">
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index d884c7806f..266a0940eb 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -680,13 +680,13 @@
<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
[Color] used for the hovered text.
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the menu item.
</theme_item>
<theme_item name="font_separator_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
[Color] used for labeled separators' text. See [method add_separator].
</theme_item>
- <theme_item name="font_separator_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_separator_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the labeled separator.
</theme_item>
<theme_item name="h_separation" data_type="constant" type="int" default="4">
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index 02f82f6a9a..e562d39bb7 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -40,7 +40,7 @@
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The color of the text.
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the [ProgressBar].
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 42f5dffdcf..36b990b46b 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -752,7 +752,7 @@
<theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The default text color.
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The default tint of text outline.
</theme_item>
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml
index c59a336bc2..a2beef81eb 100644
--- a/doc/classes/TabBar.xml
+++ b/doc/classes/TabBar.xml
@@ -360,7 +360,7 @@
<theme_item name="font_hovered_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Font color of the currently hovered tab. Does not apply to the selected tab.
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the tab name.
</theme_item>
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 0c1feae6e0..145afc2a03 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -276,7 +276,7 @@
<theme_item name="font_hovered_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Font color of the currently hovered tab.
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the tab name.
</theme_item>
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index bbf86cf84d..b8a838208b 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -1428,7 +1428,7 @@
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Sets the font [Color].
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the [TextEdit].
</theme_item>
<theme_item name="font_placeholder_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.6)">
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 88cda5ae10..0f318efbd1 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -509,7 +509,7 @@
<theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Text [Color] for a [constant TreeItem.CELL_MODE_CHECK] mode cell when it's non-editable (see [method TreeItem.set_editable]).
</theme_item>
- <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The tint of text outline of the item.
</theme_item>
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 7a60c23e58..c86a1e949b 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -902,7 +902,7 @@
<theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
The color of the title's text.
</theme_item>
- <theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
The color of the title's text outline.
</theme_item>
<theme_item name="close_h_offset" data_type="constant" type="int" default="18">
diff --git a/doc/classes/XRBodyModifier3D.xml b/doc/classes/XRBodyModifier3D.xml
new file mode 100644
index 0000000000..4227bc57df
--- /dev/null
+++ b/doc/classes/XRBodyModifier3D.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="XRBodyModifier3D" inherits="Node3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A node for driving body meshes from [XRBodyTracker] data.
+ </brief_description>
+ <description>
+ This node uses body tracking data from a [XRBodyTracker] to animate the skeleton of a body mesh.
+ </description>
+ <tutorials>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
+ </tutorials>
+ <members>
+ <member name="body_tracker" type="StringName" setter="set_body_tracker" getter="get_body_tracker" default="&amp;&quot;/user/body&quot;">
+ The name of the [XRBodyTracker] registered with [XRServer] to obtain the body tracking data from.
+ </member>
+ <member name="body_update" type="int" setter="set_body_update" getter="get_body_update" enum="XRBodyModifier3D.BodyUpdate" is_bitfield="true" default="7">
+ Specifies the body parts to update.
+ </member>
+ <member name="bone_update" type="int" setter="set_bone_update" getter="get_bone_update" enum="XRBodyModifier3D.BoneUpdate" default="0">
+ Specifies the type of updates to perform on the bones.
+ </member>
+ <member name="show_when_tracked" type="bool" setter="set_show_when_tracked" getter="get_show_when_tracked" default="true">
+ If true then the nodes visibility is determined by whether tracking data is available.
+ </member>
+ <member name="target" type="NodePath" setter="set_target" getter="get_target" default="NodePath(&quot;&quot;)">
+ A [NodePath] to a [Skeleton3D] to animate.
+ </member>
+ </members>
+ <constants>
+ <constant name="BODY_UPDATE_UPPER_BODY" value="1" enum="BodyUpdate" is_bitfield="true">
+ The skeleton's upper body joints are updated.
+ </constant>
+ <constant name="BODY_UPDATE_LOWER_BODY" value="2" enum="BodyUpdate" is_bitfield="true">
+ The skeleton's lower body joints are updated.
+ </constant>
+ <constant name="BODY_UPDATE_HANDS" value="4" enum="BodyUpdate" is_bitfield="true">
+ The skeleton's hand joints are updated.
+ </constant>
+ <constant name="BONE_UPDATE_FULL" value="0" enum="BoneUpdate">
+ The skeleton's bones are fully updated (both position and rotation) to match the tracked bones.
+ </constant>
+ <constant name="BONE_UPDATE_ROTATION_ONLY" value="1" enum="BoneUpdate">
+ The skeleton's bones are only rotated to align with the tracked bones, preserving bone length.
+ </constant>
+ <constant name="BONE_UPDATE_MAX" value="2" enum="BoneUpdate">
+ Represents the size of the [enum BoneUpdate] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/XRBodyTracker.xml b/doc/classes/XRBodyTracker.xml
new file mode 100644
index 0000000000..5d45ad11bd
--- /dev/null
+++ b/doc/classes/XRBodyTracker.xml
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="XRBodyTracker" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A tracked body in XR.
+ </brief_description>
+ <description>
+ A body tracking system will create an instance of this object and add it to the [XRServer]. This tracking system will then obtain skeleton data, convert it to the Godot Humanoid skeleton and store this data on the [XRBodyTracker] object.
+ Use [XRBodyModifier3D] to animate a body mesh using body tracking data.
+ </description>
+ <tutorials>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
+ </tutorials>
+ <methods>
+ <method name="get_joint_flags" qualifiers="const">
+ <return type="int" enum="XRBodyTracker.JointFlags" is_bitfield="true" />
+ <param index="0" name="joint" type="int" enum="XRBodyTracker.Joint" />
+ <description>
+ Returns flags about the validity of the tracking data for the given body joint (see [enum XRBodyTracker.JointFlags]).
+ </description>
+ </method>
+ <method name="get_joint_transform" qualifiers="const">
+ <return type="Transform3D" />
+ <param index="0" name="joint" type="int" enum="XRBodyTracker.Joint" />
+ <description>
+ Returns the transform for the given body joint.
+ </description>
+ </method>
+ <method name="set_joint_flags">
+ <return type="void" />
+ <param index="0" name="joint" type="int" enum="XRBodyTracker.Joint" />
+ <param index="1" name="flags" type="int" enum="XRBodyTracker.JointFlags" is_bitfield="true" />
+ <description>
+ Sets flags about the validity of the tracking data for the given body joint.
+ </description>
+ </method>
+ <method name="set_joint_transform">
+ <return type="void" />
+ <param index="0" name="joint" type="int" enum="XRBodyTracker.Joint" />
+ <param index="1" name="transform" type="Transform3D" />
+ <description>
+ Sets the transform for the given body joint.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="body_flags" type="int" setter="set_body_flags" getter="get_body_flags" enum="XRBodyTracker.BodyFlags" is_bitfield="true" default="0">
+ The type of body tracking data captured.
+ </member>
+ <member name="has_tracking_data" type="bool" setter="set_has_tracking_data" getter="get_has_tracking_data" default="false">
+ If [code]true[/code], the body tracking data is valid.
+ </member>
+ </members>
+ <constants>
+ <constant name="BODY_FLAG_UPPER_BODY_SUPPORTED" value="1" enum="BodyFlags" is_bitfield="true">
+ Upper body tracking supported.
+ </constant>
+ <constant name="BODY_FLAG_LOWER_BODY_SUPPORTED" value="2" enum="BodyFlags" is_bitfield="true">
+ Lower body tracking supported.
+ </constant>
+ <constant name="BODY_FLAG_HANDS_SUPPORTED" value="4" enum="BodyFlags" is_bitfield="true">
+ Hand tracking supported.
+ </constant>
+ <constant name="JOINT_ROOT" value="0" enum="Joint">
+ Root joint.
+ </constant>
+ <constant name="JOINT_HIPS" value="1" enum="Joint">
+ Hips joint.
+ </constant>
+ <constant name="JOINT_SPINE" value="2" enum="Joint">
+ Spine joint.
+ </constant>
+ <constant name="JOINT_CHEST" value="3" enum="Joint">
+ Chest joint.
+ </constant>
+ <constant name="JOINT_UPPER_CHEST" value="4" enum="Joint">
+ Upper chest joint.
+ </constant>
+ <constant name="JOINT_NECK" value="5" enum="Joint">
+ Neck joint.
+ </constant>
+ <constant name="JOINT_HEAD" value="6" enum="Joint">
+ Head joint.
+ </constant>
+ <constant name="JOINT_HEAD_TIP" value="7" enum="Joint">
+ Head tip joint.
+ </constant>
+ <constant name="JOINT_LEFT_SHOULDER" value="8" enum="Joint">
+ Left shoulder joint.
+ </constant>
+ <constant name="JOINT_LEFT_UPPER_ARM" value="9" enum="Joint">
+ Left upper arm joint.
+ </constant>
+ <constant name="JOINT_LEFT_LOWER_ARM" value="10" enum="Joint">
+ Left lower arm joint.
+ </constant>
+ <constant name="JOINT_RIGHT_SHOULDER" value="11" enum="Joint">
+ Right shoulder joint.
+ </constant>
+ <constant name="JOINT_RIGHT_UPPER_ARM" value="12" enum="Joint">
+ Right upper arm joint.
+ </constant>
+ <constant name="JOINT_RIGHT_LOWER_ARM" value="13" enum="Joint">
+ Right lower arm joint.
+ </constant>
+ <constant name="JOINT_LEFT_UPPER_LEG" value="14" enum="Joint">
+ Left upper leg joint.
+ </constant>
+ <constant name="JOINT_LEFT_LOWER_LEG" value="15" enum="Joint">
+ Left lower leg joint.
+ </constant>
+ <constant name="JOINT_LEFT_FOOT" value="16" enum="Joint">
+ Left foot joint.
+ </constant>
+ <constant name="JOINT_LEFT_TOES" value="17" enum="Joint">
+ Left toes joint.
+ </constant>
+ <constant name="JOINT_RIGHT_UPPER_LEG" value="18" enum="Joint">
+ Right upper leg joint.
+ </constant>
+ <constant name="JOINT_RIGHT_LOWER_LEG" value="19" enum="Joint">
+ Right lower leg joint.
+ </constant>
+ <constant name="JOINT_RIGHT_FOOT" value="20" enum="Joint">
+ Right foot joint.
+ </constant>
+ <constant name="JOINT_RIGHT_TOES" value="21" enum="Joint">
+ Right toes joint.
+ </constant>
+ <constant name="JOINT_LEFT_HAND" value="22" enum="Joint">
+ Left hand joint.
+ </constant>
+ <constant name="JOINT_LEFT_PALM" value="23" enum="Joint">
+ Left palm joint.
+ </constant>
+ <constant name="JOINT_LEFT_WRIST" value="24" enum="Joint">
+ Left wrist joint.
+ </constant>
+ <constant name="JOINT_LEFT_THUMB_METACARPAL" value="25" enum="Joint">
+ Left thumb metacarpal joint.
+ </constant>
+ <constant name="JOINT_LEFT_THUMB_PHALANX_PROXIMAL" value="26" enum="Joint">
+ Left thumb phalanx proximal joint.
+ </constant>
+ <constant name="JOINT_LEFT_THUMB_PHALANX_DISTAL" value="27" enum="Joint">
+ Left thumb phalanx distal joint.
+ </constant>
+ <constant name="JOINT_LEFT_THUMB_TIP" value="28" enum="Joint">
+ Left thumb tip joint.
+ </constant>
+ <constant name="JOINT_LEFT_INDEX_FINGER_METACARPAL" value="29" enum="Joint">
+ Left index finger metacarpal joint.
+ </constant>
+ <constant name="JOINT_LEFT_INDEX_FINGER_PHALANX_PROXIMAL" value="30" enum="Joint">
+ Left index finger phalanx proximal joint.
+ </constant>
+ <constant name="JOINT_LEFT_INDEX_FINGER_PHALANX_INTERMEDIATE" value="31" enum="Joint">
+ Left index finger phalanx intermediate joint.
+ </constant>
+ <constant name="JOINT_LEFT_INDEX_FINGER_PHALANX_DISTAL" value="32" enum="Joint">
+ Left index finger phalanx distal joint.
+ </constant>
+ <constant name="JOINT_LEFT_INDEX_FINGER_TIP" value="33" enum="Joint">
+ Left index finger tip joint.
+ </constant>
+ <constant name="JOINT_LEFT_MIDDLE_FINGER_METACARPAL" value="34" enum="Joint">
+ Left middle finger metacarpal joint.
+ </constant>
+ <constant name="JOINT_LEFT_MIDDLE_FINGER_PHALANX_PROXIMAL" value="35" enum="Joint">
+ Left middle finger phalanx proximal joint.
+ </constant>
+ <constant name="JOINT_LEFT_MIDDLE_FINGER_PHALANX_INTERMEDIATE" value="36" enum="Joint">
+ Left middle finger phalanx intermediate joint.
+ </constant>
+ <constant name="JOINT_LEFT_MIDDLE_FINGER_PHALANX_DISTAL" value="37" enum="Joint">
+ Left middle finger phalanx distal joint.
+ </constant>
+ <constant name="JOINT_LEFT_MIDDLE_FINGER_TIP" value="38" enum="Joint">
+ Left middle finger tip joint.
+ </constant>
+ <constant name="JOINT_LEFT_RING_FINGER_METACARPAL" value="39" enum="Joint">
+ Left ring finger metacarpal joint.
+ </constant>
+ <constant name="JOINT_LEFT_RING_FINGER_PHALANX_PROXIMAL" value="40" enum="Joint">
+ Left ring finger phalanx proximal joint.
+ </constant>
+ <constant name="JOINT_LEFT_RING_FINGER_PHALANX_INTERMEDIATE" value="41" enum="Joint">
+ Left ring finger phalanx intermediate joint.
+ </constant>
+ <constant name="JOINT_LEFT_RING_FINGER_PHALANX_DISTAL" value="42" enum="Joint">
+ Left ring finger phalanx distal joint.
+ </constant>
+ <constant name="JOINT_LEFT_RING_FINGER_TIP" value="43" enum="Joint">
+ Left ring finger tip joint.
+ </constant>
+ <constant name="JOINT_LEFT_PINKY_FINGER_METACARPAL" value="44" enum="Joint">
+ Left pinky finger metacarpal joint.
+ </constant>
+ <constant name="JOINT_LEFT_PINKY_FINGER_PHALANX_PROXIMAL" value="45" enum="Joint">
+ Left pinky finger phalanx proximal joint.
+ </constant>
+ <constant name="JOINT_LEFT_PINKY_FINGER_PHALANX_INTERMEDIATE" value="46" enum="Joint">
+ Left pinky finger phalanx intermediate joint.
+ </constant>
+ <constant name="JOINT_LEFT_PINKY_FINGER_PHALANX_DISTAL" value="47" enum="Joint">
+ Left pinky finger phalanx distal joint.
+ </constant>
+ <constant name="JOINT_LEFT_PINKY_FINGER_TIP" value="48" enum="Joint">
+ Left pinky finger tip joint.
+ </constant>
+ <constant name="JOINT_RIGHT_HAND" value="49" enum="Joint">
+ Right hand joint.
+ </constant>
+ <constant name="JOINT_RIGHT_PALM" value="50" enum="Joint">
+ Right palm joint.
+ </constant>
+ <constant name="JOINT_RIGHT_WRIST" value="51" enum="Joint">
+ Right wrist joint.
+ </constant>
+ <constant name="JOINT_RIGHT_THUMB_METACARPAL" value="52" enum="Joint">
+ Right thumb metacarpal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_THUMB_PHALANX_PROXIMAL" value="53" enum="Joint">
+ Right thumb phalanx proximal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_THUMB_PHALANX_DISTAL" value="54" enum="Joint">
+ Right thumb phalanx distal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_THUMB_TIP" value="55" enum="Joint">
+ Right thumb tip joint.
+ </constant>
+ <constant name="JOINT_RIGHT_INDEX_FINGER_METACARPAL" value="56" enum="Joint">
+ Right index finger metacarpal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_INDEX_FINGER_PHALANX_PROXIMAL" value="57" enum="Joint">
+ Right index finger phalanx proximal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_INDEX_FINGER_PHALANX_INTERMEDIATE" value="58" enum="Joint">
+ Right index finger phalanx intermediate joint.
+ </constant>
+ <constant name="JOINT_RIGHT_INDEX_FINGER_PHALANX_DISTAL" value="59" enum="Joint">
+ Right index finger phalanx distal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_INDEX_FINGER_TIP" value="60" enum="Joint">
+ Right index finger tip joint.
+ </constant>
+ <constant name="JOINT_RIGHT_MIDDLE_FINGER_METACARPAL" value="61" enum="Joint">
+ Right middle finger metacarpal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_MIDDLE_FINGER_PHALANX_PROXIMAL" value="62" enum="Joint">
+ Right middle finger phalanx proximal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_MIDDLE_FINGER_PHALANX_INTERMEDIATE" value="63" enum="Joint">
+ Right middle finger phalanx intermediate joint.
+ </constant>
+ <constant name="JOINT_RIGHT_MIDDLE_FINGER_PHALANX_DISTAL" value="64" enum="Joint">
+ Right middle finger phalanx distal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_MIDDLE_FINGER_TIP" value="65" enum="Joint">
+ Right middle finger tip joint.
+ </constant>
+ <constant name="JOINT_RIGHT_RING_FINGER_METACARPAL" value="66" enum="Joint">
+ Right ring finger metacarpal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_RING_FINGER_PHALANX_PROXIMAL" value="67" enum="Joint">
+ Right ring finger phalanx proximal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_RING_FINGER_PHALANX_INTERMEDIATE" value="68" enum="Joint">
+ Right ring finger phalanx intermediate joint.
+ </constant>
+ <constant name="JOINT_RIGHT_RING_FINGER_PHALANX_DISTAL" value="69" enum="Joint">
+ Right ring finger phalanx distal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_RING_FINGER_TIP" value="70" enum="Joint">
+ Right ring finger tip joint.
+ </constant>
+ <constant name="JOINT_RIGHT_PINKY_FINGER_METACARPAL" value="71" enum="Joint">
+ Right pinky finger metacarpal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_PINKY_FINGER_PHALANX_PROXIMAL" value="72" enum="Joint">
+ Right pinky finger phalanx proximal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_PINKY_FINGER_PHALANX_INTERMEDIATE" value="73" enum="Joint">
+ Right pinky finger phalanx intermediate joint.
+ </constant>
+ <constant name="JOINT_RIGHT_PINKY_FINGER_PHALANX_DISTAL" value="74" enum="Joint">
+ Right pinky finger phalanx distal joint.
+ </constant>
+ <constant name="JOINT_RIGHT_PINKY_FINGER_TIP" value="75" enum="Joint">
+ Right pinky finger tip joint.
+ </constant>
+ <constant name="JOINT_MAX" value="76" enum="Joint">
+ Represents the size of the [enum Joint] enum.
+ </constant>
+ <constant name="JOINT_FLAG_ORIENTATION_VALID" value="1" enum="JointFlags" is_bitfield="true">
+ The joint's orientation data is valid.
+ </constant>
+ <constant name="JOINT_FLAG_ORIENTATION_TRACKED" value="2" enum="JointFlags" is_bitfield="true">
+ The joint's orientation is actively tracked. May not be set if tracking has been temporarily lost.
+ </constant>
+ <constant name="JOINT_FLAG_POSITION_VALID" value="4" enum="JointFlags" is_bitfield="true">
+ The joint's position data is valid.
+ </constant>
+ <constant name="JOINT_FLAG_POSITION_TRACKED" value="8" enum="JointFlags" is_bitfield="true">
+ The joint's position is actively tracked. May not be set if tracking has been temporarily lost.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index 09e14f1b21..671cc8f15c 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -10,6 +10,14 @@
<link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
+ <method name="add_body_tracker">
+ <return type="void" />
+ <param index="0" name="tracker_name" type="StringName" />
+ <param index="1" name="body_tracker" type="XRBodyTracker" />
+ <description>
+ Registers a new [XRBodyTracker] that tracks the joints of a body.
+ </description>
+ </method>
<method name="add_face_tracker">
<return type="void" />
<param index="0" name="tracker_name" type="StringName" />
@@ -66,6 +74,19 @@
Finds an interface by its [param name]. For example, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it.
</description>
</method>
+ <method name="get_body_tracker" qualifiers="const">
+ <return type="XRBodyTracker" />
+ <param index="0" name="tracker_name" type="StringName" />
+ <description>
+ Returns the [XRBodyTracker] with the given tracker name.
+ </description>
+ </method>
+ <method name="get_body_trackers" qualifiers="const">
+ <return type="Dictionary" />
+ <description>
+ Returns a dictionary of the registered body trackers. Each element of the dictionary is a tracker name mapping to the [XRBodyTracker] instance.
+ </description>
+ </method>
<method name="get_face_tracker" qualifiers="const">
<return type="XRFaceTracker" />
<param index="0" name="tracker_name" type="StringName" />
@@ -137,6 +158,13 @@
Returns a dictionary of trackers for [param tracker_types].
</description>
</method>
+ <method name="remove_body_tracker">
+ <return type="void" />
+ <param index="0" name="tracker_name" type="StringName" />
+ <description>
+ Removes a registered [XRBodyTracker].
+ </description>
+ </method>
<method name="remove_face_tracker">
<return type="void" />
<param index="0" name="tracker_name" type="StringName" />
@@ -179,6 +207,26 @@
</member>
</members>
<signals>
+ <signal name="body_tracker_added">
+ <param index="0" name="tracker_name" type="StringName" />
+ <param index="1" name="body_tracker" type="XRBodyTracker" />
+ <description>
+ Emitted when a new body tracker is added.
+ </description>
+ </signal>
+ <signal name="body_tracker_removed">
+ <param index="0" name="tracker_name" type="StringName" />
+ <description>
+ Emitted when a body tracker is removed.
+ </description>
+ </signal>
+ <signal name="body_tracker_updated">
+ <param index="0" name="tracker_name" type="StringName" />
+ <param index="1" name="body_tracker" type="XRBodyTracker" />
+ <description>
+ Emitted when an existing body tracker is updated.
+ </description>
+ </signal>
<signal name="face_tracker_added">
<param index="0" name="tracker_name" type="StringName" />
<param index="1" name="face_tracker" type="XRFaceTracker" />
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index 11975c1a75..198160939a 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -629,8 +629,6 @@ void RasterizerCanvasGLES3::_render_items(RID p_to_render_target, int p_item_cou
state.canvas_instance_batches[state.current_batch_index].material_data = material_data;
if (shader_data_cache) {
state.canvas_instance_batches[state.current_batch_index].vertex_input_mask = shader_data_cache->vertex_input_mask;
- } else {
- state.canvas_instance_batches[state.current_batch_index].vertex_input_mask = RS::ARRAY_FORMAT_VERTEX | RS::ARRAY_COLOR | RS::ARRAY_TEX_UV;
}
}
diff --git a/drivers/gles3/rasterizer_canvas_gles3.h b/drivers/gles3/rasterizer_canvas_gles3.h
index 2b70df3238..88befa7883 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.h
+++ b/drivers/gles3/rasterizer_canvas_gles3.h
@@ -269,7 +269,7 @@ public:
RID material;
GLES3::CanvasMaterialData *material_data = nullptr;
CanvasShaderGLES3::ShaderVariant shader_variant = CanvasShaderGLES3::MODE_QUAD;
- uint64_t vertex_input_mask;
+ uint64_t vertex_input_mask = RS::ARRAY_FORMAT_VERTEX | RS::ARRAY_FORMAT_COLOR | RS::ARRAY_FORMAT_TEX_UV;
const Item::Command *command = nullptr;
Item::Command::Type command_type = Item::Command::TYPE_ANIMATION_SLICE; // Can default to any type that doesn't form a batch.
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index 5600449d00..23376b4381 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -2607,7 +2607,7 @@ void CanvasShaderData::set_code(const String &p_code) {
MaterialStorage::get_singleton()->shaders.canvas_shader.version_set_code(version, gen_code.code, gen_code.uniforms, gen_code.stage_globals[ShaderCompiler::STAGE_VERTEX], gen_code.stage_globals[ShaderCompiler::STAGE_FRAGMENT], gen_code.defines, texture_uniform_data);
ERR_FAIL_COND(!MaterialStorage::get_singleton()->shaders.canvas_shader.version_is_valid(version));
- vertex_input_mask = RS::ARRAY_FORMAT_VERTEX | RS::ARRAY_COLOR | RS::ARRAY_TEX_UV;
+ vertex_input_mask = RS::ARRAY_FORMAT_VERTEX | RS::ARRAY_FORMAT_COLOR | RS::ARRAY_FORMAT_TEX_UV;
vertex_input_mask |= uses_custom0 << RS::ARRAY_CUSTOM0;
vertex_input_mask |= uses_custom1 << RS::ARRAY_CUSTOM1;
diff --git a/editor/SCsub b/editor/SCsub
index aa240a1e01..bbb40ff303 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -104,6 +104,15 @@ if env.editor_build:
env.Run(editor_builders.make_doc_translations_header, "Generating translations header."),
)
+ # Extractable translations
+ tlist = glob.glob(env.Dir("#editor/translations/extractable").abspath + "/*.po")
+ env.Depends("#editor/extractable_translations.gen.h", tlist)
+ env.CommandNoCache(
+ "#editor/extractable_translations.gen.h",
+ tlist,
+ env.Run(editor_builders.make_extractable_translations_header, "Generating extractable translations header."),
+ )
+
env.add_source_files(env.editor_sources, "*.cpp")
env.add_source_files(env.editor_sources, "register_exporters.gen.cpp")
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index b4ef0f8c4a..e594d53d69 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -33,6 +33,7 @@
#include "core/authors.gen.h"
#include "core/donors.gen.h"
#include "core/license.gen.h"
+#include "core/os/time.h"
#include "core/version.h"
#include "editor/editor_string_names.h"
#include "editor/themes/editor_scale.h"
@@ -206,7 +207,14 @@ EditorAbout::EditorAbout() {
// Set the text to copy in metadata as it slightly differs from the button's text.
version_btn->set_meta(META_TEXT_TO_COPY, "v" VERSION_FULL_BUILD + hash);
version_btn->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
- version_btn->set_tooltip_text(TTR("Click to copy."));
+ String build_date;
+ if (VERSION_TIMESTAMP > 0) {
+ build_date = Time::get_singleton()->get_datetime_string_from_unix_time(VERSION_TIMESTAMP, true) + " UTC";
+ } else {
+ build_date = TTR("(unknown)");
+ }
+ version_btn->set_tooltip_text(vformat(TTR("Git commit date: %s\nClick to copy the version number."), build_date));
+
version_btn->connect("pressed", callable_mp(this, &EditorAbout::_version_button_pressed));
version_info_vbc->add_child(version_btn);
diff --git a/editor/editor_builders.py b/editor/editor_builders.py
index 25004da877..98a64cfd23 100644
--- a/editor/editor_builders.py
+++ b/editor/editor_builders.py
@@ -140,5 +140,9 @@ def make_doc_translations_header(target, source, env):
make_translations_header(target, source, env, "doc")
+def make_extractable_translations_header(target, source, env):
+ make_translations_header(target, source, env, "extractable")
+
+
if __name__ == "__main__":
subprocess_main(globals())
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index cc63618f1e..515c32c58f 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1622,9 +1622,9 @@ void EditorHelp::_update_doc() {
enum_line[E.key] = class_desc->get_paragraph_count() - 2;
class_desc->push_color(theme_cache.title_color);
if (E.value.size() && E.value[0].is_bitfield) {
- class_desc->add_text("flags ");
+ class_desc->add_text("flags ");
} else {
- class_desc->add_text("enum ");
+ class_desc->add_text("enum ");
}
class_desc->pop(); // color
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 2cee2c2198..dc90256490 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1285,7 +1285,14 @@ void EditorNode::save_resource(const Ref<Resource> &p_resource) {
if (p_resource->is_built_in()) {
const String scene_path = p_resource->get_path().get_slice("::", 0);
if (!scene_path.is_empty()) {
- save_scene_if_open(scene_path);
+ if (ResourceLoader::exists(scene_path) && ResourceLoader::get_resource_type(scene_path) == "PackedScene") {
+ save_scene_if_open(scene_path);
+ } else {
+ // Not a packed scene, so save it as regular resource.
+ Ref<Resource> parent_resource = ResourceCache::get_ref(scene_path);
+ ERR_FAIL_COND_MSG(parent_resource.is_null(), "Parent resource not loaded, can't save.");
+ save_resource(parent_resource);
+ }
return;
}
}
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index 963ddb6329..a9225a3057 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -467,6 +467,8 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
EditorNode::get_editor_data().instantiate_object_properties(obj);
+ // Prevent freeing of the object until the end of the update of the resource (GH-88286).
+ Ref<Resource> old_edited_resource = edited_resource;
edited_resource = Ref<Resource>(resp);
emit_signal(SNAME("resource_changed"), edited_resource);
_update_resource();
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 199fa3f6c9..b6d8d7b8d6 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -756,6 +756,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Polygon editor
_initial_set("editors/polygon_editor/point_grab_radius", has_touchscreen_ui ? 32 : 8);
_initial_set("editors/polygon_editor/show_previous_outline", true);
+ EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/polygon_editor/auto_bake_delay", 1.5, "-1.0,10.0,0.01");
// Animation
_initial_set("editors/animation/autorename_animation_tracks", true);
@@ -1059,6 +1060,9 @@ void EditorSettings::setup_language() {
// Load class reference translation.
load_doc_translations(lang);
+
+ // Load extractable translation for projects.
+ load_extractable_translations(lang);
}
void EditorSettings::setup_network() {
diff --git a/editor/editor_translation.cpp b/editor/editor_translation.cpp
index 54a9d2f068..302a81669d 100644
--- a/editor/editor_translation.cpp
+++ b/editor/editor_translation.cpp
@@ -35,6 +35,7 @@
#include "core/io/translation_loader_po.h"
#include "editor/doc_translations.gen.h"
#include "editor/editor_translations.gen.h"
+#include "editor/extractable_translations.gen.h"
#include "editor/property_translations.gen.h"
Vector<String> get_editor_locales() {
@@ -77,6 +78,32 @@ void load_editor_translations(const String &p_locale) {
}
}
+void load_property_translations(const String &p_locale) {
+ PropertyTranslationList *etl = _property_translations;
+ while (etl->data) {
+ if (etl->lang == p_locale) {
+ Vector<uint8_t> data;
+ data.resize(etl->uncomp_size);
+ int ret = Compression::decompress(data.ptrw(), etl->uncomp_size, etl->data, etl->comp_size, Compression::MODE_DEFLATE);
+ ERR_FAIL_COND_MSG(ret == -1, "Compressed file is corrupt.");
+
+ Ref<FileAccessMemory> fa;
+ fa.instantiate();
+ fa->open_custom(data.ptr(), data.size());
+
+ Ref<Translation> tr = TranslationLoaderPO::load_translation(fa);
+
+ if (tr.is_valid()) {
+ tr->set_locale(etl->lang);
+ TranslationServer::get_singleton()->set_property_translation(tr);
+ break;
+ }
+ }
+
+ etl++;
+ }
+}
+
void load_doc_translations(const String &p_locale) {
DocTranslationList *dtl = _doc_translations;
while (dtl->data) {
@@ -103,8 +130,8 @@ void load_doc_translations(const String &p_locale) {
}
}
-void load_property_translations(const String &p_locale) {
- PropertyTranslationList *etl = _property_translations;
+void load_extractable_translations(const String &p_locale) {
+ ExtractableTranslationList *etl = _extractable_translations;
while (etl->data) {
if (etl->lang == p_locale) {
Vector<uint8_t> data;
@@ -120,7 +147,7 @@ void load_property_translations(const String &p_locale) {
if (tr.is_valid()) {
tr->set_locale(etl->lang);
- TranslationServer::get_singleton()->set_property_translation(tr);
+ TranslationServer::get_singleton()->set_extractable_translation(tr);
break;
}
}
@@ -128,3 +155,29 @@ void load_property_translations(const String &p_locale) {
etl++;
}
}
+
+List<StringName> get_extractable_message_list() {
+ ExtractableTranslationList *etl = _extractable_translations;
+ List<StringName> msgids;
+ while (etl->data) {
+ Vector<uint8_t> data;
+ data.resize(etl->uncomp_size);
+ int ret = Compression::decompress(data.ptrw(), etl->uncomp_size, etl->data, etl->comp_size, Compression::MODE_DEFLATE);
+ ERR_FAIL_COND_V_MSG(ret == -1, msgids, "Compressed file is corrupt.");
+
+ Ref<FileAccessMemory> fa;
+ fa.instantiate();
+ fa->open_custom(data.ptr(), data.size());
+
+ Ref<Translation> tr = TranslationLoaderPO::load_translation(fa);
+
+ if (tr.is_valid()) {
+ tr->get_message_list(&msgids);
+ break;
+ }
+
+ etl++;
+ }
+
+ return msgids;
+}
diff --git a/editor/editor_translation.h b/editor/editor_translation.h
index bd6db32536..4785495629 100644
--- a/editor/editor_translation.h
+++ b/editor/editor_translation.h
@@ -32,11 +32,14 @@
#define EDITOR_TRANSLATION_H
#include "core/string/ustring.h"
+#include "core/templates/list.h"
#include "core/templates/vector.h"
Vector<String> get_editor_locales();
void load_editor_translations(const String &p_locale);
-void load_doc_translations(const String &p_locale);
void load_property_translations(const String &p_locale);
+void load_doc_translations(const String &p_locale);
+void load_extractable_translations(const String &p_locale);
+List<StringName> get_extractable_message_list();
#endif // EDITOR_TRANSLATION_H
diff --git a/editor/gui/editor_bottom_panel.cpp b/editor/gui/editor_bottom_panel.cpp
index 1cf9daa545..ab7e05b915 100644
--- a/editor/gui/editor_bottom_panel.cpp
+++ b/editor/gui/editor_bottom_panel.cpp
@@ -30,6 +30,7 @@
#include "editor_bottom_panel.h"
+#include "core/os/time.h"
#include "core/version.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_about.h"
@@ -253,7 +254,13 @@ EditorBottomPanel::EditorBottomPanel() {
// Fade out the version label to be less prominent, but still readable.
version_btn->set_self_modulate(Color(1, 1, 1, 0.65));
version_btn->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
- version_btn->set_tooltip_text(TTR("Click to copy."));
+ String build_date;
+ if (VERSION_TIMESTAMP > 0) {
+ build_date = Time::get_singleton()->get_datetime_string_from_unix_time(VERSION_TIMESTAMP, true) + " UTC";
+ } else {
+ build_date = TTR("(unknown)");
+ }
+ version_btn->set_tooltip_text(vformat(TTR("Git commit date: %s\nClick to copy the version information."), build_date));
version_btn->connect("pressed", callable_mp(this, &EditorBottomPanel::_version_button_pressed));
version_info_vbox->add_child(version_btn);
diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp
index 8bdd5a3102..eb7f508695 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -45,6 +45,7 @@ void LocalizationEditor::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
translation_list->connect("button_clicked", callable_mp(this, &LocalizationEditor::_translation_delete));
translation_pot_list->connect("button_clicked", callable_mp(this, &LocalizationEditor::_pot_delete));
+ translation_pot_add_builtin->set_pressed(GLOBAL_GET("internationalization/locale/translation_add_builtin_strings_to_pot"));
List<String> tfn;
ResourceLoader::get_recognized_extensions_for_type("Translation", &tfn);
@@ -377,6 +378,11 @@ void LocalizationEditor::_pot_generate_open() {
pot_generate_dialog->popup_file_dialog();
}
+void LocalizationEditor::_pot_add_builtin_toggled() {
+ ProjectSettings::get_singleton()->set_setting("internationalization/locale/translation_add_builtin_strings_to_pot", translation_pot_add_builtin->is_pressed());
+ ProjectSettings::get_singleton()->save();
+}
+
void LocalizationEditor::_pot_generate(const String &p_file) {
POTGenerator::get_singleton()->generate_pot(p_file);
}
@@ -730,13 +736,14 @@ LocalizationEditor::LocalizationEditor() {
pot_generate_button->connect("pressed", callable_mp(this, &LocalizationEditor::_pot_generate_open));
thb->add_child(pot_generate_button);
- VBoxContainer *tmc = memnew(VBoxContainer);
- tmc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- tvb->add_child(tmc);
-
translation_pot_list = memnew(Tree);
translation_pot_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- tmc->add_child(translation_pot_list);
+ tvb->add_child(translation_pot_list);
+
+ translation_pot_add_builtin = memnew(CheckBox(TTR("Add Built-in Strings to POT")));
+ translation_pot_add_builtin->set_tooltip_text(TTR("Add strings from built-in components such as certain Control nodes."));
+ translation_pot_add_builtin->connect("pressed", callable_mp(this, &LocalizationEditor::_pot_add_builtin_toggled));
+ tvb->add_child(translation_pot_add_builtin);
pot_generate_dialog = memnew(EditorFileDialog);
pot_generate_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
diff --git a/editor/localization_editor.h b/editor/localization_editor.h
index b9a78a3c82..eb6e5b93c7 100644
--- a/editor/localization_editor.h
+++ b/editor/localization_editor.h
@@ -32,6 +32,7 @@
#define LOCALIZATION_EDITOR_H
#include "editor/editor_locale_dialog.h"
+#include "scene/gui/check_box.h"
#include "scene/gui/tree.h"
class EditorFileDialog;
@@ -52,6 +53,7 @@ class LocalizationEditor : public VBoxContainer {
Tree *translation_remap_options = nullptr;
Tree *translation_pot_list = nullptr;
+ CheckBox *translation_pot_add_builtin = nullptr;
EditorFileDialog *pot_file_open_dialog = nullptr;
EditorFileDialog *pot_generate_dialog = nullptr;
Button *pot_generate_button = nullptr;
@@ -78,6 +80,7 @@ class LocalizationEditor : public VBoxContainer {
void _pot_delete(Object *p_item, int p_column, int p_button, MouseButton p_mouse_button);
void _pot_file_open();
void _pot_generate_open();
+ void _pot_add_builtin_toggled();
void _pot_generate(const String &p_file);
void _update_pot_file_extensions();
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index 48335f3b94..04133072be 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -31,6 +31,7 @@
#include "navigation_polygon_editor_plugin.h"
#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "scene/2d/navigation_region_2d.h"
#include "scene/gui/dialogs.h"
@@ -50,6 +51,13 @@ Node2D *NavigationPolygonEditor::_get_node() const {
void NavigationPolygonEditor::_set_node(Node *p_polygon) {
node = Object::cast_to<NavigationRegion2D>(p_polygon);
+ if (node) {
+ Ref<NavigationPolygon> navpoly = node->get_navigation_polygon();
+ if (navpoly.is_valid() && navpoly->get_outline_count() > 0 && navpoly->get_polygon_count() == 0) {
+ // We have outlines drawn / added by the user but no polygons were created for this navmesh yet so let's bake once immediately.
+ _rebake_timer_timeout();
+ }
+ }
}
int NavigationPolygonEditor::_get_polygon_count() const {
@@ -73,6 +81,10 @@ Variant NavigationPolygonEditor::_get_polygon(int p_idx) const {
void NavigationPolygonEditor::_set_polygon(int p_idx, const Variant &p_polygon) const {
Ref<NavigationPolygon> navpoly = _ensure_navpoly();
navpoly->set_outline(p_idx, p_polygon);
+
+ if (rebake_timer && _rebake_timer_delay >= 0.0) {
+ rebake_timer->start();
+ }
}
void NavigationPolygonEditor::_action_add_polygon(const Variant &p_polygon) {
@@ -80,6 +92,10 @@ void NavigationPolygonEditor::_action_add_polygon(const Variant &p_polygon) {
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(navpoly.ptr(), "add_outline", p_polygon);
undo_redo->add_undo_method(navpoly.ptr(), "remove_outline", navpoly->get_outline_count());
+
+ if (rebake_timer && _rebake_timer_delay >= 0.0) {
+ rebake_timer->start();
+ }
}
void NavigationPolygonEditor::_action_remove_polygon(int p_idx) {
@@ -87,6 +103,10 @@ void NavigationPolygonEditor::_action_remove_polygon(int p_idx) {
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(navpoly.ptr(), "remove_outline", p_idx);
undo_redo->add_undo_method(navpoly.ptr(), "add_outline_at_index", navpoly->get_outline(p_idx), p_idx);
+
+ if (rebake_timer && _rebake_timer_delay >= 0.0) {
+ rebake_timer->start();
+ }
}
void NavigationPolygonEditor::_action_set_polygon(int p_idx, const Variant &p_previous, const Variant &p_polygon) {
@@ -94,6 +114,10 @@ void NavigationPolygonEditor::_action_set_polygon(int p_idx, const Variant &p_pr
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->add_do_method(navpoly.ptr(), "set_outline", p_idx, p_polygon);
undo_redo->add_undo_method(navpoly.ptr(), "set_outline", p_idx, p_previous);
+
+ if (rebake_timer && _rebake_timer_delay >= 0.0) {
+ rebake_timer->start();
+ }
}
bool NavigationPolygonEditor::_has_resource() const {
@@ -136,6 +160,15 @@ NavigationPolygonEditor::NavigationPolygonEditor() {
bake_info = memnew(Label);
bake_hbox->add_child(bake_info);
+ rebake_timer = memnew(Timer);
+ add_child(rebake_timer);
+ rebake_timer->set_one_shot(true);
+ _rebake_timer_delay = EDITOR_GET("editors/polygon_editor/auto_bake_delay");
+ if (_rebake_timer_delay >= 0.0) {
+ rebake_timer->set_wait_time(_rebake_timer_delay);
+ }
+ rebake_timer->connect("timeout", callable_mp(this, &NavigationPolygonEditor::_rebake_timer_timeout));
+
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
node = nullptr;
@@ -147,15 +180,26 @@ void NavigationPolygonEditor::_notification(int p_what) {
button_bake->set_icon(get_theme_icon(SNAME("Bake"), SNAME("EditorIcons")));
button_reset->set_icon(get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")));
} break;
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ if (rebake_timer) {
+ _rebake_timer_delay = EDITOR_GET("editors/polygon_editor/auto_bake_delay");
+ if (_rebake_timer_delay >= 0.0) {
+ rebake_timer->set_wait_time(_rebake_timer_delay);
+ }
+ }
+ } break;
}
}
void NavigationPolygonEditor::_bake_pressed() {
+ if (rebake_timer) {
+ rebake_timer->stop();
+ }
button_bake->set_pressed(false);
ERR_FAIL_NULL(node);
Ref<NavigationPolygon> navigation_polygon = node->get_navigation_polygon();
- if (!navigation_polygon.is_valid()) {
+ if (navigation_polygon.is_null()) {
err_dialog->set_text(TTR("A NavigationPolygon resource must be set or created for this node to work."));
err_dialog->popup_centered();
return;
@@ -167,6 +211,9 @@ void NavigationPolygonEditor::_bake_pressed() {
}
void NavigationPolygonEditor::_clear_pressed() {
+ if (rebake_timer) {
+ rebake_timer->stop();
+ }
if (node) {
if (node->get_navigation_polygon().is_valid()) {
node->get_navigation_polygon()->clear();
@@ -193,6 +240,19 @@ void NavigationPolygonEditor::_update_polygon_editing_state() {
}
}
+void NavigationPolygonEditor::_rebake_timer_timeout() {
+ if (!node) {
+ return;
+ }
+ Ref<NavigationPolygon> navigation_polygon = node->get_navigation_polygon();
+ if (!navigation_polygon.is_valid()) {
+ return;
+ }
+
+ node->bake_navigation_polygon(true);
+ node->queue_redraw();
+}
+
NavigationPolygonEditorPlugin::NavigationPolygonEditorPlugin() :
AbstractPolygon2DEditorPlugin(memnew(NavigationPolygonEditor), "NavigationRegion2D") {
}
diff --git a/editor/plugins/navigation_polygon_editor_plugin.h b/editor/plugins/navigation_polygon_editor_plugin.h
index f1d0cd8751..bf2474bc55 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/editor/plugins/navigation_polygon_editor_plugin.h
@@ -56,6 +56,10 @@ class NavigationPolygonEditor : public AbstractPolygon2DEditor {
Button *button_reset = nullptr;
Label *bake_info = nullptr;
+ Timer *rebake_timer = nullptr;
+ float _rebake_timer_delay = 1.5;
+ void _rebake_timer_timeout();
+
void _bake_pressed();
void _clear_pressed();
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 5ff8cd17ea..e986510895 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1001,6 +1001,11 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) {
}
}
+ if (p_res.is_valid()) {
+ // In case the Resource has built-in scripts.
+ _mark_built_in_scripts_as_saved(p_res->get_path());
+ }
+
_update_script_names();
Ref<Script> scr = p_res;
if (scr.is_valid()) {
@@ -1010,6 +1015,10 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) {
void ScriptEditor::_scene_saved_callback(const String &p_path) {
// If scene was saved, mark all built-in scripts from that scene as saved.
+ _mark_built_in_scripts_as_saved(p_path);
+}
+
+void ScriptEditor::_mark_built_in_scripts_as_saved(const String &p_parent_path) {
for (int i = 0; i < tab_container->get_tab_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
if (!se) {
@@ -1022,7 +1031,7 @@ void ScriptEditor::_scene_saved_callback(const String &p_path) {
continue; // External script, who cares.
}
- if (edited_res->get_path().get_slice("::", 0) == p_path) {
+ if (edited_res->get_path().get_slice("::", 0) == p_parent_path) {
se->tag_saved_version();
}
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index 6d13c6af09..d5c33c73b4 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -401,6 +401,7 @@ class ScriptEditor : public PanelContainer {
void _add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args);
void _res_saved_callback(const Ref<Resource> &p_res);
void _scene_saved_callback(const String &p_path);
+ void _mark_built_in_scripts_as_saved(const String &p_parent_path);
bool open_textfile_after_create = true;
bool trim_trailing_whitespace_on_save;
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 9321c6dafc..213a332bab 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -625,12 +625,37 @@ void ShaderEditorPlugin::_file_removed(const String &p_removed_file) {
}
}
+void ShaderEditorPlugin::_res_saved_callback(const Ref<Resource> &p_res) {
+ if (p_res.is_null()) {
+ return;
+ }
+ const String &path = p_res->get_path();
+
+ for (EditedShader &edited : edited_shaders) {
+ Ref<Resource> shader_res = edited.shader;
+ if (shader_res.is_null()) {
+ shader_res = edited.shader_inc;
+ }
+ ERR_FAIL_COND(shader_res.is_null());
+
+ if (!edited.shader_editor || !shader_res->is_built_in()) {
+ continue;
+ }
+
+ if (shader_res->get_path().get_slice("::", 0) == path) {
+ edited.shader_editor->tag_saved_version();
+ _update_shader_list();
+ }
+ }
+}
+
void ShaderEditorPlugin::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
EditorNode::get_singleton()->connect("resource_saved", callable_mp(this, &ShaderEditorPlugin::_resource_saved), CONNECT_DEFERRED);
EditorNode::get_singleton()->connect("scene_closed", callable_mp(this, &ShaderEditorPlugin::_close_builtin_shaders_from_scene));
FileSystemDock::get_singleton()->connect("file_removed", callable_mp(this, &ShaderEditorPlugin::_file_removed));
+ EditorNode::get_singleton()->connect("resource_saved", callable_mp(this, &ShaderEditorPlugin::_res_saved_callback));
} break;
}
}
diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h
index 84c5a620a7..2558184982 100644
--- a/editor/plugins/shader_editor_plugin.h
+++ b/editor/plugins/shader_editor_plugin.h
@@ -96,6 +96,7 @@ class ShaderEditorPlugin : public EditorPlugin {
void _close_shader(int p_index);
void _close_builtin_shaders_from_scene(const String &p_scene);
void _file_removed(const String &p_removed_file);
+ void _res_saved_callback(const Ref<Resource> &p_res);
void _shader_created(Ref<Shader> p_shader);
void _shader_include_created(Ref<ShaderInclude> p_shader_inc);
diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp
index 3804bd8d5b..b85099ca2e 100644
--- a/editor/pot_generator.cpp
+++ b/editor/pot_generator.cpp
@@ -32,6 +32,7 @@
#include "core/config/project_settings.h"
#include "core/error/error_macros.h"
+#include "editor/editor_translation.h"
#include "editor/editor_translation_parser.h"
#include "plugins/packed_scene_translation_parser_plugin.h"
@@ -65,6 +66,8 @@ void POTGenerator::generate_pot(const String &p_file) {
// Clear all_translation_strings of the previous round.
all_translation_strings.clear();
+ List<StringName> extractable_msgids = get_extractable_message_list();
+
// Collect all translatable strings according to files order in "POT Generation" setting.
for (int i = 0; i < files.size(); i++) {
Vector<String> msgids;
@@ -88,6 +91,12 @@ void POTGenerator::generate_pot(const String &p_file) {
}
}
+ if (GLOBAL_GET("internationalization/locale/translation_add_builtin_strings_to_pot")) {
+ for (int i = 0; i < extractable_msgids.size(); i++) {
+ _add_new_msgid(extractable_msgids[i], "", "", "");
+ }
+ }
+
_write_to_pot(p_file);
}
@@ -136,7 +145,9 @@ void POTGenerator::_write_to_pot(const String &p_file) {
// Write file locations.
for (const String &E : locations) {
- file->store_line("#: " + E.trim_prefix("res://").replace("\n", "\\n"));
+ if (!E.is_empty()) {
+ file->store_line("#: " + E.trim_prefix("res://").replace("\n", "\\n"));
+ }
}
// Write context.
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 6f7d571792..4187bf5a32 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -38,6 +38,7 @@
#include "core/io/stream_peer_tls.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
+#include "core/os/time.h"
#include "core/version.h"
#include "editor/editor_about.h"
#include "editor/editor_settings.h"
@@ -1350,7 +1351,13 @@ ProjectManager::ProjectManager() {
// Fade the version label to be less prominent, but still readable.
version_btn->set_self_modulate(Color(1, 1, 1, 0.6));
version_btn->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
- version_btn->set_tooltip_text(TTR("Click to copy the version information."));
+ String build_date;
+ if (VERSION_TIMESTAMP > 0) {
+ build_date = Time::get_singleton()->get_datetime_string_from_unix_time(VERSION_TIMESTAMP, true) + " UTC";
+ } else {
+ build_date = TTR("(unknown)");
+ }
+ version_btn->set_tooltip_text(vformat(TTR("Git commit date: %s\nClick to copy the version information."), build_date));
version_btn->connect("pressed", callable_mp(this, &ProjectManager::_version_button_pressed));
footer_bar->add_child(version_btn);
}
diff --git a/main/main.cpp b/main/main.cpp
index c520ebecd3..91ccbe6766 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -393,6 +393,23 @@ void finalize_theme_db() {
#define MAIN_PRINT(m_txt)
#endif
+void Main::print_header(bool p_rich) {
+ if (VERSION_TIMESTAMP > 0) {
+ // Version timestamp available.
+ if (p_rich) {
+ print_line_rich("\u001b[38;5;39m" + String(VERSION_NAME) + "\u001b[0m v" + get_full_version_string() + " (" + Time::get_singleton()->get_datetime_string_from_unix_time(VERSION_TIMESTAMP, true) + " UTC) - \u001b[4m" + String(VERSION_WEBSITE));
+ } else {
+ print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " (" + Time::get_singleton()->get_datetime_string_from_unix_time(VERSION_TIMESTAMP, true) + " UTC) - " + String(VERSION_WEBSITE));
+ }
+ } else {
+ if (p_rich) {
+ print_line_rich("\u001b[38;5;39m" + String(VERSION_NAME) + "\u001b[0m v" + get_full_version_string() + " - \u001b[4m" + String(VERSION_WEBSITE));
+ } else {
+ print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE));
+ }
+ }
+}
+
/**
* Prints a copyright notice in the command-line help with colored text. A newline is
* automatically added at the end.
@@ -463,7 +480,7 @@ void Main::print_help_option(const char *p_option, const char *p_description, CL
}
void Main::print_help(const char *p_binary) {
- print_line("\u001b[38;5;39m" + String(VERSION_NAME) + "\u001b[0m v" + get_full_version_string() + " - \u001b[4m" + String(VERSION_WEBSITE) + "\u001b[0m");
+ print_header(true);
print_help_copyright("Free and open source software under the terms of the MIT license.");
print_help_copyright("(c) 2014-present Godot Engine contributors. (c) 2007-present Juan Linietsky, Ariel Manzur.");
@@ -2468,8 +2485,8 @@ Error Main::setup2() {
Thread::make_main_thread(); // Make whatever thread call this the main thread.
set_current_thread_safe_for_nodes(true);
- // Print engine name and version
- Engine::get_singleton()->print_header(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE));
+ // Don't use rich formatting to prevent ANSI escape codes from being written to log files.
+ print_header(false);
#ifdef TOOLS_ENABLED
if (editor || project_manager || cmdline_tool) {
diff --git a/main/main.h b/main/main.h
index 09cc0feae6..062af73d57 100644
--- a/main/main.h
+++ b/main/main.h
@@ -46,6 +46,7 @@ class Main {
CLI_OPTION_AVAILABILITY_HIDDEN,
};
+ static void print_header(bool p_rich);
static void print_help_copyright(const char *p_notice);
static void print_help_title(const char *p_title);
static void print_help_option(const char *p_option, const char *p_description, CLIOptionAvailability p_availability = CLI_OPTION_AVAILABILITY_TEMPLATE_RELEASE);
diff --git a/methods.py b/methods.py
index 69d8df1d72..c85e6825da 100644
--- a/methods.py
+++ b/methods.py
@@ -209,6 +209,18 @@ def get_version_info(module_version_string="", silent=False):
githash = head
version_info["git_hash"] = githash
+ # Fallback to 0 as a timestamp (will be treated as "unknown" in the engine).
+ version_info["git_timestamp"] = 0
+
+ # Get the UNIX timestamp of the build commit.
+ if os.path.exists(".git"):
+ try:
+ version_info["git_timestamp"] = subprocess.check_output(
+ ["git", "log", "-1", "--pretty=format:%ct", githash]
+ ).decode("utf-8")
+ except (subprocess.CalledProcessError, OSError):
+ # `git` not found in PATH.
+ pass
return version_info
@@ -246,6 +258,7 @@ def generate_version_header(module_version_string=""):
"""/* THIS FILE IS GENERATED DO NOT EDIT */
#include "core/version.h"
const char *const VERSION_HASH = "{git_hash}";
+const uint64_t VERSION_TIMESTAMP = {git_timestamp};
""".format(
**version_info
)
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 4b009f1866..7ececce613 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -597,6 +597,17 @@
[/codeblock]
</description>
</annotation>
+ <annotation name="@export_storage">
+ <return type="void" />
+ <description>
+ Export a property with [constant PROPERTY_USAGE_STORAGE] flag. The property is not displayed in the editor, but it is serialized and stored in the scene or resource file. This can be useful for [annotation @tool] scripts. Also the property value is copied when [method Resource.duplicate] or [method Node.duplicate] is called, unlike non-exported variables.
+ [codeblock]
+ var a # Not stored in the file, not displayed in the editor.
+ @export_storage var b # Stored in the file, not displayed in the editor.
+ @export var c: int # Stored in the file, displayed in the editor.
+ [/codeblock]
+ </description>
+ </annotation>
<annotation name="@export_subgroup">
<return type="void" />
<param index="0" name="name" type="String" />
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index f63b2ce0ee..4d4eadf0fa 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -101,6 +101,7 @@ GDScriptParser::GDScriptParser() {
register_annotation(MethodInfo("@onready"), AnnotationInfo::VARIABLE, &GDScriptParser::onready_annotation);
// Export annotations.
register_annotation(MethodInfo("@export"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_NONE, Variant::NIL>);
+ register_annotation(MethodInfo("@export_storage"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_NONE, Variant::NIL>);
register_annotation(MethodInfo("@export_enum", PropertyInfo(Variant::STRING, "names")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_ENUM, Variant::NIL>, varray(), true);
register_annotation(MethodInfo("@export_file", PropertyInfo(Variant::STRING, "filter")), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_FILE, Variant::STRING>, varray(""), true);
register_annotation(MethodInfo("@export_dir"), AnnotationInfo::VARIABLE, &GDScriptParser::export_annotations<PROPERTY_HINT_DIR, Variant::STRING>);
@@ -4085,11 +4086,11 @@ bool GDScriptParser::export_annotations(const AnnotationNode *p_annotation, Node
}
hint_string += arg_string;
}
-
variable->export_info.hint_string = hint_string;
// This is called after the analyzer is done finding the type, so this should be set here.
DataType export_type = variable->get_datatype();
+ bool use_default_variable_type_check = true;
if (p_annotation->name == SNAME("@export_range")) {
if (export_type.builtin_type == Variant::INT) {
@@ -4121,11 +4122,9 @@ bool GDScriptParser::export_annotations(const AnnotationNode *p_annotation, Node
return true;
}
- }
+ } else if (p_annotation->name == SNAME("@export")) {
+ use_default_variable_type_check = false;
- // WARNING: Do not merge with the previous `else if`! Otherwise `else` (default variable type check)
- // will not work for the above annotations. `@export` and `@export_enum` validate the type separately.
- if (p_annotation->name == SNAME("@export")) {
if (variable->datatype_specifier == nullptr && variable->initializer == nullptr) {
push_error(R"(Cannot use simple "@export" annotation with variable without type or initializer, since type can't be inferred.)", p_annotation);
return false;
@@ -4243,6 +4242,8 @@ bool GDScriptParser::export_annotations(const AnnotationNode *p_annotation, Node
variable->export_info.type = Variant::ARRAY;
}
} else if (p_annotation->name == SNAME("@export_enum")) {
+ use_default_variable_type_check = false;
+
Variant::Type enum_type = Variant::INT;
if (export_type.kind == DataType::BUILTIN && export_type.builtin_type == Variant::STRING) {
@@ -4260,7 +4261,15 @@ bool GDScriptParser::export_annotations(const AnnotationNode *p_annotation, Node
push_error(vformat(R"("@export_enum" annotation requires a variable of type "int" or "String" but type "%s" was given instead.)", export_type.to_string()), variable);
return false;
}
- } else {
+ } else if (p_annotation->name == SNAME("@export_storage")) {
+ use_default_variable_type_check = false; // Can be applied to a variable of any type.
+
+ // Save the info because the compiler uses export info for overwriting member info.
+ variable->export_info = export_type.to_property_info(variable->identifier->name);
+ variable->export_info.usage |= PROPERTY_USAGE_STORAGE;
+ }
+
+ if (use_default_variable_type_check) {
// Validate variable type with export.
if (!export_type.is_variant() && (export_type.kind != DataType::BUILTIN || export_type.builtin_type != t_type)) {
// Allow float/int conversion.
diff --git a/modules/gdscript/tests/scripts/analyzer/features/export_enum_as_dictionary.gd b/modules/gdscript/tests/scripts/analyzer/features/export_enum_as_dictionary.gd
index dafd2ec0c8..39f490c4b3 100644
--- a/modules/gdscript/tests/scripts/analyzer/features/export_enum_as_dictionary.gd
+++ b/modules/gdscript/tests/scripts/analyzer/features/export_enum_as_dictionary.gd
@@ -4,14 +4,13 @@ enum MyEnum {A, B, C}
const Utils = preload("../../utils.notest.gd")
-@export var x1 = MyEnum
-@export var x2 = MyEnum.A
-@export var x3 := MyEnum
-@export var x4 := MyEnum.A
-@export var x5: MyEnum
+@export var test_1 = MyEnum
+@export var test_2 = MyEnum.A
+@export var test_3 := MyEnum
+@export var test_4 := MyEnum.A
+@export var test_5: MyEnum
func test():
for property in get_property_list():
- if property.usage & PROPERTY_USAGE_SCRIPT_VARIABLE:
- print(Utils.get_property_signature(property))
- print(" ", Utils.get_property_additional_info(property))
+ if str(property.name).begins_with("test_"):
+ Utils.print_property_extended_info(property)
diff --git a/modules/gdscript/tests/scripts/analyzer/features/export_enum_as_dictionary.out b/modules/gdscript/tests/scripts/analyzer/features/export_enum_as_dictionary.out
index f1a13f1045..505af5f1f3 100644
--- a/modules/gdscript/tests/scripts/analyzer/features/export_enum_as_dictionary.out
+++ b/modules/gdscript/tests/scripts/analyzer/features/export_enum_as_dictionary.out
@@ -1,11 +1,11 @@
GDTEST_OK
-@export var x1: Dictionary
+var test_1: Dictionary
hint=NONE hint_string="" usage=DEFAULT|SCRIPT_VARIABLE
-@export var x2: TestExportEnumAsDictionary.MyEnum
+var test_2: TestExportEnumAsDictionary.MyEnum
hint=ENUM hint_string="A:0,B:1,C:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM
-@export var x3: Dictionary
+var test_3: Dictionary
hint=NONE hint_string="" usage=DEFAULT|SCRIPT_VARIABLE
-@export var x4: TestExportEnumAsDictionary.MyEnum
+var test_4: TestExportEnumAsDictionary.MyEnum
hint=ENUM hint_string="A:0,B:1,C:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM
-@export var x5: TestExportEnumAsDictionary.MyEnum
+var test_5: TestExportEnumAsDictionary.MyEnum
hint=ENUM hint_string="A:0,B:1,C:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM
diff --git a/modules/gdscript/tests/scripts/parser/features/annotations.gd b/modules/gdscript/tests/scripts/parser/features/annotations.gd
index 13c89a0a09..7a7d6d953e 100644
--- a/modules/gdscript/tests/scripts/parser/features/annotations.gd
+++ b/modules/gdscript/tests/scripts/parser/features/annotations.gd
@@ -1,48 +1,49 @@
extends Node
-@export_enum("A", "B", "C") var a0
-@export_enum("A", "B", "C",) var a1
+const Utils = preload("../../utils.notest.gd")
+
+@export_enum("A", "B", "C") var test_1
+@export_enum("A", "B", "C",) var test_2
@export_enum(
"A",
"B",
"C"
-) var a2
+) var test_3
@export_enum(
"A",
"B",
"C",
-) var a3
+) var test_4
@export
-var a4: int
+var test_5: int
@export()
-var a5: int
+var test_6: int
-@export() var a6: int
-@warning_ignore("onready_with_export") @onready @export var a7: int
-@warning_ignore("onready_with_export") @onready() @export() var a8: int
+@export() var test_7: int = 42
+@warning_ignore("onready_with_export") @onready @export var test_8: int = 42
+@warning_ignore("onready_with_export") @onready() @export() var test_9: int = 42
@warning_ignore("onready_with_export")
@onready
@export
-var a9: int
+var test_10: int = 42
@warning_ignore("onready_with_export")
@onready()
@export()
-var a10: int
+var test_11: int = 42
@warning_ignore("onready_with_export")
@onready()
@export()
-var a11: int
-
+var test_12: int = 42
func test():
for property in get_property_list():
- if property.usage & PROPERTY_USAGE_SCRIPT_VARIABLE:
- print(property)
+ if str(property.name).begins_with("test_"):
+ Utils.print_property_extended_info(property, self)
diff --git a/modules/gdscript/tests/scripts/parser/features/annotations.out b/modules/gdscript/tests/scripts/parser/features/annotations.out
index 3af0436c53..2ba9dd7496 100644
--- a/modules/gdscript/tests/scripts/parser/features/annotations.out
+++ b/modules/gdscript/tests/scripts/parser/features/annotations.out
@@ -1,13 +1,25 @@
GDTEST_OK
-{ "name": "a0", "class_name": &"", "type": 2, "hint": 2, "hint_string": "A,B,C", "usage": 4102 }
-{ "name": "a1", "class_name": &"", "type": 2, "hint": 2, "hint_string": "A,B,C", "usage": 4102 }
-{ "name": "a2", "class_name": &"", "type": 2, "hint": 2, "hint_string": "A,B,C", "usage": 4102 }
-{ "name": "a3", "class_name": &"", "type": 2, "hint": 2, "hint_string": "A,B,C", "usage": 4102 }
-{ "name": "a4", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
-{ "name": "a5", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
-{ "name": "a6", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
-{ "name": "a7", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
-{ "name": "a8", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
-{ "name": "a9", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
-{ "name": "a10", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
-{ "name": "a11", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
+var test_1: int = null
+ hint=ENUM hint_string="A,B,C" usage=DEFAULT|SCRIPT_VARIABLE
+var test_2: int = null
+ hint=ENUM hint_string="A,B,C" usage=DEFAULT|SCRIPT_VARIABLE
+var test_3: int = null
+ hint=ENUM hint_string="A,B,C" usage=DEFAULT|SCRIPT_VARIABLE
+var test_4: int = null
+ hint=ENUM hint_string="A,B,C" usage=DEFAULT|SCRIPT_VARIABLE
+var test_5: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+var test_6: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+var test_7: int = 42
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+var test_8: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+var test_9: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+var test_10: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+var test_11: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+var test_12: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
diff --git a/modules/gdscript/tests/scripts/parser/features/export_enum.gd b/modules/gdscript/tests/scripts/parser/features/export_enum.gd
index 9b2c22dea1..4f2a43f4fe 100644
--- a/modules/gdscript/tests/scripts/parser/features/export_enum.gd
+++ b/modules/gdscript/tests/scripts/parser/features/export_enum.gd
@@ -1,15 +1,16 @@
-@export_enum("Red", "Green", "Blue") var untyped
+const Utils = preload("../../utils.notest.gd")
-@export_enum("Red", "Green", "Blue") var weak_int = 0
-@export_enum("Red", "Green", "Blue") var weak_string = ""
+@export_enum("Red", "Green", "Blue") var test_untyped
-@export_enum("Red", "Green", "Blue") var hard_int: int
-@export_enum("Red", "Green", "Blue") var hard_string: String
+@export_enum("Red", "Green", "Blue") var test_weak_int = 0
+@export_enum("Red", "Green", "Blue") var test_weak_string = ""
-@export_enum("Red:10", "Green:20", "Blue:30") var with_values
+@export_enum("Red", "Green", "Blue") var test_hard_int: int
+@export_enum("Red", "Green", "Blue") var test_hard_string: String
+
+@export_enum("Red:10", "Green:20", "Blue:30") var test_with_values
func test():
for property in get_property_list():
- if property.name in ["untyped", "weak_int", "weak_string", "hard_int",
- "hard_string", "with_values"]:
- prints(property.name, property.type, property.hint_string)
+ if str(property.name).begins_with("test_"):
+ Utils.print_property_extended_info(property, self)
diff --git a/modules/gdscript/tests/scripts/parser/features/export_enum.out b/modules/gdscript/tests/scripts/parser/features/export_enum.out
index 330b7eaf01..43f5e197ad 100644
--- a/modules/gdscript/tests/scripts/parser/features/export_enum.out
+++ b/modules/gdscript/tests/scripts/parser/features/export_enum.out
@@ -1,7 +1,13 @@
GDTEST_OK
-untyped 2 Red,Green,Blue
-weak_int 2 Red,Green,Blue
-weak_string 4 Red,Green,Blue
-hard_int 2 Red,Green,Blue
-hard_string 4 Red,Green,Blue
-with_values 2 Red:10,Green:20,Blue:30
+var test_untyped: int = null
+ hint=ENUM hint_string="Red,Green,Blue" usage=DEFAULT|SCRIPT_VARIABLE
+var test_weak_int: int = 0
+ hint=ENUM hint_string="Red,Green,Blue" usage=DEFAULT|SCRIPT_VARIABLE
+var test_weak_string: String = ""
+ hint=ENUM hint_string="Red,Green,Blue" usage=DEFAULT|SCRIPT_VARIABLE
+var test_hard_int: int = 0
+ hint=ENUM hint_string="Red,Green,Blue" usage=DEFAULT|SCRIPT_VARIABLE
+var test_hard_string: String = ""
+ hint=ENUM hint_string="Red,Green,Blue" usage=DEFAULT|SCRIPT_VARIABLE
+var test_with_values: int = null
+ hint=ENUM hint_string="Red:10,Green:20,Blue:30" usage=DEFAULT|SCRIPT_VARIABLE
diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable.gd b/modules/gdscript/tests/scripts/parser/features/export_variable.gd
index c9d05a7e68..2a218774de 100644
--- a/modules/gdscript/tests/scripts/parser/features/export_variable.gd
+++ b/modules/gdscript/tests/scripts/parser/features/export_variable.gd
@@ -1,23 +1,22 @@
extends Node
-@export var example = 99
-@export_range(0, 100) var example_range = 100
-@export_range(0, 100, 1) var example_range_step = 101
-@export_range(0, 100, 1, "or_greater") var example_range_step_or_greater = 102
+const Utils = preload("../../utils.notest.gd")
-@export var color: Color
-@export_color_no_alpha var color_no_alpha: Color
-@export_node_path("Sprite2D", "Sprite3D", "Control", "Node") var nodepath := ^"hello"
-@export var node: Node
-@export var node_array: Array[Node]
+@export var test_weak_int = 1
+@export var test_hard_int: int = 2
+@export_storage var test_storage_untyped
+@export_storage var test_storage_weak_int = 3 # Property info still `Variant`, unlike `@export`.
+@export_storage var test_storage_hard_int: int = 4
+@export_range(0, 100) var test_range = 100
+@export_range(0, 100, 1) var test_range_step = 101
+@export_range(0, 100, 1, "or_greater") var test_range_step_or_greater = 102
+@export var test_color: Color
+@export_color_no_alpha var test_color_no_alpha: Color
+@export_node_path("Sprite2D", "Sprite3D", "Control", "Node") var test_node_path := ^"hello"
+@export var test_node: Node
+@export var test_node_array: Array[Node]
func test():
- print(example)
- print(example_range)
- print(example_range_step)
- print(example_range_step_or_greater)
- print(color)
- print(color_no_alpha)
- print(nodepath)
- print(node)
- print(var_to_str(node_array))
+ for property in get_property_list():
+ if str(property.name).begins_with("test_"):
+ Utils.print_property_extended_info(property, self)
diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable.out b/modules/gdscript/tests/scripts/parser/features/export_variable.out
index 5430c975f4..baadcd4ee8 100644
--- a/modules/gdscript/tests/scripts/parser/features/export_variable.out
+++ b/modules/gdscript/tests/scripts/parser/features/export_variable.out
@@ -1,10 +1,27 @@
GDTEST_OK
-99
-100
-101
-102
-(0, 0, 0, 1)
-(0, 0, 0, 1)
-hello
-<null>
-Array[Node]([])
+var test_weak_int: int = 1
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+var test_hard_int: int = 2
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+var test_storage_untyped: Variant = null
+ hint=NONE hint_string="" usage=STORAGE|SCRIPT_VARIABLE|NIL_IS_VARIANT
+var test_storage_weak_int: Variant = 3
+ hint=NONE hint_string="" usage=STORAGE|SCRIPT_VARIABLE|NIL_IS_VARIANT
+var test_storage_hard_int: int = 4
+ hint=NONE hint_string="" usage=STORAGE|SCRIPT_VARIABLE
+var test_range: int = 100
+ hint=RANGE hint_string="0,100" usage=DEFAULT|SCRIPT_VARIABLE
+var test_range_step: int = 101
+ hint=RANGE hint_string="0,100,1" usage=DEFAULT|SCRIPT_VARIABLE
+var test_range_step_or_greater: int = 102
+ hint=RANGE hint_string="0,100,1,or_greater" usage=DEFAULT|SCRIPT_VARIABLE
+var test_color: Color = Color(0, 0, 0, 1)
+ hint=NONE hint_string="Color" usage=DEFAULT|SCRIPT_VARIABLE
+var test_color_no_alpha: Color = Color(0, 0, 0, 1)
+ hint=COLOR_NO_ALPHA hint_string="" usage=DEFAULT|SCRIPT_VARIABLE
+var test_node_path: NodePath = NodePath("hello")
+ hint=NODE_PATH_VALID_TYPES hint_string="Sprite2D,Sprite3D,Control,Node" usage=DEFAULT|SCRIPT_VARIABLE
+var test_node: Node = null
+ hint=NODE_TYPE hint_string="Node" usage=DEFAULT|SCRIPT_VARIABLE
+var test_node_array: Array = Array[Node]([])
+ hint=TYPE_STRING hint_string="24/34:Node" usage=DEFAULT|SCRIPT_VARIABLE
diff --git a/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd
index e46f24cc5f..0133d7fcfc 100644
--- a/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd
+++ b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.gd
@@ -1,17 +1,17 @@
-extends RefCounted # TODO: Fix standalone annotations parsing.
+const Utils = preload("../../utils.notest.gd")
# GH-73843
@export_group("Resource")
# GH-78252
-@export var prop_1: int
-@export_category("prop_1")
-@export var prop_2: int
+@export var test_1: int
+@export_category("test_1")
+@export var test_2: int
func test():
var resource := Resource.new()
prints("Not shadowed:", resource.get_class())
for property in get_property_list():
- if property.name in ["prop_1", "prop_2"]:
- print(property)
+ if str(property.name).begins_with("test_"):
+ Utils.print_property_extended_info(property, self)
diff --git a/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out
index 96ae84e986..9387ec50d7 100644
--- a/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out
+++ b/modules/gdscript/tests/scripts/runtime/features/export_group_no_name_conflict_with_properties.out
@@ -1,5 +1,8 @@
GDTEST_OK
Not shadowed: Resource
-{ "name": "prop_1", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
-{ "name": "prop_1", "class_name": &"", "type": 0, "hint": 0, "hint_string": "", "usage": 128 }
-{ "name": "prop_2", "class_name": &"", "type": 2, "hint": 0, "hint_string": "int", "usage": 4102 }
+var test_1: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
+@export_category("test_1")
+ hint=NONE hint_string="" usage=CATEGORY
+var test_2: int = 0
+ hint=NONE hint_string="int" usage=DEFAULT|SCRIPT_VARIABLE
diff --git a/modules/gdscript/tests/scripts/runtime/features/member_info.gd b/modules/gdscript/tests/scripts/runtime/features/member_info.gd
index 805ea42455..6fe9647b4d 100644
--- a/modules/gdscript/tests/scripts/runtime/features/member_info.gd
+++ b/modules/gdscript/tests/scripts/runtime/features/member_info.gd
@@ -60,7 +60,7 @@ func test():
var script: Script = get_script()
for property in script.get_property_list():
if str(property.name).begins_with("test_"):
- print(Utils.get_property_signature(property, true))
+ print(Utils.get_property_signature(property, null, true))
for property in get_property_list():
if str(property.name).begins_with("test_"):
print(Utils.get_property_signature(property))
diff --git a/modules/gdscript/tests/scripts/runtime/features/member_info.out b/modules/gdscript/tests/scripts/runtime/features/member_info.out
index 3a91507da9..7c826ac05a 100644
--- a/modules/gdscript/tests/scripts/runtime/features/member_info.out
+++ b/modules/gdscript/tests/scripts/runtime/features/member_info.out
@@ -6,13 +6,13 @@ static var test_static_var_hard_int: int
var test_var_untyped: Variant
var test_var_weak_null: Variant
var test_var_weak_int: Variant
-@export var test_var_weak_int_exported: int
+var test_var_weak_int_exported: int
var test_var_weak_variant_type: Variant
-@export var test_var_weak_variant_type_exported: Variant.Type
+var test_var_weak_variant_type_exported: Variant.Type
var test_var_hard_variant: Variant
var test_var_hard_int: int
var test_var_hard_variant_type: Variant.Type
-@export var test_var_hard_variant_type_exported: Variant.Type
+var test_var_hard_variant_type_exported: Variant.Type
var test_var_hard_node_process_mode: Node.ProcessMode
var test_var_hard_my_enum: TestMemberInfo.MyEnum
var test_var_hard_array: Array
diff --git a/modules/gdscript/tests/scripts/runtime/features/member_info_inheritance.gd b/modules/gdscript/tests/scripts/runtime/features/member_info_inheritance.gd
index d0cbeeab85..563c6ce569 100644
--- a/modules/gdscript/tests/scripts/runtime/features/member_info_inheritance.gd
+++ b/modules/gdscript/tests/scripts/runtime/features/member_info_inheritance.gd
@@ -30,7 +30,7 @@ func test():
var b := B.new()
for property in (B as GDScript).get_property_list():
if str(property.name).begins_with("test_"):
- print(Utils.get_property_signature(property, true))
+ print(Utils.get_property_signature(property, null, true))
print("---")
for property in b.get_property_list():
if str(property.name).begins_with("test_"):
diff --git a/modules/gdscript/tests/scripts/utils.notest.gd b/modules/gdscript/tests/scripts/utils.notest.gd
index 781843b8e2..31818c9d01 100644
--- a/modules/gdscript/tests/scripts/utils.notest.gd
+++ b/modules/gdscript/tests/scripts/utils.notest.gd
@@ -20,24 +20,32 @@ static func get_type(property: Dictionary, is_return: bool = false) -> String:
return type_string(property.type)
-static func get_property_signature(property: Dictionary, is_static: bool = false) -> String:
+static func get_property_signature(property: Dictionary, base: Object = null, is_static: bool = false) -> String:
+ if property.usage & PROPERTY_USAGE_CATEGORY:
+ return '@export_category("%s")' % str(property.name).c_escape()
+ if property.usage & PROPERTY_USAGE_GROUP:
+ return '@export_group("%s")' % str(property.name).c_escape()
+ if property.usage & PROPERTY_USAGE_SUBGROUP:
+ return '@export_subgroup("%s")' % str(property.name).c_escape()
+
var result: String = ""
if not (property.usage & PROPERTY_USAGE_SCRIPT_VARIABLE):
printerr("Missing `PROPERTY_USAGE_SCRIPT_VARIABLE` flag.")
- if property.usage & PROPERTY_USAGE_DEFAULT:
- result += "@export "
if is_static:
result += "static "
result += "var " + property.name + ": " + get_type(property)
+ if is_instance_valid(base):
+ result += " = " + var_to_str(base.get(property.name))
return result
-static func get_property_additional_info(property: Dictionary) -> String:
- return 'hint=%s hint_string="%s" usage=%s' % [
+static func print_property_extended_info(property: Dictionary, base: Object = null, is_static: bool = false) -> void:
+ print(get_property_signature(property, base, is_static))
+ print(' hint=%s hint_string="%s" usage=%s' % [
get_property_hint_name(property.hint).trim_prefix("PROPERTY_HINT_"),
str(property.hint_string).c_escape(),
get_property_usage_string(property.usage).replace("PROPERTY_USAGE_", ""),
- ]
+ ])
static func get_method_signature(method: Dictionary, is_signal: bool = false) -> String:
@@ -153,7 +161,6 @@ static func get_property_usage_string(usage: int) -> String:
return "PROPERTY_USAGE_NONE"
const FLAGS: Array[Array] = [
- [PROPERTY_USAGE_DEFAULT, "PROPERTY_USAGE_DEFAULT"],
[PROPERTY_USAGE_STORAGE, "PROPERTY_USAGE_STORAGE"],
[PROPERTY_USAGE_EDITOR, "PROPERTY_USAGE_EDITOR"],
[PROPERTY_USAGE_INTERNAL, "PROPERTY_USAGE_INTERNAL"],
@@ -187,6 +194,10 @@ static func get_property_usage_string(usage: int) -> String:
var result: String = ""
+ if (usage & PROPERTY_USAGE_DEFAULT) == PROPERTY_USAGE_DEFAULT:
+ result += "PROPERTY_USAGE_DEFAULT|"
+ usage &= ~PROPERTY_USAGE_DEFAULT
+
for flag in FLAGS:
if usage & flag[0]:
result += flag[1] + "|"
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 0ed2100041..eece6afdcc 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -2796,7 +2796,7 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> p_state) {
Vector<Vector3> normals = array[Mesh::ARRAY_NORMAL];
for (int k = 0; k < vertex_num; k++) {
- Vector3 tan = Vector3(normals[i].z, -normals[i].x, normals[i].y).cross(normals[k].normalized()).normalized();
+ Vector3 tan = Vector3(normals[k].z, -normals[k].x, normals[k].y).cross(normals[k].normalized()).normalized();
tangentsw[k * 4 + 0] = tan.x;
tangentsw[k * 4 + 1] = tan.y;
tangentsw[k * 4 + 2] = tan.z;
diff --git a/modules/mono/.editorconfig b/modules/mono/.editorconfig
index db8fb2921c..1e5ae28396 100644
--- a/modules/mono/.editorconfig
+++ b/modules/mono/.editorconfig
@@ -13,22 +13,59 @@ trim_trailing_whitespace = true
max_line_length = 120
csharp_indent_case_contents_when_block = false
-[*.cs]
-# CA1707: Identifiers should not contain underscores
-# TODO:
-# Maybe we could disable this selectively only
-# where it's not desired and for generated code.
-dotnet_diagnostic.CA1707.severity = none
-# CA1711: Identifiers should not have incorrect suffix
-# Disable warning for suffixes like EventHandler, Flags, Enum, etc.
-dotnet_diagnostic.CA1711.severity = none
-# CA1716: Identifiers should not match keywords
-# TODO: We should look into this.
-dotnet_diagnostic.CA1716.severity = warning
-# CA1720: Identifiers should not contain type names
-dotnet_diagnostic.CA1720.severity = none
-# CA1805: Do not initialize unnecessarily
-# Don't tell me what to do.
-dotnet_diagnostic.CA1805.severity = none
+csharp_new_line_before_open_brace = all
+csharp_new_line_before_else = true
+csharp_new_line_before_catch = true
+csharp_new_line_before_finally = true
+csharp_new_line_before_members_in_object_initializers = true
+csharp_new_line_before_members_in_anonymous_types = true
+
+dotnet_style_require_accessibility_modifiers = always
+
# Diagnostics to prevent defensive copies of `in` struct parameters
resharper_possibly_impure_method_call_on_readonly_variable_highlighting = error
+
+# IDE0040: Add accessibility modifiers
+dotnet_diagnostic.IDE0040.severity = warning
+
+# IDE1006: Naming rule violation
+dotnet_diagnostic.IDE1006.severity = suggestion
+
+# Severity levels for dotnet_naming_rule only affect IDE environments.
+# To have them extra visible to people, we can set them as 'warning' here without affecting compilation.
+
+# Everything should be PascalCase by default
+dotnet_naming_rule.all_should_be_camel_case.severity = warning
+dotnet_naming_rule.all_should_be_camel_case.symbols = all
+dotnet_naming_rule.all_should_be_camel_case.style = pascal_case_style
+# Non-public fields should be _camelCase
+dotnet_naming_rule.non_public_fields_should_be_underscore_camel_case.severity = warning
+dotnet_naming_rule.non_public_fields_should_be_underscore_camel_case.symbols = non_public_fields
+dotnet_naming_rule.non_public_fields_should_be_underscore_camel_case.style = underscore_camel_case_style
+# Constant fields (and local vars) should be PascalCase
+dotnet_naming_rule.constants_should_be_pascal_case.severity = warning
+dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
+dotnet_naming_rule.constants_should_be_pascal_case.style = pascal_case_style
+# Locals variables should be camelCase
+dotnet_naming_rule.local_vars_should_be_camel_case.severity = warning
+dotnet_naming_rule.local_vars_should_be_camel_case.symbols = local_vars
+dotnet_naming_rule.local_vars_should_be_camel_case.style = camel_case_style
+# Parameters should be camelCase
+dotnet_naming_rule.parameters_should_be_camel_case.severity = warning
+dotnet_naming_rule.parameters_should_be_camel_case.symbols = parameters
+dotnet_naming_rule.parameters_should_be_camel_case.style = camel_case_style
+
+dotnet_naming_symbols.all.applicable_kinds = *
+dotnet_naming_symbols.local_vars.applicable_kinds = local
+dotnet_naming_symbols.parameters.applicable_kinds = parameter
+dotnet_naming_symbols.constants.applicable_kinds = field, local
+dotnet_naming_symbols.constants.required_modifiers = const
+dotnet_naming_symbols.non_public_fields.applicable_kinds = field
+dotnet_naming_symbols.non_public_fields.applicable_accessibilities = private, protected, private_protected
+
+dotnet_naming_style.camel_case_style.capitalization = camel_case
+dotnet_naming_style.camel_case_style.required_prefix =
+dotnet_naming_style.underscore_camel_case_style.capitalization = camel_case
+dotnet_naming_style.underscore_camel_case_style.required_prefix = _
+dotnet_naming_style.pascal_case_style.capitalization = pascal_case
+dotnet_naming_style.pascal_case_style.required_prefix =
diff --git a/modules/mono/build_scripts/build_assemblies.py b/modules/mono/build_scripts/build_assemblies.py
index 90a517cc40..aa6f6ef05e 100755
--- a/modules/mono/build_scripts/build_assemblies.py
+++ b/modules/mono/build_scripts/build_assemblies.py
@@ -312,7 +312,7 @@ def generate_sdk_package_versions():
)
# We write in ../SdkPackageVersions.props.
- with open(os.path.join(dirname(script_path), "SdkPackageVersions.props"), "w") as f:
+ with open(os.path.join(dirname(script_path), "SdkPackageVersions.props"), "w", encoding="utf-8") as f:
f.write(props)
f.close()
@@ -320,6 +320,8 @@ def generate_sdk_package_versions():
constants = """namespace Godot.SourceGenerators
{{
+// TODO: This is currently disabled because of https://github.com/dotnet/roslyn/issues/52904
+#pragma warning disable IDE0040 // Add accessibility modifiers.
partial class Common
{{
public const string VersionDocsUrl = "https://docs.godotengine.org/en/{docs_branch}";
@@ -338,7 +340,7 @@ def generate_sdk_package_versions():
)
os.makedirs(generators_dir, exist_ok=True)
- with open(os.path.join(generators_dir, "Common.Constants.cs"), "w") as f:
+ with open(os.path.join(generators_dir, "Common.Constants.cs"), "w", newline="\n", encoding="utf-8") as f:
f.write(constants)
f.close()
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Bar.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Bar.cs
index 2d797e2f46..bf37651787 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Bar.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Bar.cs
@@ -1,15 +1,15 @@
namespace Godot.SourceGenerators.Sample
{
- partial class Bar : GodotObject
+ public partial class Bar : GodotObject
{
}
// Foo in another file
- partial class Foo
+ public partial class Foo
{
}
- partial class NotSameNameAsFile : GodotObject
+ public partial class NotSameNameAsFile : GodotObject
{
}
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ExportedFields.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ExportedFields.cs
index 31e66ac306..c9e504fec7 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ExportedFields.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ExportedFields.cs
@@ -13,106 +13,106 @@ namespace Godot.SourceGenerators.Sample
[SuppressMessage("ReSharper", "InconsistentNaming")]
public partial class ExportedFields : GodotObject
{
- [Export] private Boolean field_Boolean = true;
- [Export] private Char field_Char = 'f';
- [Export] private SByte field_SByte = 10;
- [Export] private Int16 field_Int16 = 10;
- [Export] private Int32 field_Int32 = 10;
- [Export] private Int64 field_Int64 = 10;
- [Export] private Byte field_Byte = 10;
- [Export] private UInt16 field_UInt16 = 10;
- [Export] private UInt32 field_UInt32 = 10;
- [Export] private UInt64 field_UInt64 = 10;
- [Export] private Single field_Single = 10;
- [Export] private Double field_Double = 10;
- [Export] private String field_String = "foo";
+ [Export] private Boolean _fieldBoolean = true;
+ [Export] private Char _fieldChar = 'f';
+ [Export] private SByte _fieldSByte = 10;
+ [Export] private Int16 _fieldInt16 = 10;
+ [Export] private Int32 _fieldInt32 = 10;
+ [Export] private Int64 _fieldInt64 = 10;
+ [Export] private Byte _fieldByte = 10;
+ [Export] private UInt16 _fieldUInt16 = 10;
+ [Export] private UInt32 _fieldUInt32 = 10;
+ [Export] private UInt64 _fieldUInt64 = 10;
+ [Export] private Single _fieldSingle = 10;
+ [Export] private Double _fieldDouble = 10;
+ [Export] private String _fieldString = "foo";
// Godot structs
- [Export] private Vector2 field_Vector2 = new(10f, 10f);
- [Export] private Vector2I field_Vector2I = Vector2I.Up;
- [Export] private Rect2 field_Rect2 = new(new Vector2(10f, 10f), new Vector2(10f, 10f));
- [Export] private Rect2I field_Rect2I = new(new Vector2I(10, 10), new Vector2I(10, 10));
- [Export] private Transform2D field_Transform2D = Transform2D.Identity;
- [Export] private Vector3 field_Vector3 = new(10f, 10f, 10f);
- [Export] private Vector3I field_Vector3I = Vector3I.Back;
- [Export] private Basis field_Basis = new Basis(Quaternion.Identity);
- [Export] private Quaternion field_Quaternion = new Quaternion(Basis.Identity);
- [Export] private Transform3D field_Transform3D = Transform3D.Identity;
- [Export] private Vector4 field_Vector4 = new(10f, 10f, 10f, 10f);
- [Export] private Vector4I field_Vector4I = Vector4I.One;
- [Export] private Projection field_Projection = Projection.Identity;
- [Export] private Aabb field_Aabb = new Aabb(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
- [Export] private Color field_Color = Colors.Aquamarine;
- [Export] private Plane field_Plane = Plane.PlaneXZ;
- [Export] private Callable field_Callable = new Callable(Engine.GetMainLoop(), "_process");
- [Export] private Signal field_Signal = new Signal(Engine.GetMainLoop(), "property_list_changed");
+ [Export] private Vector2 _fieldVector2 = new(10f, 10f);
+ [Export] private Vector2I _fieldVector2I = Vector2I.Up;
+ [Export] private Rect2 _fieldRect2 = new(new Vector2(10f, 10f), new Vector2(10f, 10f));
+ [Export] private Rect2I _fieldRect2I = new(new Vector2I(10, 10), new Vector2I(10, 10));
+ [Export] private Transform2D _fieldTransform2D = Transform2D.Identity;
+ [Export] private Vector3 _fieldVector3 = new(10f, 10f, 10f);
+ [Export] private Vector3I _fieldVector3I = Vector3I.Back;
+ [Export] private Basis _fieldBasis = new Basis(Quaternion.Identity);
+ [Export] private Quaternion _fieldQuaternion = new Quaternion(Basis.Identity);
+ [Export] private Transform3D _fieldTransform3D = Transform3D.Identity;
+ [Export] private Vector4 _fieldVector4 = new(10f, 10f, 10f, 10f);
+ [Export] private Vector4I _fieldVector4I = Vector4I.One;
+ [Export] private Projection _fieldProjection = Projection.Identity;
+ [Export] private Aabb _fieldAabb = new Aabb(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
+ [Export] private Color _fieldColor = Colors.Aquamarine;
+ [Export] private Plane _fieldPlane = Plane.PlaneXZ;
+ [Export] private Callable _fieldCallable = new Callable(Engine.GetMainLoop(), "_process");
+ [Export] private Signal _fieldSignal = new Signal(Engine.GetMainLoop(), "property_list_changed");
// Enums
[SuppressMessage("ReSharper", "UnusedMember.Local")]
- enum MyEnum
+ public enum MyEnum
{
A,
B,
C
}
- [Export] private MyEnum field_Enum = MyEnum.C;
+ [Export] private MyEnum _fieldEnum = MyEnum.C;
[Flags]
[SuppressMessage("ReSharper", "UnusedMember.Local")]
- enum MyFlagsEnum
+ public enum MyFlagsEnum
{
A,
B,
C
}
- [Export] private MyFlagsEnum field_FlagsEnum = MyFlagsEnum.C;
+ [Export] private MyFlagsEnum _fieldFlagsEnum = MyFlagsEnum.C;
// Arrays
- [Export] private Byte[] field_ByteArray = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Int32[] field_Int32Array = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Int64[] field_Int64Array = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Single[] field_SingleArray = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
- [Export] private Double[] field_DoubleArray = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
- [Export] private String[] field_StringArray = { "foo", "bar" };
- [Export(PropertyHint.Enum, "A,B,C")] private String[] field_StringArrayEnum = { "foo", "bar" };
- [Export] private Vector2[] field_Vector2Array = { Vector2.Up, Vector2.Down, Vector2.Left, Vector2.Right };
- [Export] private Vector3[] field_Vector3Array = { Vector3.Up, Vector3.Down, Vector3.Left, Vector3.Right };
- [Export] private Color[] field_ColorArray = { Colors.Aqua, Colors.Aquamarine, Colors.Azure, Colors.Beige };
- [Export] private GodotObject[] field_GodotObjectOrDerivedArray = { null };
- [Export] private StringName[] field_StringNameArray = { "foo", "bar" };
- [Export] private NodePath[] field_NodePathArray = { "foo", "bar" };
- [Export] private Rid[] field_RidArray = { default, default, default };
+ [Export] private Byte[] _fieldByteArray = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Int32[] _fieldInt32Array = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Int64[] _fieldInt64Array = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Single[] _fieldSingleArray = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
+ [Export] private Double[] _fieldDoubleArray = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
+ [Export] private String[] _fieldStringArray = { "foo", "bar" };
+ [Export(PropertyHint.Enum, "A,B,C")] private String[] _fieldStringArrayEnum = { "foo", "bar" };
+ [Export] private Vector2[] _fieldVector2Array = { Vector2.Up, Vector2.Down, Vector2.Left, Vector2.Right };
+ [Export] private Vector3[] _fieldVector3Array = { Vector3.Up, Vector3.Down, Vector3.Left, Vector3.Right };
+ [Export] private Color[] _fieldColorArray = { Colors.Aqua, Colors.Aquamarine, Colors.Azure, Colors.Beige };
+ [Export] private GodotObject[] _fieldGodotObjectOrDerivedArray = { null };
+ [Export] private StringName[] _fieldStringNameArray = { "foo", "bar" };
+ [Export] private NodePath[] _fieldNodePathArray = { "foo", "bar" };
+ [Export] private Rid[] _fieldRidArray = { default, default, default };
// Note we use Array and not System.Array. This tests the generated namespace qualification.
- [Export] private Int32[] field_empty_Int32Array = Array.Empty<Int32>();
+ [Export] private Int32[] _fieldEmptyInt32Array = Array.Empty<Int32>();
// Note we use List and not System.Collections.Generic.
- [Export] private int[] field_array_from_list = new List<int>(Array.Empty<int>()).ToArray();
+ [Export] private int[] _fieldArrayFromList = new List<int>(Array.Empty<int>()).ToArray();
// Variant
- [Export] private Variant field_Variant = "foo";
+ [Export] private Variant _fieldVariant = "foo";
// Classes
- [Export] private GodotObject field_GodotObjectOrDerived;
- [Export] private Godot.Texture field_GodotResourceTexture;
- [Export] private StringName field_StringName = new StringName("foo");
- [Export] private NodePath field_NodePath = new NodePath("foo");
- [Export] private Rid field_Rid;
+ [Export] private GodotObject _fieldGodotObjectOrDerived;
+ [Export] private Godot.Texture _fieldGodotResourceTexture;
+ [Export] private StringName _fieldStringName = new StringName("foo");
+ [Export] private NodePath _fieldNodePath = new NodePath("foo");
+ [Export] private Rid _fieldRid;
[Export]
- private Godot.Collections.Dictionary field_GodotDictionary =
+ private Godot.Collections.Dictionary _fieldGodotDictionary =
new() { { "foo", 10 }, { Vector2.Up, Colors.Chocolate } };
[Export]
- private Godot.Collections.Array field_GodotArray =
+ private Godot.Collections.Array _fieldGodotArray =
new() { "foo", 10, Vector2.Up, Colors.Chocolate };
[Export]
- private Godot.Collections.Dictionary<string, bool> field_GodotGenericDictionary =
+ private Godot.Collections.Dictionary<string, bool> _fieldGodotGenericDictionary =
new() { { "foo", true }, { "bar", false } };
[Export]
- private Godot.Collections.Array<int> field_GodotGenericArray =
+ private Godot.Collections.Array<int> _fieldGodotGenericArray =
new() { 0, 1, 2, 3, 4, 5, 6 };
}
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ExportedProperties.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ExportedProperties.cs
index aef2a8824e..91f33383ab 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ExportedProperties.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ExportedProperties.cs
@@ -13,41 +13,41 @@ namespace Godot.SourceGenerators.Sample
public partial class ExportedProperties : GodotObject
{
// Do not generate default value
- private String _notGenerate_Property_String = new string("not generate");
+ private String _notGeneratePropertyString = new string("not generate");
[Export]
- public String NotGenerate_Complex_Lamda_Property
+ public String NotGenerateComplexLambdaProperty
{
- get => _notGenerate_Property_String + Convert.ToInt32("1");
- set => _notGenerate_Property_String = value;
+ get => _notGeneratePropertyString + Convert.ToInt32("1");
+ set => _notGeneratePropertyString = value;
}
[Export]
- public String NotGenerate_Lamda_NoField_Property
+ public String NotGenerateLambdaNoFieldProperty
{
get => new string("not generate");
- set => _notGenerate_Property_String = value;
+ set => _notGeneratePropertyString = value;
}
[Export]
- public String NotGenerate_Complex_Return_Property
+ public String NotGenerateComplexReturnProperty
{
get
{
- return _notGenerate_Property_String + Convert.ToInt32("1");
+ return _notGeneratePropertyString + Convert.ToInt32("1");
}
set
{
- _notGenerate_Property_String = value;
+ _notGeneratePropertyString = value;
}
}
- private int _notGenerate_Property_Int = 1;
+ private int _notGeneratePropertyInt = 1;
[Export]
public string NotGenerate_Returns_Property
{
get
{
- if (_notGenerate_Property_Int == 1)
+ if (_notGeneratePropertyInt == 1)
{
return "a";
}
@@ -58,145 +58,145 @@ namespace Godot.SourceGenerators.Sample
}
set
{
- _notGenerate_Property_Int = value == "a" ? 1 : 2;
+ _notGeneratePropertyInt = value == "a" ? 1 : 2;
}
}
// Full Property
- private String _fullProperty_String = "FullProperty_String";
+ private String _fullPropertyString = "FullPropertyString";
[Export]
- public String FullProperty_String
+ public String FullPropertyString
{
get
{
- return _fullProperty_String;
+ return _fullPropertyString;
}
set
{
- _fullProperty_String = value;
+ _fullPropertyString = value;
}
}
- private String _fullProperty_String_Complex = new string("FullProperty_String_Complex") + Convert.ToInt32("1");
+ private String _fullPropertyStringComplex = new string("FullPropertyString_Complex") + Convert.ToInt32("1");
[Export]
- public String FullProperty_String_Complex
+ public String FullPropertyStringComplex
{
get
{
- return _fullProperty_String_Complex;
+ return _fullPropertyStringComplex;
}
set
{
- _fullProperty_String_Complex = value;
+ _fullPropertyStringComplex = value;
}
}
// Lambda Property
- private String _lamdaProperty_String = "LamdaProperty_String";
+ private String _lamdaPropertyString = "LamdaPropertyString";
[Export]
- public String LamdaProperty_String
+ public String LamdaPropertyString
{
- get => _lamdaProperty_String;
- set => _lamdaProperty_String = value;
+ get => _lamdaPropertyString;
+ set => _lamdaPropertyString = value;
}
// Auto Property
- [Export] private Boolean property_Boolean { get; set; } = true;
- [Export] private Char property_Char { get; set; } = 'f';
- [Export] private SByte property_SByte { get; set; } = 10;
- [Export] private Int16 property_Int16 { get; set; } = 10;
- [Export] private Int32 property_Int32 { get; set; } = 10;
- [Export] private Int64 property_Int64 { get; set; } = 10;
- [Export] private Byte property_Byte { get; set; } = 10;
- [Export] private UInt16 property_UInt16 { get; set; } = 10;
- [Export] private UInt32 property_UInt32 { get; set; } = 10;
- [Export] private UInt64 property_UInt64 { get; set; } = 10;
- [Export] private Single property_Single { get; set; } = 10;
- [Export] private Double property_Double { get; set; } = 10;
- [Export] private String property_String { get; set; } = "foo";
+ [Export] private Boolean PropertyBoolean { get; set; } = true;
+ [Export] private Char PropertyChar { get; set; } = 'f';
+ [Export] private SByte PropertySByte { get; set; } = 10;
+ [Export] private Int16 PropertyInt16 { get; set; } = 10;
+ [Export] private Int32 PropertyInt32 { get; set; } = 10;
+ [Export] private Int64 PropertyInt64 { get; set; } = 10;
+ [Export] private Byte PropertyByte { get; set; } = 10;
+ [Export] private UInt16 PropertyUInt16 { get; set; } = 10;
+ [Export] private UInt32 PropertyUInt32 { get; set; } = 10;
+ [Export] private UInt64 PropertyUInt64 { get; set; } = 10;
+ [Export] private Single PropertySingle { get; set; } = 10;
+ [Export] private Double PropertyDouble { get; set; } = 10;
+ [Export] private String PropertyString { get; set; } = "foo";
// Godot structs
- [Export] private Vector2 property_Vector2 { get; set; } = new(10f, 10f);
- [Export] private Vector2I property_Vector2I { get; set; } = Vector2I.Up;
- [Export] private Rect2 property_Rect2 { get; set; } = new(new Vector2(10f, 10f), new Vector2(10f, 10f));
- [Export] private Rect2I property_Rect2I { get; set; } = new(new Vector2I(10, 10), new Vector2I(10, 10));
- [Export] private Transform2D property_Transform2D { get; set; } = Transform2D.Identity;
- [Export] private Vector3 property_Vector3 { get; set; } = new(10f, 10f, 10f);
- [Export] private Vector3I property_Vector3I { get; set; } = Vector3I.Back;
- [Export] private Basis property_Basis { get; set; } = new Basis(Quaternion.Identity);
- [Export] private Quaternion property_Quaternion { get; set; } = new Quaternion(Basis.Identity);
- [Export] private Transform3D property_Transform3D { get; set; } = Transform3D.Identity;
- [Export] private Vector4 property_Vector4 { get; set; } = new(10f, 10f, 10f, 10f);
- [Export] private Vector4I property_Vector4I { get; set; } = Vector4I.One;
- [Export] private Projection property_Projection { get; set; } = Projection.Identity;
- [Export] private Aabb property_Aabb { get; set; } = new Aabb(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
- [Export] private Color property_Color { get; set; } = Colors.Aquamarine;
- [Export] private Plane property_Plane { get; set; } = Plane.PlaneXZ;
- [Export] private Callable property_Callable { get; set; } = new Callable(Engine.GetMainLoop(), "_process");
- [Export] private Signal property_Signal { get; set; } = new Signal(Engine.GetMainLoop(), "property_list_changed");
+ [Export] private Vector2 PropertyVector2 { get; set; } = new(10f, 10f);
+ [Export] private Vector2I PropertyVector2I { get; set; } = Vector2I.Up;
+ [Export] private Rect2 PropertyRect2 { get; set; } = new(new Vector2(10f, 10f), new Vector2(10f, 10f));
+ [Export] private Rect2I PropertyRect2I { get; set; } = new(new Vector2I(10, 10), new Vector2I(10, 10));
+ [Export] private Transform2D PropertyTransform2D { get; set; } = Transform2D.Identity;
+ [Export] private Vector3 PropertyVector3 { get; set; } = new(10f, 10f, 10f);
+ [Export] private Vector3I PropertyVector3I { get; set; } = Vector3I.Back;
+ [Export] private Basis PropertyBasis { get; set; } = new Basis(Quaternion.Identity);
+ [Export] private Quaternion PropertyQuaternion { get; set; } = new Quaternion(Basis.Identity);
+ [Export] private Transform3D PropertyTransform3D { get; set; } = Transform3D.Identity;
+ [Export] private Vector4 PropertyVector4 { get; set; } = new(10f, 10f, 10f, 10f);
+ [Export] private Vector4I PropertyVector4I { get; set; } = Vector4I.One;
+ [Export] private Projection PropertyProjection { get; set; } = Projection.Identity;
+ [Export] private Aabb PropertyAabb { get; set; } = new Aabb(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
+ [Export] private Color PropertyColor { get; set; } = Colors.Aquamarine;
+ [Export] private Plane PropertyPlane { get; set; } = Plane.PlaneXZ;
+ [Export] private Callable PropertyCallable { get; set; } = new Callable(Engine.GetMainLoop(), "_process");
+ [Export] private Signal PropertySignal { get; set; } = new Signal(Engine.GetMainLoop(), "Propertylist_changed");
// Enums
[SuppressMessage("ReSharper", "UnusedMember.Local")]
- enum MyEnum
+ public enum MyEnum
{
A,
B,
C
}
- [Export] private MyEnum property_Enum { get; set; } = MyEnum.C;
+ [Export] private MyEnum PropertyEnum { get; set; } = MyEnum.C;
[Flags]
[SuppressMessage("ReSharper", "UnusedMember.Local")]
- enum MyFlagsEnum
+ public enum MyFlagsEnum
{
A,
B,
C
}
- [Export] private MyFlagsEnum property_FlagsEnum { get; set; } = MyFlagsEnum.C;
+ [Export] private MyFlagsEnum PropertyFlagsEnum { get; set; } = MyFlagsEnum.C;
// Arrays
- [Export] private Byte[] property_ByteArray { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Int32[] property_Int32Array { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Int64[] property_Int64Array { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Single[] property_SingleArray { get; set; } = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
- [Export] private Double[] property_DoubleArray { get; set; } = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
- [Export] private String[] property_StringArray { get; set; } = { "foo", "bar" };
- [Export(PropertyHint.Enum, "A,B,C")] private String[] property_StringArrayEnum { get; set; } = { "foo", "bar" };
- [Export] private Vector2[] property_Vector2Array { get; set; } = { Vector2.Up, Vector2.Down, Vector2.Left, Vector2.Right };
- [Export] private Vector3[] property_Vector3Array { get; set; } = { Vector3.Up, Vector3.Down, Vector3.Left, Vector3.Right };
- [Export] private Color[] property_ColorArray { get; set; } = { Colors.Aqua, Colors.Aquamarine, Colors.Azure, Colors.Beige };
- [Export] private GodotObject[] property_GodotObjectOrDerivedArray { get; set; } = { null };
- [Export] private StringName[] field_StringNameArray { get; set; } = { "foo", "bar" };
- [Export] private NodePath[] field_NodePathArray { get; set; } = { "foo", "bar" };
- [Export] private Rid[] field_RidArray { get; set; } = { default, default, default };
+ [Export] private Byte[] PropertyByteArray { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Int32[] PropertyInt32Array { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Int64[] PropertyInt64Array { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Single[] PropertySingleArray { get; set; } = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
+ [Export] private Double[] PropertyDoubleArray { get; set; } = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
+ [Export] private String[] PropertyStringArray { get; set; } = { "foo", "bar" };
+ [Export(PropertyHint.Enum, "A,B,C")] private String[] PropertyStringArrayEnum { get; set; } = { "foo", "bar" };
+ [Export] private Vector2[] PropertyVector2Array { get; set; } = { Vector2.Up, Vector2.Down, Vector2.Left, Vector2.Right };
+ [Export] private Vector3[] PropertyVector3Array { get; set; } = { Vector3.Up, Vector3.Down, Vector3.Left, Vector3.Right };
+ [Export] private Color[] PropertyColorArray { get; set; } = { Colors.Aqua, Colors.Aquamarine, Colors.Azure, Colors.Beige };
+ [Export] private GodotObject[] PropertyGodotObjectOrDerivedArray { get; set; } = { null };
+ [Export] private StringName[] PropertyStringNameArray { get; set; } = { "foo", "bar" };
+ [Export] private NodePath[] PropertyNodePathArray { get; set; } = { "foo", "bar" };
+ [Export] private Rid[] PropertyRidArray { get; set; } = { default, default, default };
// Variant
- [Export] private Variant property_Variant { get; set; } = "foo";
+ [Export] private Variant PropertyVariant { get; set; } = "foo";
// Classes
- [Export] private GodotObject property_GodotObjectOrDerived { get; set; }
- [Export] private Godot.Texture property_GodotResourceTexture { get; set; }
- [Export] private StringName property_StringName { get; set; } = new StringName("foo");
- [Export] private NodePath property_NodePath { get; set; } = new NodePath("foo");
- [Export] private Rid property_Rid { get; set; }
+ [Export] private GodotObject PropertyGodotObjectOrDerived { get; set; }
+ [Export] private Godot.Texture PropertyGodotResourceTexture { get; set; }
+ [Export] private StringName PropertyStringName { get; set; } = new StringName("foo");
+ [Export] private NodePath PropertyNodePath { get; set; } = new NodePath("foo");
+ [Export] private Rid PropertyRid { get; set; }
[Export]
- private Godot.Collections.Dictionary property_GodotDictionary { get; set; } =
+ private Godot.Collections.Dictionary PropertyGodotDictionary { get; set; } =
new() { { "foo", 10 }, { Vector2.Up, Colors.Chocolate } };
[Export]
- private Godot.Collections.Array property_GodotArray { get; set; } =
+ private Godot.Collections.Array PropertyGodotArray { get; set; } =
new() { "foo", 10, Vector2.Up, Colors.Chocolate };
[Export]
- private Godot.Collections.Dictionary<string, bool> property_GodotGenericDictionary { get; set; } =
+ private Godot.Collections.Dictionary<string, bool> PropertyGodotGenericDictionary { get; set; } =
new() { { "foo", true }, { "bar", false } };
[Export]
- private Godot.Collections.Array<int> property_GodotGenericArray { get; set; } =
+ private Godot.Collections.Array<int> PropertyGodotGenericArray { get; set; } =
new() { 0, 1, 2, 3, 4, 5, 6 };
}
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Foo.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Foo.cs
index 9ef72d9e02..d2293e0731 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Foo.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Foo.cs
@@ -1,11 +1,11 @@
namespace Godot.SourceGenerators.Sample
{
- partial class Foo : GodotObject
+ public partial class Foo : GodotObject
{
}
// Foo again in the same file
- partial class Foo
+ public partial class Foo
{
}
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic.cs
index 457d8daa8e..9d16a3170b 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic.cs
@@ -3,7 +3,7 @@
namespace Godot.SourceGenerators.Sample
{
// Generic again but without generic parameters
- partial class Generic : GodotObject
+ public partial class Generic : GodotObject
{
private int _field;
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic1T.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic1T.cs
index 9c4f8ee1e1..6d92ff1b0b 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic1T.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic1T.cs
@@ -2,7 +2,7 @@
namespace Godot.SourceGenerators.Sample
{
- partial class Generic1T<T> : GodotObject
+ public partial class Generic1T<T> : GodotObject
{
private int _field;
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic2T.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic2T.cs
index 80551a0b42..eef80ff951 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic2T.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/Generic2T.cs
@@ -3,7 +3,7 @@
namespace Godot.SourceGenerators.Sample
{
// Generic again but different generic parameters
- partial class Generic2T<T, R> : GodotObject
+ public partial class Generic2T<T, R> : GodotObject
{
private int _field;
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/MoreExportedFields.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/MoreExportedFields.cs
index 64088215e9..28685ac87a 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/MoreExportedFields.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/MoreExportedFields.cs
@@ -14,6 +14,6 @@ namespace Godot.SourceGenerators.Sample
public partial class ExportedFields : GodotObject
{
// Note we use Array and not System.Array. This tests the generated namespace qualification.
- [Export] private Int64[] field_empty_Int64Array = Array.Empty<Int64>();
+ [Export] private Int64[] _fieldEmptyInt64Array = Array.Empty<Int64>();
}
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/NestedClass.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/NestedClass.cs
index 3021f57115..3c533b712d 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/NestedClass.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/NestedClass.cs
@@ -11,8 +11,8 @@ public partial class NestedClass : GodotObject
[Signal]
public delegate void MySignalEventHandler(string str, int num);
- [Export] private String field_String = "foo";
- [Export] private String property_String { get; set; } = "foo";
+ [Export] private String _fieldString = "foo";
+ [Export] private String PropertyString { get; set; } = "foo";
private void Method()
{
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/AllReadOnly.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/AllReadOnly.cs
index 0c374169b9..c36aa55eef 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/AllReadOnly.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/AllReadOnly.cs
@@ -2,9 +2,9 @@ namespace Godot.SourceGenerators.Sample
{
public partial class AllReadOnly : GodotObject
{
- public readonly string readonly_field = "foo";
- public string readonly_auto_property { get; } = "foo";
- public string readonly_property { get => "foo"; }
- public string initonly_auto_property { get; init; }
+ public readonly string ReadonlyField = "foo";
+ public string ReadonlyAutoProperty { get; } = "foo";
+ public string ReadonlyProperty { get => "foo"; }
+ public string InitonlyAutoProperty { get; init; }
}
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/AllWriteOnly.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/AllWriteOnly.cs
index 14a1802330..48acfa6c95 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/AllWriteOnly.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/AllWriteOnly.cs
@@ -4,7 +4,7 @@ namespace Godot.SourceGenerators.Sample
{
public partial class AllWriteOnly : GodotObject
{
- bool writeonly_backing_field = false;
- public bool writeonly_property { set => writeonly_backing_field = value; }
+ private bool _writeOnlyBackingField = false;
+ public bool WriteOnlyProperty { set => _writeOnlyBackingField = value; }
}
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/MixedReadOnlyWriteOnly.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/MixedReadOnlyWriteOnly.cs
index f556bdc7e4..c6ce6efe78 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/MixedReadOnlyWriteOnly.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/OneWayProperties/MixedReadOnlyWriteOnly.cs
@@ -2,12 +2,12 @@ namespace Godot.SourceGenerators.Sample
{
public partial class MixedReadonlyWriteOnly : GodotObject
{
- public readonly string readonly_field = "foo";
- public string readonly_auto_property { get; } = "foo";
- public string readonly_property { get => "foo"; }
- public string initonly_auto_property { get; init; }
+ public readonly string ReadOnlyField = "foo";
+ public string ReadOnlyAutoProperty { get; } = "foo";
+ public string ReadOnlyProperty { get => "foo"; }
+ public string InitOnlyAutoProperty { get; init; }
- bool writeonly_backing_field = false;
- public bool writeonly_property { set => writeonly_backing_field = value; }
+ private bool _writeOnlyBackingField = false;
+ public bool WriteOnlyProperty { set => _writeOnlyBackingField = value; }
}
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ScriptBoilerplate.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ScriptBoilerplate.cs
index e43a3469ae..1266f6d853 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ScriptBoilerplate.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Sample/ScriptBoilerplate.cs
@@ -26,7 +26,7 @@ namespace Godot.SourceGenerators.Sample
}
}
- partial struct OuterClass
+ public partial struct OuterClass
{
public partial class NesterClass : RefCounted
{
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/ScriptPropertiesGeneratorTests.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/ScriptPropertiesGeneratorTests.cs
index d20b354b9e..3cc5841097 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/ScriptPropertiesGeneratorTests.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/ScriptPropertiesGeneratorTests.cs
@@ -41,7 +41,7 @@ public class ScriptPropertiesGeneratorTests
}
[Fact]
- public async void OneWayPropertiesMixedReadonlyWriteOnly()
+ public async void OneWayPropertiesMixedReadOnlyWriteOnly()
{
await CSharpSourceGeneratorVerifier<ScriptPropertiesGenerator>.Verify(
"MixedReadOnlyWriteOnly.cs",
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllReadOnly_ScriptProperties.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllReadOnly_ScriptProperties.generated.cs
index db56ac30a3..96ff0f75e9 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllReadOnly_ScriptProperties.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllReadOnly_ScriptProperties.generated.cs
@@ -9,40 +9,40 @@ partial class AllReadOnly
/// </summary>
public new class PropertyName : global::Godot.GodotObject.PropertyName {
/// <summary>
- /// Cached name for the 'readonly_auto_property' property.
+ /// Cached name for the 'ReadOnlyAutoProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName readonly_auto_property = "readonly_auto_property";
+ public new static readonly global::Godot.StringName ReadOnlyAutoProperty = "ReadOnlyAutoProperty";
/// <summary>
- /// Cached name for the 'readonly_property' property.
+ /// Cached name for the 'ReadOnlyProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName readonly_property = "readonly_property";
+ public new static readonly global::Godot.StringName ReadOnlyProperty = "ReadOnlyProperty";
/// <summary>
- /// Cached name for the 'initonly_auto_property' property.
+ /// Cached name for the 'InitOnlyAutoProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName initonly_auto_property = "initonly_auto_property";
+ public new static readonly global::Godot.StringName InitOnlyAutoProperty = "InitOnlyAutoProperty";
/// <summary>
- /// Cached name for the 'readonly_field' field.
+ /// Cached name for the 'ReadOnlyField' field.
/// </summary>
- public new static readonly global::Godot.StringName readonly_field = "readonly_field";
+ public new static readonly global::Godot.StringName ReadOnlyField = "ReadOnlyField";
}
/// <inheritdoc/>
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool GetGodotClassPropertyValue(in godot_string_name name, out godot_variant value)
{
- if (name == PropertyName.readonly_auto_property) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.readonly_auto_property);
+ if (name == PropertyName.ReadOnlyAutoProperty) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyAutoProperty);
return true;
}
- else if (name == PropertyName.readonly_property) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.readonly_property);
+ else if (name == PropertyName.ReadOnlyProperty) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyProperty);
return true;
}
- else if (name == PropertyName.initonly_auto_property) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.initonly_auto_property);
+ else if (name == PropertyName.InitOnlyAutoProperty) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.InitOnlyAutoProperty);
return true;
}
- else if (name == PropertyName.readonly_field) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.readonly_field);
+ else if (name == PropertyName.ReadOnlyField) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyField);
return true;
}
return base.GetGodotClassPropertyValue(name, out value);
@@ -56,10 +56,10 @@ partial class AllReadOnly
internal new static global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo> GetGodotPropertyList()
{
var properties = new global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo>();
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.readonly_field, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.readonly_auto_property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.readonly_property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.initonly_auto_property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.ReadOnlyField, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.ReadOnlyAutoProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.ReadOnlyProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.InitOnlyAutoProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
return properties;
}
#pragma warning restore CS0109
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllWriteOnly_ScriptProperties.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllWriteOnly_ScriptProperties.generated.cs
index 256420fe87..91dd282b99 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllWriteOnly_ScriptProperties.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllWriteOnly_ScriptProperties.generated.cs
@@ -9,24 +9,24 @@ partial class AllWriteOnly
/// </summary>
public new class PropertyName : global::Godot.GodotObject.PropertyName {
/// <summary>
- /// Cached name for the 'writeonly_property' property.
+ /// Cached name for the 'WriteOnlyProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName writeonly_property = "writeonly_property";
+ public new static readonly global::Godot.StringName WriteOnlyProperty = "WriteOnlyProperty";
/// <summary>
- /// Cached name for the 'writeonly_backing_field' field.
+ /// Cached name for the '_writeOnlyBackingField' field.
/// </summary>
- public new static readonly global::Godot.StringName writeonly_backing_field = "writeonly_backing_field";
+ public new static readonly global::Godot.StringName _writeOnlyBackingField = "_writeOnlyBackingField";
}
/// <inheritdoc/>
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool SetGodotClassPropertyValue(in godot_string_name name, in godot_variant value)
{
- if (name == PropertyName.writeonly_property) {
- this.writeonly_property = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
+ if (name == PropertyName.WriteOnlyProperty) {
+ this.WriteOnlyProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
- else if (name == PropertyName.writeonly_backing_field) {
- this.writeonly_backing_field = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
+ else if (name == PropertyName._writeOnlyBackingField) {
+ this._writeOnlyBackingField = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
return base.SetGodotClassPropertyValue(name, value);
@@ -35,8 +35,8 @@ partial class AllWriteOnly
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool GetGodotClassPropertyValue(in godot_string_name name, out godot_variant value)
{
- if (name == PropertyName.writeonly_backing_field) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this.writeonly_backing_field);
+ if (name == PropertyName._writeOnlyBackingField) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this._writeOnlyBackingField);
return true;
}
return base.GetGodotClassPropertyValue(name, out value);
@@ -50,8 +50,8 @@ partial class AllWriteOnly
internal new static global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo> GetGodotPropertyList()
{
var properties = new global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo>();
- properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.writeonly_backing_field, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.writeonly_property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName._writeOnlyBackingField, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.WriteOnlyProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
return properties;
}
#pragma warning restore CS0109
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptProperties.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptProperties.generated.cs
index 915c36525b..334adc1243 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptProperties.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptProperties.generated.cs
@@ -9,488 +9,488 @@ partial class ExportedFields
/// </summary>
public new class PropertyName : global::Godot.GodotObject.PropertyName {
/// <summary>
- /// Cached name for the 'field_Boolean' field.
+ /// Cached name for the '_fieldBoolean' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Boolean = "field_Boolean";
+ public new static readonly global::Godot.StringName _fieldBoolean = "_fieldBoolean";
/// <summary>
- /// Cached name for the 'field_Char' field.
+ /// Cached name for the '_fieldChar' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Char = "field_Char";
+ public new static readonly global::Godot.StringName _fieldChar = "_fieldChar";
/// <summary>
- /// Cached name for the 'field_SByte' field.
+ /// Cached name for the '_fieldSByte' field.
/// </summary>
- public new static readonly global::Godot.StringName field_SByte = "field_SByte";
+ public new static readonly global::Godot.StringName _fieldSByte = "_fieldSByte";
/// <summary>
- /// Cached name for the 'field_Int16' field.
+ /// Cached name for the '_fieldInt16' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Int16 = "field_Int16";
+ public new static readonly global::Godot.StringName _fieldInt16 = "_fieldInt16";
/// <summary>
- /// Cached name for the 'field_Int32' field.
+ /// Cached name for the '_fieldInt32' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Int32 = "field_Int32";
+ public new static readonly global::Godot.StringName _fieldInt32 = "_fieldInt32";
/// <summary>
- /// Cached name for the 'field_Int64' field.
+ /// Cached name for the '_fieldInt64' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Int64 = "field_Int64";
+ public new static readonly global::Godot.StringName _fieldInt64 = "_fieldInt64";
/// <summary>
- /// Cached name for the 'field_Byte' field.
+ /// Cached name for the '_fieldByte' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Byte = "field_Byte";
+ public new static readonly global::Godot.StringName _fieldByte = "_fieldByte";
/// <summary>
- /// Cached name for the 'field_UInt16' field.
+ /// Cached name for the '_fieldUInt16' field.
/// </summary>
- public new static readonly global::Godot.StringName field_UInt16 = "field_UInt16";
+ public new static readonly global::Godot.StringName _fieldUInt16 = "_fieldUInt16";
/// <summary>
- /// Cached name for the 'field_UInt32' field.
+ /// Cached name for the '_fieldUInt32' field.
/// </summary>
- public new static readonly global::Godot.StringName field_UInt32 = "field_UInt32";
+ public new static readonly global::Godot.StringName _fieldUInt32 = "_fieldUInt32";
/// <summary>
- /// Cached name for the 'field_UInt64' field.
+ /// Cached name for the '_fieldUInt64' field.
/// </summary>
- public new static readonly global::Godot.StringName field_UInt64 = "field_UInt64";
+ public new static readonly global::Godot.StringName _fieldUInt64 = "_fieldUInt64";
/// <summary>
- /// Cached name for the 'field_Single' field.
+ /// Cached name for the '_fieldSingle' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Single = "field_Single";
+ public new static readonly global::Godot.StringName _fieldSingle = "_fieldSingle";
/// <summary>
- /// Cached name for the 'field_Double' field.
+ /// Cached name for the '_fieldDouble' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Double = "field_Double";
+ public new static readonly global::Godot.StringName _fieldDouble = "_fieldDouble";
/// <summary>
- /// Cached name for the 'field_String' field.
+ /// Cached name for the '_fieldString' field.
/// </summary>
- public new static readonly global::Godot.StringName field_String = "field_String";
+ public new static readonly global::Godot.StringName _fieldString = "_fieldString";
/// <summary>
- /// Cached name for the 'field_Vector2' field.
+ /// Cached name for the '_fieldVector2' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Vector2 = "field_Vector2";
+ public new static readonly global::Godot.StringName _fieldVector2 = "_fieldVector2";
/// <summary>
- /// Cached name for the 'field_Vector2I' field.
+ /// Cached name for the '_fieldVector2I' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Vector2I = "field_Vector2I";
+ public new static readonly global::Godot.StringName _fieldVector2I = "_fieldVector2I";
/// <summary>
- /// Cached name for the 'field_Rect2' field.
+ /// Cached name for the '_fieldRect2' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Rect2 = "field_Rect2";
+ public new static readonly global::Godot.StringName _fieldRect2 = "_fieldRect2";
/// <summary>
- /// Cached name for the 'field_Rect2I' field.
+ /// Cached name for the '_fieldRect2I' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Rect2I = "field_Rect2I";
+ public new static readonly global::Godot.StringName _fieldRect2I = "_fieldRect2I";
/// <summary>
- /// Cached name for the 'field_Transform2D' field.
+ /// Cached name for the '_fieldTransform2D' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Transform2D = "field_Transform2D";
+ public new static readonly global::Godot.StringName _fieldTransform2D = "_fieldTransform2D";
/// <summary>
- /// Cached name for the 'field_Vector3' field.
+ /// Cached name for the '_fieldVector3' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Vector3 = "field_Vector3";
+ public new static readonly global::Godot.StringName _fieldVector3 = "_fieldVector3";
/// <summary>
- /// Cached name for the 'field_Vector3I' field.
+ /// Cached name for the '_fieldVector3I' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Vector3I = "field_Vector3I";
+ public new static readonly global::Godot.StringName _fieldVector3I = "_fieldVector3I";
/// <summary>
- /// Cached name for the 'field_Basis' field.
+ /// Cached name for the '_fieldBasis' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Basis = "field_Basis";
+ public new static readonly global::Godot.StringName _fieldBasis = "_fieldBasis";
/// <summary>
- /// Cached name for the 'field_Quaternion' field.
+ /// Cached name for the '_fieldQuaternion' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Quaternion = "field_Quaternion";
+ public new static readonly global::Godot.StringName _fieldQuaternion = "_fieldQuaternion";
/// <summary>
- /// Cached name for the 'field_Transform3D' field.
+ /// Cached name for the '_fieldTransform3D' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Transform3D = "field_Transform3D";
+ public new static readonly global::Godot.StringName _fieldTransform3D = "_fieldTransform3D";
/// <summary>
- /// Cached name for the 'field_Vector4' field.
+ /// Cached name for the '_fieldVector4' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Vector4 = "field_Vector4";
+ public new static readonly global::Godot.StringName _fieldVector4 = "_fieldVector4";
/// <summary>
- /// Cached name for the 'field_Vector4I' field.
+ /// Cached name for the '_fieldVector4I' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Vector4I = "field_Vector4I";
+ public new static readonly global::Godot.StringName _fieldVector4I = "_fieldVector4I";
/// <summary>
- /// Cached name for the 'field_Projection' field.
+ /// Cached name for the '_fieldProjection' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Projection = "field_Projection";
+ public new static readonly global::Godot.StringName _fieldProjection = "_fieldProjection";
/// <summary>
- /// Cached name for the 'field_Aabb' field.
+ /// Cached name for the '_fieldAabb' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Aabb = "field_Aabb";
+ public new static readonly global::Godot.StringName _fieldAabb = "_fieldAabb";
/// <summary>
- /// Cached name for the 'field_Color' field.
+ /// Cached name for the '_fieldColor' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Color = "field_Color";
+ public new static readonly global::Godot.StringName _fieldColor = "_fieldColor";
/// <summary>
- /// Cached name for the 'field_Plane' field.
+ /// Cached name for the '_fieldPlane' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Plane = "field_Plane";
+ public new static readonly global::Godot.StringName _fieldPlane = "_fieldPlane";
/// <summary>
- /// Cached name for the 'field_Callable' field.
+ /// Cached name for the '_fieldCallable' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Callable = "field_Callable";
+ public new static readonly global::Godot.StringName _fieldCallable = "_fieldCallable";
/// <summary>
- /// Cached name for the 'field_Signal' field.
+ /// Cached name for the '_fieldSignal' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Signal = "field_Signal";
+ public new static readonly global::Godot.StringName _fieldSignal = "_fieldSignal";
/// <summary>
- /// Cached name for the 'field_Enum' field.
+ /// Cached name for the '_fieldEnum' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Enum = "field_Enum";
+ public new static readonly global::Godot.StringName _fieldEnum = "_fieldEnum";
/// <summary>
- /// Cached name for the 'field_FlagsEnum' field.
+ /// Cached name for the '_fieldFlagsEnum' field.
/// </summary>
- public new static readonly global::Godot.StringName field_FlagsEnum = "field_FlagsEnum";
+ public new static readonly global::Godot.StringName _fieldFlagsEnum = "_fieldFlagsEnum";
/// <summary>
- /// Cached name for the 'field_ByteArray' field.
+ /// Cached name for the '_fieldByteArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_ByteArray = "field_ByteArray";
+ public new static readonly global::Godot.StringName _fieldByteArray = "_fieldByteArray";
/// <summary>
- /// Cached name for the 'field_Int32Array' field.
+ /// Cached name for the '_fieldInt32Array' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Int32Array = "field_Int32Array";
+ public new static readonly global::Godot.StringName _fieldInt32Array = "_fieldInt32Array";
/// <summary>
- /// Cached name for the 'field_Int64Array' field.
+ /// Cached name for the '_fieldInt64Array' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Int64Array = "field_Int64Array";
+ public new static readonly global::Godot.StringName _fieldInt64Array = "_fieldInt64Array";
/// <summary>
- /// Cached name for the 'field_SingleArray' field.
+ /// Cached name for the '_fieldSingleArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_SingleArray = "field_SingleArray";
+ public new static readonly global::Godot.StringName _fieldSingleArray = "_fieldSingleArray";
/// <summary>
- /// Cached name for the 'field_DoubleArray' field.
+ /// Cached name for the '_fieldDoubleArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_DoubleArray = "field_DoubleArray";
+ public new static readonly global::Godot.StringName _fieldDoubleArray = "_fieldDoubleArray";
/// <summary>
- /// Cached name for the 'field_StringArray' field.
+ /// Cached name for the '_fieldStringArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_StringArray = "field_StringArray";
+ public new static readonly global::Godot.StringName _fieldStringArray = "_fieldStringArray";
/// <summary>
- /// Cached name for the 'field_StringArrayEnum' field.
+ /// Cached name for the '_fieldStringArrayEnum' field.
/// </summary>
- public new static readonly global::Godot.StringName field_StringArrayEnum = "field_StringArrayEnum";
+ public new static readonly global::Godot.StringName _fieldStringArrayEnum = "_fieldStringArrayEnum";
/// <summary>
- /// Cached name for the 'field_Vector2Array' field.
+ /// Cached name for the '_fieldVector2Array' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Vector2Array = "field_Vector2Array";
+ public new static readonly global::Godot.StringName _fieldVector2Array = "_fieldVector2Array";
/// <summary>
- /// Cached name for the 'field_Vector3Array' field.
+ /// Cached name for the '_fieldVector3Array' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Vector3Array = "field_Vector3Array";
+ public new static readonly global::Godot.StringName _fieldVector3Array = "_fieldVector3Array";
/// <summary>
- /// Cached name for the 'field_ColorArray' field.
+ /// Cached name for the '_fieldColorArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_ColorArray = "field_ColorArray";
+ public new static readonly global::Godot.StringName _fieldColorArray = "_fieldColorArray";
/// <summary>
- /// Cached name for the 'field_GodotObjectOrDerivedArray' field.
+ /// Cached name for the '_fieldGodotObjectOrDerivedArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_GodotObjectOrDerivedArray = "field_GodotObjectOrDerivedArray";
+ public new static readonly global::Godot.StringName _fieldGodotObjectOrDerivedArray = "_fieldGodotObjectOrDerivedArray";
/// <summary>
- /// Cached name for the 'field_StringNameArray' field.
+ /// Cached name for the '_fieldStringNameArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_StringNameArray = "field_StringNameArray";
+ public new static readonly global::Godot.StringName _fieldStringNameArray = "_fieldStringNameArray";
/// <summary>
- /// Cached name for the 'field_NodePathArray' field.
+ /// Cached name for the '_fieldNodePathArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_NodePathArray = "field_NodePathArray";
+ public new static readonly global::Godot.StringName _fieldNodePathArray = "_fieldNodePathArray";
/// <summary>
- /// Cached name for the 'field_RidArray' field.
+ /// Cached name for the '_fieldRidArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_RidArray = "field_RidArray";
+ public new static readonly global::Godot.StringName _fieldRidArray = "_fieldRidArray";
/// <summary>
- /// Cached name for the 'field_empty_Int32Array' field.
+ /// Cached name for the '_fieldEmptyInt32Array' field.
/// </summary>
- public new static readonly global::Godot.StringName field_empty_Int32Array = "field_empty_Int32Array";
+ public new static readonly global::Godot.StringName _fieldEmptyInt32Array = "_fieldEmptyInt32Array";
/// <summary>
- /// Cached name for the 'field_array_from_list' field.
+ /// Cached name for the '_fieldArrayFromList' field.
/// </summary>
- public new static readonly global::Godot.StringName field_array_from_list = "field_array_from_list";
+ public new static readonly global::Godot.StringName _fieldArrayFromList = "_fieldArrayFromList";
/// <summary>
- /// Cached name for the 'field_Variant' field.
+ /// Cached name for the '_fieldVariant' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Variant = "field_Variant";
+ public new static readonly global::Godot.StringName _fieldVariant = "_fieldVariant";
/// <summary>
- /// Cached name for the 'field_GodotObjectOrDerived' field.
+ /// Cached name for the '_fieldGodotObjectOrDerived' field.
/// </summary>
- public new static readonly global::Godot.StringName field_GodotObjectOrDerived = "field_GodotObjectOrDerived";
+ public new static readonly global::Godot.StringName _fieldGodotObjectOrDerived = "_fieldGodotObjectOrDerived";
/// <summary>
- /// Cached name for the 'field_GodotResourceTexture' field.
+ /// Cached name for the '_fieldGodotResourceTexture' field.
/// </summary>
- public new static readonly global::Godot.StringName field_GodotResourceTexture = "field_GodotResourceTexture";
+ public new static readonly global::Godot.StringName _fieldGodotResourceTexture = "_fieldGodotResourceTexture";
/// <summary>
- /// Cached name for the 'field_StringName' field.
+ /// Cached name for the '_fieldStringName' field.
/// </summary>
- public new static readonly global::Godot.StringName field_StringName = "field_StringName";
+ public new static readonly global::Godot.StringName _fieldStringName = "_fieldStringName";
/// <summary>
- /// Cached name for the 'field_NodePath' field.
+ /// Cached name for the '_fieldNodePath' field.
/// </summary>
- public new static readonly global::Godot.StringName field_NodePath = "field_NodePath";
+ public new static readonly global::Godot.StringName _fieldNodePath = "_fieldNodePath";
/// <summary>
- /// Cached name for the 'field_Rid' field.
+ /// Cached name for the '_fieldRid' field.
/// </summary>
- public new static readonly global::Godot.StringName field_Rid = "field_Rid";
+ public new static readonly global::Godot.StringName _fieldRid = "_fieldRid";
/// <summary>
- /// Cached name for the 'field_GodotDictionary' field.
+ /// Cached name for the '_fieldGodotDictionary' field.
/// </summary>
- public new static readonly global::Godot.StringName field_GodotDictionary = "field_GodotDictionary";
+ public new static readonly global::Godot.StringName _fieldGodotDictionary = "_fieldGodotDictionary";
/// <summary>
- /// Cached name for the 'field_GodotArray' field.
+ /// Cached name for the '_fieldGodotArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_GodotArray = "field_GodotArray";
+ public new static readonly global::Godot.StringName _fieldGodotArray = "_fieldGodotArray";
/// <summary>
- /// Cached name for the 'field_GodotGenericDictionary' field.
+ /// Cached name for the '_fieldGodotGenericDictionary' field.
/// </summary>
- public new static readonly global::Godot.StringName field_GodotGenericDictionary = "field_GodotGenericDictionary";
+ public new static readonly global::Godot.StringName _fieldGodotGenericDictionary = "_fieldGodotGenericDictionary";
/// <summary>
- /// Cached name for the 'field_GodotGenericArray' field.
+ /// Cached name for the '_fieldGodotGenericArray' field.
/// </summary>
- public new static readonly global::Godot.StringName field_GodotGenericArray = "field_GodotGenericArray";
+ public new static readonly global::Godot.StringName _fieldGodotGenericArray = "_fieldGodotGenericArray";
/// <summary>
- /// Cached name for the 'field_empty_Int64Array' field.
+ /// Cached name for the '_fieldEmptyInt64Array' field.
/// </summary>
- public new static readonly global::Godot.StringName field_empty_Int64Array = "field_empty_Int64Array";
+ public new static readonly global::Godot.StringName _fieldEmptyInt64Array = "_fieldEmptyInt64Array";
}
/// <inheritdoc/>
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool SetGodotClassPropertyValue(in godot_string_name name, in godot_variant value)
{
- if (name == PropertyName.field_Boolean) {
- this.field_Boolean = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
+ if (name == PropertyName._fieldBoolean) {
+ this._fieldBoolean = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
- else if (name == PropertyName.field_Char) {
- this.field_Char = global::Godot.NativeInterop.VariantUtils.ConvertTo<char>(value);
+ else if (name == PropertyName._fieldChar) {
+ this._fieldChar = global::Godot.NativeInterop.VariantUtils.ConvertTo<char>(value);
return true;
}
- else if (name == PropertyName.field_SByte) {
- this.field_SByte = global::Godot.NativeInterop.VariantUtils.ConvertTo<sbyte>(value);
+ else if (name == PropertyName._fieldSByte) {
+ this._fieldSByte = global::Godot.NativeInterop.VariantUtils.ConvertTo<sbyte>(value);
return true;
}
- else if (name == PropertyName.field_Int16) {
- this.field_Int16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<short>(value);
+ else if (name == PropertyName._fieldInt16) {
+ this._fieldInt16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<short>(value);
return true;
}
- else if (name == PropertyName.field_Int32) {
- this.field_Int32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
+ else if (name == PropertyName._fieldInt32) {
+ this._fieldInt32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
return true;
}
- else if (name == PropertyName.field_Int64) {
- this.field_Int64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<long>(value);
+ else if (name == PropertyName._fieldInt64) {
+ this._fieldInt64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<long>(value);
return true;
}
- else if (name == PropertyName.field_Byte) {
- this.field_Byte = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte>(value);
+ else if (name == PropertyName._fieldByte) {
+ this._fieldByte = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte>(value);
return true;
}
- else if (name == PropertyName.field_UInt16) {
- this.field_UInt16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ushort>(value);
+ else if (name == PropertyName._fieldUInt16) {
+ this._fieldUInt16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ushort>(value);
return true;
}
- else if (name == PropertyName.field_UInt32) {
- this.field_UInt32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<uint>(value);
+ else if (name == PropertyName._fieldUInt32) {
+ this._fieldUInt32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<uint>(value);
return true;
}
- else if (name == PropertyName.field_UInt64) {
- this.field_UInt64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ulong>(value);
+ else if (name == PropertyName._fieldUInt64) {
+ this._fieldUInt64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ulong>(value);
return true;
}
- else if (name == PropertyName.field_Single) {
- this.field_Single = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
+ else if (name == PropertyName._fieldSingle) {
+ this._fieldSingle = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
return true;
}
- else if (name == PropertyName.field_Double) {
- this.field_Double = global::Godot.NativeInterop.VariantUtils.ConvertTo<double>(value);
+ else if (name == PropertyName._fieldDouble) {
+ this._fieldDouble = global::Godot.NativeInterop.VariantUtils.ConvertTo<double>(value);
return true;
}
- else if (name == PropertyName.field_String) {
- this.field_String = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName._fieldString) {
+ this._fieldString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.field_Vector2) {
- this.field_Vector2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2>(value);
+ else if (name == PropertyName._fieldVector2) {
+ this._fieldVector2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2>(value);
return true;
}
- else if (name == PropertyName.field_Vector2I) {
- this.field_Vector2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2I>(value);
+ else if (name == PropertyName._fieldVector2I) {
+ this._fieldVector2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2I>(value);
return true;
}
- else if (name == PropertyName.field_Rect2) {
- this.field_Rect2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2>(value);
+ else if (name == PropertyName._fieldRect2) {
+ this._fieldRect2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2>(value);
return true;
}
- else if (name == PropertyName.field_Rect2I) {
- this.field_Rect2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2I>(value);
+ else if (name == PropertyName._fieldRect2I) {
+ this._fieldRect2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2I>(value);
return true;
}
- else if (name == PropertyName.field_Transform2D) {
- this.field_Transform2D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform2D>(value);
+ else if (name == PropertyName._fieldTransform2D) {
+ this._fieldTransform2D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform2D>(value);
return true;
}
- else if (name == PropertyName.field_Vector3) {
- this.field_Vector3 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3>(value);
+ else if (name == PropertyName._fieldVector3) {
+ this._fieldVector3 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3>(value);
return true;
}
- else if (name == PropertyName.field_Vector3I) {
- this.field_Vector3I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3I>(value);
+ else if (name == PropertyName._fieldVector3I) {
+ this._fieldVector3I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3I>(value);
return true;
}
- else if (name == PropertyName.field_Basis) {
- this.field_Basis = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Basis>(value);
+ else if (name == PropertyName._fieldBasis) {
+ this._fieldBasis = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Basis>(value);
return true;
}
- else if (name == PropertyName.field_Quaternion) {
- this.field_Quaternion = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Quaternion>(value);
+ else if (name == PropertyName._fieldQuaternion) {
+ this._fieldQuaternion = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Quaternion>(value);
return true;
}
- else if (name == PropertyName.field_Transform3D) {
- this.field_Transform3D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform3D>(value);
+ else if (name == PropertyName._fieldTransform3D) {
+ this._fieldTransform3D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform3D>(value);
return true;
}
- else if (name == PropertyName.field_Vector4) {
- this.field_Vector4 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4>(value);
+ else if (name == PropertyName._fieldVector4) {
+ this._fieldVector4 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4>(value);
return true;
}
- else if (name == PropertyName.field_Vector4I) {
- this.field_Vector4I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4I>(value);
+ else if (name == PropertyName._fieldVector4I) {
+ this._fieldVector4I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4I>(value);
return true;
}
- else if (name == PropertyName.field_Projection) {
- this.field_Projection = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Projection>(value);
+ else if (name == PropertyName._fieldProjection) {
+ this._fieldProjection = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Projection>(value);
return true;
}
- else if (name == PropertyName.field_Aabb) {
- this.field_Aabb = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Aabb>(value);
+ else if (name == PropertyName._fieldAabb) {
+ this._fieldAabb = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Aabb>(value);
return true;
}
- else if (name == PropertyName.field_Color) {
- this.field_Color = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color>(value);
+ else if (name == PropertyName._fieldColor) {
+ this._fieldColor = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color>(value);
return true;
}
- else if (name == PropertyName.field_Plane) {
- this.field_Plane = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Plane>(value);
+ else if (name == PropertyName._fieldPlane) {
+ this._fieldPlane = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Plane>(value);
return true;
}
- else if (name == PropertyName.field_Callable) {
- this.field_Callable = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Callable>(value);
+ else if (name == PropertyName._fieldCallable) {
+ this._fieldCallable = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Callable>(value);
return true;
}
- else if (name == PropertyName.field_Signal) {
- this.field_Signal = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Signal>(value);
+ else if (name == PropertyName._fieldSignal) {
+ this._fieldSignal = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Signal>(value);
return true;
}
- else if (name == PropertyName.field_Enum) {
- this.field_Enum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedFields.MyEnum>(value);
+ else if (name == PropertyName._fieldEnum) {
+ this._fieldEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedFields.MyEnum>(value);
return true;
}
- else if (name == PropertyName.field_FlagsEnum) {
- this.field_FlagsEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedFields.MyFlagsEnum>(value);
+ else if (name == PropertyName._fieldFlagsEnum) {
+ this._fieldFlagsEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedFields.MyFlagsEnum>(value);
return true;
}
- else if (name == PropertyName.field_ByteArray) {
- this.field_ByteArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte[]>(value);
+ else if (name == PropertyName._fieldByteArray) {
+ this._fieldByteArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte[]>(value);
return true;
}
- else if (name == PropertyName.field_Int32Array) {
- this.field_Int32Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
+ else if (name == PropertyName._fieldInt32Array) {
+ this._fieldInt32Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
return true;
}
- else if (name == PropertyName.field_Int64Array) {
- this.field_Int64Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<long[]>(value);
+ else if (name == PropertyName._fieldInt64Array) {
+ this._fieldInt64Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<long[]>(value);
return true;
}
- else if (name == PropertyName.field_SingleArray) {
- this.field_SingleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<float[]>(value);
+ else if (name == PropertyName._fieldSingleArray) {
+ this._fieldSingleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<float[]>(value);
return true;
}
- else if (name == PropertyName.field_DoubleArray) {
- this.field_DoubleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<double[]>(value);
+ else if (name == PropertyName._fieldDoubleArray) {
+ this._fieldDoubleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<double[]>(value);
return true;
}
- else if (name == PropertyName.field_StringArray) {
- this.field_StringArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
+ else if (name == PropertyName._fieldStringArray) {
+ this._fieldStringArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
return true;
}
- else if (name == PropertyName.field_StringArrayEnum) {
- this.field_StringArrayEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
+ else if (name == PropertyName._fieldStringArrayEnum) {
+ this._fieldStringArrayEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
return true;
}
- else if (name == PropertyName.field_Vector2Array) {
- this.field_Vector2Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2[]>(value);
+ else if (name == PropertyName._fieldVector2Array) {
+ this._fieldVector2Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2[]>(value);
return true;
}
- else if (name == PropertyName.field_Vector3Array) {
- this.field_Vector3Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3[]>(value);
+ else if (name == PropertyName._fieldVector3Array) {
+ this._fieldVector3Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3[]>(value);
return true;
}
- else if (name == PropertyName.field_ColorArray) {
- this.field_ColorArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color[]>(value);
+ else if (name == PropertyName._fieldColorArray) {
+ this._fieldColorArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color[]>(value);
return true;
}
- else if (name == PropertyName.field_GodotObjectOrDerivedArray) {
- this.field_GodotObjectOrDerivedArray = global::Godot.NativeInterop.VariantUtils.ConvertToSystemArrayOfGodotObject<global::Godot.GodotObject>(value);
+ else if (name == PropertyName._fieldGodotObjectOrDerivedArray) {
+ this._fieldGodotObjectOrDerivedArray = global::Godot.NativeInterop.VariantUtils.ConvertToSystemArrayOfGodotObject<global::Godot.GodotObject>(value);
return true;
}
- else if (name == PropertyName.field_StringNameArray) {
- this.field_StringNameArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.StringName[]>(value);
+ else if (name == PropertyName._fieldStringNameArray) {
+ this._fieldStringNameArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.StringName[]>(value);
return true;
}
- else if (name == PropertyName.field_NodePathArray) {
- this.field_NodePathArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath[]>(value);
+ else if (name == PropertyName._fieldNodePathArray) {
+ this._fieldNodePathArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath[]>(value);
return true;
}
- else if (name == PropertyName.field_RidArray) {
- this.field_RidArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid[]>(value);
+ else if (name == PropertyName._fieldRidArray) {
+ this._fieldRidArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid[]>(value);
return true;
}
- else if (name == PropertyName.field_empty_Int32Array) {
- this.field_empty_Int32Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
+ else if (name == PropertyName._fieldEmptyInt32Array) {
+ this._fieldEmptyInt32Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
return true;
}
- else if (name == PropertyName.field_array_from_list) {
- this.field_array_from_list = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
+ else if (name == PropertyName._fieldArrayFromList) {
+ this._fieldArrayFromList = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
return true;
}
- else if (name == PropertyName.field_Variant) {
- this.field_Variant = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Variant>(value);
+ else if (name == PropertyName._fieldVariant) {
+ this._fieldVariant = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Variant>(value);
return true;
}
- else if (name == PropertyName.field_GodotObjectOrDerived) {
- this.field_GodotObjectOrDerived = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.GodotObject>(value);
+ else if (name == PropertyName._fieldGodotObjectOrDerived) {
+ this._fieldGodotObjectOrDerived = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.GodotObject>(value);
return true;
}
- else if (name == PropertyName.field_GodotResourceTexture) {
- this.field_GodotResourceTexture = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Texture>(value);
+ else if (name == PropertyName._fieldGodotResourceTexture) {
+ this._fieldGodotResourceTexture = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Texture>(value);
return true;
}
- else if (name == PropertyName.field_StringName) {
- this.field_StringName = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.StringName>(value);
+ else if (name == PropertyName._fieldStringName) {
+ this._fieldStringName = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.StringName>(value);
return true;
}
- else if (name == PropertyName.field_NodePath) {
- this.field_NodePath = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath>(value);
+ else if (name == PropertyName._fieldNodePath) {
+ this._fieldNodePath = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath>(value);
return true;
}
- else if (name == PropertyName.field_Rid) {
- this.field_Rid = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid>(value);
+ else if (name == PropertyName._fieldRid) {
+ this._fieldRid = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid>(value);
return true;
}
- else if (name == PropertyName.field_GodotDictionary) {
- this.field_GodotDictionary = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Dictionary>(value);
+ else if (name == PropertyName._fieldGodotDictionary) {
+ this._fieldGodotDictionary = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Dictionary>(value);
return true;
}
- else if (name == PropertyName.field_GodotArray) {
- this.field_GodotArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Array>(value);
+ else if (name == PropertyName._fieldGodotArray) {
+ this._fieldGodotArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Array>(value);
return true;
}
- else if (name == PropertyName.field_GodotGenericDictionary) {
- this.field_GodotGenericDictionary = global::Godot.NativeInterop.VariantUtils.ConvertToDictionary<string, bool>(value);
+ else if (name == PropertyName._fieldGodotGenericDictionary) {
+ this._fieldGodotGenericDictionary = global::Godot.NativeInterop.VariantUtils.ConvertToDictionary<string, bool>(value);
return true;
}
- else if (name == PropertyName.field_GodotGenericArray) {
- this.field_GodotGenericArray = global::Godot.NativeInterop.VariantUtils.ConvertToArray<int>(value);
+ else if (name == PropertyName._fieldGodotGenericArray) {
+ this._fieldGodotGenericArray = global::Godot.NativeInterop.VariantUtils.ConvertToArray<int>(value);
return true;
}
- else if (name == PropertyName.field_empty_Int64Array) {
- this.field_empty_Int64Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<long[]>(value);
+ else if (name == PropertyName._fieldEmptyInt64Array) {
+ this._fieldEmptyInt64Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<long[]>(value);
return true;
}
return base.SetGodotClassPropertyValue(name, value);
@@ -499,244 +499,244 @@ partial class ExportedFields
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool GetGodotClassPropertyValue(in godot_string_name name, out godot_variant value)
{
- if (name == PropertyName.field_Boolean) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this.field_Boolean);
+ if (name == PropertyName._fieldBoolean) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this._fieldBoolean);
return true;
}
- else if (name == PropertyName.field_Char) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<char>(this.field_Char);
+ else if (name == PropertyName._fieldChar) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<char>(this._fieldChar);
return true;
}
- else if (name == PropertyName.field_SByte) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<sbyte>(this.field_SByte);
+ else if (name == PropertyName._fieldSByte) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<sbyte>(this._fieldSByte);
return true;
}
- else if (name == PropertyName.field_Int16) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<short>(this.field_Int16);
+ else if (name == PropertyName._fieldInt16) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<short>(this._fieldInt16);
return true;
}
- else if (name == PropertyName.field_Int32) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this.field_Int32);
+ else if (name == PropertyName._fieldInt32) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this._fieldInt32);
return true;
}
- else if (name == PropertyName.field_Int64) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long>(this.field_Int64);
+ else if (name == PropertyName._fieldInt64) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long>(this._fieldInt64);
return true;
}
- else if (name == PropertyName.field_Byte) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte>(this.field_Byte);
+ else if (name == PropertyName._fieldByte) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte>(this._fieldByte);
return true;
}
- else if (name == PropertyName.field_UInt16) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ushort>(this.field_UInt16);
+ else if (name == PropertyName._fieldUInt16) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ushort>(this._fieldUInt16);
return true;
}
- else if (name == PropertyName.field_UInt32) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<uint>(this.field_UInt32);
+ else if (name == PropertyName._fieldUInt32) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<uint>(this._fieldUInt32);
return true;
}
- else if (name == PropertyName.field_UInt64) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ulong>(this.field_UInt64);
+ else if (name == PropertyName._fieldUInt64) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ulong>(this._fieldUInt64);
return true;
}
- else if (name == PropertyName.field_Single) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.field_Single);
+ else if (name == PropertyName._fieldSingle) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this._fieldSingle);
return true;
}
- else if (name == PropertyName.field_Double) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double>(this.field_Double);
+ else if (name == PropertyName._fieldDouble) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double>(this._fieldDouble);
return true;
}
- else if (name == PropertyName.field_String) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.field_String);
+ else if (name == PropertyName._fieldString) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._fieldString);
return true;
}
- else if (name == PropertyName.field_Vector2) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2>(this.field_Vector2);
+ else if (name == PropertyName._fieldVector2) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2>(this._fieldVector2);
return true;
}
- else if (name == PropertyName.field_Vector2I) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2I>(this.field_Vector2I);
+ else if (name == PropertyName._fieldVector2I) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2I>(this._fieldVector2I);
return true;
}
- else if (name == PropertyName.field_Rect2) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2>(this.field_Rect2);
+ else if (name == PropertyName._fieldRect2) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2>(this._fieldRect2);
return true;
}
- else if (name == PropertyName.field_Rect2I) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2I>(this.field_Rect2I);
+ else if (name == PropertyName._fieldRect2I) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2I>(this._fieldRect2I);
return true;
}
- else if (name == PropertyName.field_Transform2D) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform2D>(this.field_Transform2D);
+ else if (name == PropertyName._fieldTransform2D) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform2D>(this._fieldTransform2D);
return true;
}
- else if (name == PropertyName.field_Vector3) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3>(this.field_Vector3);
+ else if (name == PropertyName._fieldVector3) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3>(this._fieldVector3);
return true;
}
- else if (name == PropertyName.field_Vector3I) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3I>(this.field_Vector3I);
+ else if (name == PropertyName._fieldVector3I) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3I>(this._fieldVector3I);
return true;
}
- else if (name == PropertyName.field_Basis) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Basis>(this.field_Basis);
+ else if (name == PropertyName._fieldBasis) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Basis>(this._fieldBasis);
return true;
}
- else if (name == PropertyName.field_Quaternion) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Quaternion>(this.field_Quaternion);
+ else if (name == PropertyName._fieldQuaternion) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Quaternion>(this._fieldQuaternion);
return true;
}
- else if (name == PropertyName.field_Transform3D) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform3D>(this.field_Transform3D);
+ else if (name == PropertyName._fieldTransform3D) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform3D>(this._fieldTransform3D);
return true;
}
- else if (name == PropertyName.field_Vector4) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4>(this.field_Vector4);
+ else if (name == PropertyName._fieldVector4) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4>(this._fieldVector4);
return true;
}
- else if (name == PropertyName.field_Vector4I) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4I>(this.field_Vector4I);
+ else if (name == PropertyName._fieldVector4I) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4I>(this._fieldVector4I);
return true;
}
- else if (name == PropertyName.field_Projection) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Projection>(this.field_Projection);
+ else if (name == PropertyName._fieldProjection) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Projection>(this._fieldProjection);
return true;
}
- else if (name == PropertyName.field_Aabb) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Aabb>(this.field_Aabb);
+ else if (name == PropertyName._fieldAabb) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Aabb>(this._fieldAabb);
return true;
}
- else if (name == PropertyName.field_Color) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color>(this.field_Color);
+ else if (name == PropertyName._fieldColor) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color>(this._fieldColor);
return true;
}
- else if (name == PropertyName.field_Plane) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Plane>(this.field_Plane);
+ else if (name == PropertyName._fieldPlane) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Plane>(this._fieldPlane);
return true;
}
- else if (name == PropertyName.field_Callable) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Callable>(this.field_Callable);
+ else if (name == PropertyName._fieldCallable) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Callable>(this._fieldCallable);
return true;
}
- else if (name == PropertyName.field_Signal) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Signal>(this.field_Signal);
+ else if (name == PropertyName._fieldSignal) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Signal>(this._fieldSignal);
return true;
}
- else if (name == PropertyName.field_Enum) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedFields.MyEnum>(this.field_Enum);
+ else if (name == PropertyName._fieldEnum) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedFields.MyEnum>(this._fieldEnum);
return true;
}
- else if (name == PropertyName.field_FlagsEnum) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedFields.MyFlagsEnum>(this.field_FlagsEnum);
+ else if (name == PropertyName._fieldFlagsEnum) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedFields.MyFlagsEnum>(this._fieldFlagsEnum);
return true;
}
- else if (name == PropertyName.field_ByteArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte[]>(this.field_ByteArray);
+ else if (name == PropertyName._fieldByteArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte[]>(this._fieldByteArray);
return true;
}
- else if (name == PropertyName.field_Int32Array) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this.field_Int32Array);
+ else if (name == PropertyName._fieldInt32Array) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this._fieldInt32Array);
return true;
}
- else if (name == PropertyName.field_Int64Array) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long[]>(this.field_Int64Array);
+ else if (name == PropertyName._fieldInt64Array) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long[]>(this._fieldInt64Array);
return true;
}
- else if (name == PropertyName.field_SingleArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float[]>(this.field_SingleArray);
+ else if (name == PropertyName._fieldSingleArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float[]>(this._fieldSingleArray);
return true;
}
- else if (name == PropertyName.field_DoubleArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double[]>(this.field_DoubleArray);
+ else if (name == PropertyName._fieldDoubleArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double[]>(this._fieldDoubleArray);
return true;
}
- else if (name == PropertyName.field_StringArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this.field_StringArray);
+ else if (name == PropertyName._fieldStringArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this._fieldStringArray);
return true;
}
- else if (name == PropertyName.field_StringArrayEnum) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this.field_StringArrayEnum);
+ else if (name == PropertyName._fieldStringArrayEnum) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this._fieldStringArrayEnum);
return true;
}
- else if (name == PropertyName.field_Vector2Array) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2[]>(this.field_Vector2Array);
+ else if (name == PropertyName._fieldVector2Array) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2[]>(this._fieldVector2Array);
return true;
}
- else if (name == PropertyName.field_Vector3Array) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3[]>(this.field_Vector3Array);
+ else if (name == PropertyName._fieldVector3Array) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3[]>(this._fieldVector3Array);
return true;
}
- else if (name == PropertyName.field_ColorArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color[]>(this.field_ColorArray);
+ else if (name == PropertyName._fieldColorArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color[]>(this._fieldColorArray);
return true;
}
- else if (name == PropertyName.field_GodotObjectOrDerivedArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFromSystemArrayOfGodotObject(this.field_GodotObjectOrDerivedArray);
+ else if (name == PropertyName._fieldGodotObjectOrDerivedArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFromSystemArrayOfGodotObject(this._fieldGodotObjectOrDerivedArray);
return true;
}
- else if (name == PropertyName.field_StringNameArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.StringName[]>(this.field_StringNameArray);
+ else if (name == PropertyName._fieldStringNameArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.StringName[]>(this._fieldStringNameArray);
return true;
}
- else if (name == PropertyName.field_NodePathArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath[]>(this.field_NodePathArray);
+ else if (name == PropertyName._fieldNodePathArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath[]>(this._fieldNodePathArray);
return true;
}
- else if (name == PropertyName.field_RidArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid[]>(this.field_RidArray);
+ else if (name == PropertyName._fieldRidArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid[]>(this._fieldRidArray);
return true;
}
- else if (name == PropertyName.field_empty_Int32Array) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this.field_empty_Int32Array);
+ else if (name == PropertyName._fieldEmptyInt32Array) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this._fieldEmptyInt32Array);
return true;
}
- else if (name == PropertyName.field_array_from_list) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this.field_array_from_list);
+ else if (name == PropertyName._fieldArrayFromList) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this._fieldArrayFromList);
return true;
}
- else if (name == PropertyName.field_Variant) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Variant>(this.field_Variant);
+ else if (name == PropertyName._fieldVariant) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Variant>(this._fieldVariant);
return true;
}
- else if (name == PropertyName.field_GodotObjectOrDerived) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.GodotObject>(this.field_GodotObjectOrDerived);
+ else if (name == PropertyName._fieldGodotObjectOrDerived) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.GodotObject>(this._fieldGodotObjectOrDerived);
return true;
}
- else if (name == PropertyName.field_GodotResourceTexture) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Texture>(this.field_GodotResourceTexture);
+ else if (name == PropertyName._fieldGodotResourceTexture) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Texture>(this._fieldGodotResourceTexture);
return true;
}
- else if (name == PropertyName.field_StringName) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.StringName>(this.field_StringName);
+ else if (name == PropertyName._fieldStringName) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.StringName>(this._fieldStringName);
return true;
}
- else if (name == PropertyName.field_NodePath) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath>(this.field_NodePath);
+ else if (name == PropertyName._fieldNodePath) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath>(this._fieldNodePath);
return true;
}
- else if (name == PropertyName.field_Rid) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid>(this.field_Rid);
+ else if (name == PropertyName._fieldRid) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid>(this._fieldRid);
return true;
}
- else if (name == PropertyName.field_GodotDictionary) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Dictionary>(this.field_GodotDictionary);
+ else if (name == PropertyName._fieldGodotDictionary) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Dictionary>(this._fieldGodotDictionary);
return true;
}
- else if (name == PropertyName.field_GodotArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Array>(this.field_GodotArray);
+ else if (name == PropertyName._fieldGodotArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Array>(this._fieldGodotArray);
return true;
}
- else if (name == PropertyName.field_GodotGenericDictionary) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFromDictionary(this.field_GodotGenericDictionary);
+ else if (name == PropertyName._fieldGodotGenericDictionary) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFromDictionary(this._fieldGodotGenericDictionary);
return true;
}
- else if (name == PropertyName.field_GodotGenericArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFromArray(this.field_GodotGenericArray);
+ else if (name == PropertyName._fieldGodotGenericArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFromArray(this._fieldGodotGenericArray);
return true;
}
- else if (name == PropertyName.field_empty_Int64Array) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long[]>(this.field_empty_Int64Array);
+ else if (name == PropertyName._fieldEmptyInt64Array) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long[]>(this._fieldEmptyInt64Array);
return true;
}
return base.GetGodotClassPropertyValue(name, out value);
@@ -750,66 +750,66 @@ partial class ExportedFields
internal new static global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo> GetGodotPropertyList()
{
var properties = new global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo>();
- properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.field_Boolean, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_Char, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_SByte, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_Int16, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_Int32, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_Int64, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_Byte, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_UInt16, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_UInt32, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_UInt64, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.field_Single, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.field_Double, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.field_String, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)5, name: PropertyName.field_Vector2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)6, name: PropertyName.field_Vector2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)7, name: PropertyName.field_Rect2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)8, name: PropertyName.field_Rect2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)11, name: PropertyName.field_Transform2D, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)9, name: PropertyName.field_Vector3, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)10, name: PropertyName.field_Vector3I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)17, name: PropertyName.field_Basis, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)15, name: PropertyName.field_Quaternion, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)18, name: PropertyName.field_Transform3D, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)12, name: PropertyName.field_Vector4, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)13, name: PropertyName.field_Vector4I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)19, name: PropertyName.field_Projection, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)16, name: PropertyName.field_Aabb, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)20, name: PropertyName.field_Color, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)14, name: PropertyName.field_Plane, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)25, name: PropertyName.field_Callable, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)26, name: PropertyName.field_Signal, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_Enum, hint: (global::Godot.PropertyHint)2, hintString: "A,B,C", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.field_FlagsEnum, hint: (global::Godot.PropertyHint)6, hintString: "A:0,B:1,C:2", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)29, name: PropertyName.field_ByteArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)30, name: PropertyName.field_Int32Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)31, name: PropertyName.field_Int64Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)32, name: PropertyName.field_SingleArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)33, name: PropertyName.field_DoubleArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)34, name: PropertyName.field_StringArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)34, name: PropertyName.field_StringArrayEnum, hint: (global::Godot.PropertyHint)23, hintString: "4/2:A,B,C", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)35, name: PropertyName.field_Vector2Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)36, name: PropertyName.field_Vector3Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)37, name: PropertyName.field_ColorArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.field_GodotObjectOrDerivedArray, hint: (global::Godot.PropertyHint)23, hintString: "24/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.field_StringNameArray, hint: (global::Godot.PropertyHint)23, hintString: "21/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.field_NodePathArray, hint: (global::Godot.PropertyHint)23, hintString: "22/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.field_RidArray, hint: (global::Godot.PropertyHint)23, hintString: "23/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)30, name: PropertyName.field_empty_Int32Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)30, name: PropertyName.field_array_from_list, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)0, name: PropertyName.field_Variant, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)135174, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)24, name: PropertyName.field_GodotObjectOrDerived, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)24, name: PropertyName.field_GodotResourceTexture, hint: (global::Godot.PropertyHint)17, hintString: "Texture", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)21, name: PropertyName.field_StringName, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)22, name: PropertyName.field_NodePath, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)23, name: PropertyName.field_Rid, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)27, name: PropertyName.field_GodotDictionary, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.field_GodotArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)27, name: PropertyName.field_GodotGenericDictionary, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.field_GodotGenericArray, hint: (global::Godot.PropertyHint)23, hintString: "2/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)31, name: PropertyName.field_empty_Int64Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName._fieldBoolean, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldChar, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldSByte, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldInt16, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldInt32, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldInt64, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldByte, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldUInt16, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldUInt32, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldUInt64, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName._fieldSingle, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName._fieldDouble, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName._fieldString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)5, name: PropertyName._fieldVector2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)6, name: PropertyName._fieldVector2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)7, name: PropertyName._fieldRect2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)8, name: PropertyName._fieldRect2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)11, name: PropertyName._fieldTransform2D, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)9, name: PropertyName._fieldVector3, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)10, name: PropertyName._fieldVector3I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)17, name: PropertyName._fieldBasis, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)15, name: PropertyName._fieldQuaternion, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)18, name: PropertyName._fieldTransform3D, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)12, name: PropertyName._fieldVector4, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)13, name: PropertyName._fieldVector4I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)19, name: PropertyName._fieldProjection, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)16, name: PropertyName._fieldAabb, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)20, name: PropertyName._fieldColor, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)14, name: PropertyName._fieldPlane, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)25, name: PropertyName._fieldCallable, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)26, name: PropertyName._fieldSignal, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldEnum, hint: (global::Godot.PropertyHint)2, hintString: "A,B,C", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._fieldFlagsEnum, hint: (global::Godot.PropertyHint)6, hintString: "A:0,B:1,C:2", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)29, name: PropertyName._fieldByteArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)30, name: PropertyName._fieldInt32Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)31, name: PropertyName._fieldInt64Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)32, name: PropertyName._fieldSingleArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)33, name: PropertyName._fieldDoubleArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)34, name: PropertyName._fieldStringArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)34, name: PropertyName._fieldStringArrayEnum, hint: (global::Godot.PropertyHint)23, hintString: "4/2:A,B,C", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)35, name: PropertyName._fieldVector2Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)36, name: PropertyName._fieldVector3Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)37, name: PropertyName._fieldColorArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName._fieldGodotObjectOrDerivedArray, hint: (global::Godot.PropertyHint)23, hintString: "24/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName._fieldStringNameArray, hint: (global::Godot.PropertyHint)23, hintString: "21/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName._fieldNodePathArray, hint: (global::Godot.PropertyHint)23, hintString: "22/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName._fieldRidArray, hint: (global::Godot.PropertyHint)23, hintString: "23/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)30, name: PropertyName._fieldEmptyInt32Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)30, name: PropertyName._fieldArrayFromList, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)0, name: PropertyName._fieldVariant, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)135174, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)24, name: PropertyName._fieldGodotObjectOrDerived, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)24, name: PropertyName._fieldGodotResourceTexture, hint: (global::Godot.PropertyHint)17, hintString: "Texture", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)21, name: PropertyName._fieldStringName, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)22, name: PropertyName._fieldNodePath, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)23, name: PropertyName._fieldRid, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)27, name: PropertyName._fieldGodotDictionary, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName._fieldGodotArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)27, name: PropertyName._fieldGodotGenericDictionary, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName._fieldGodotGenericArray, hint: (global::Godot.PropertyHint)23, hintString: "2/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)31, name: PropertyName._fieldEmptyInt64Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
return properties;
}
#pragma warning restore CS0109
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptPropertyDefVal.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptPropertyDefVal.generated.cs
index 185b8e4ac6..367cb073c0 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptPropertyDefVal.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptPropertyDefVal.generated.cs
@@ -12,126 +12,126 @@ partial class ExportedFields
internal new static global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant> GetGodotPropertyDefaultValues()
{
var values = new global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant>(60);
- bool __field_Boolean_default_value = true;
- values.Add(PropertyName.field_Boolean, global::Godot.Variant.From<bool>(__field_Boolean_default_value));
- char __field_Char_default_value = 'f';
- values.Add(PropertyName.field_Char, global::Godot.Variant.From<char>(__field_Char_default_value));
- sbyte __field_SByte_default_value = 10;
- values.Add(PropertyName.field_SByte, global::Godot.Variant.From<sbyte>(__field_SByte_default_value));
- short __field_Int16_default_value = 10;
- values.Add(PropertyName.field_Int16, global::Godot.Variant.From<short>(__field_Int16_default_value));
- int __field_Int32_default_value = 10;
- values.Add(PropertyName.field_Int32, global::Godot.Variant.From<int>(__field_Int32_default_value));
- long __field_Int64_default_value = 10;
- values.Add(PropertyName.field_Int64, global::Godot.Variant.From<long>(__field_Int64_default_value));
- byte __field_Byte_default_value = 10;
- values.Add(PropertyName.field_Byte, global::Godot.Variant.From<byte>(__field_Byte_default_value));
- ushort __field_UInt16_default_value = 10;
- values.Add(PropertyName.field_UInt16, global::Godot.Variant.From<ushort>(__field_UInt16_default_value));
- uint __field_UInt32_default_value = 10;
- values.Add(PropertyName.field_UInt32, global::Godot.Variant.From<uint>(__field_UInt32_default_value));
- ulong __field_UInt64_default_value = 10;
- values.Add(PropertyName.field_UInt64, global::Godot.Variant.From<ulong>(__field_UInt64_default_value));
- float __field_Single_default_value = 10;
- values.Add(PropertyName.field_Single, global::Godot.Variant.From<float>(__field_Single_default_value));
- double __field_Double_default_value = 10;
- values.Add(PropertyName.field_Double, global::Godot.Variant.From<double>(__field_Double_default_value));
- string __field_String_default_value = "foo";
- values.Add(PropertyName.field_String, global::Godot.Variant.From<string>(__field_String_default_value));
- global::Godot.Vector2 __field_Vector2_default_value = new(10f, 10f);
- values.Add(PropertyName.field_Vector2, global::Godot.Variant.From<global::Godot.Vector2>(__field_Vector2_default_value));
- global::Godot.Vector2I __field_Vector2I_default_value = global::Godot.Vector2I.Up;
- values.Add(PropertyName.field_Vector2I, global::Godot.Variant.From<global::Godot.Vector2I>(__field_Vector2I_default_value));
- global::Godot.Rect2 __field_Rect2_default_value = new(new global::Godot.Vector2(10f, 10f), new global::Godot.Vector2(10f, 10f));
- values.Add(PropertyName.field_Rect2, global::Godot.Variant.From<global::Godot.Rect2>(__field_Rect2_default_value));
- global::Godot.Rect2I __field_Rect2I_default_value = new(new global::Godot.Vector2I(10, 10), new global::Godot.Vector2I(10, 10));
- values.Add(PropertyName.field_Rect2I, global::Godot.Variant.From<global::Godot.Rect2I>(__field_Rect2I_default_value));
- global::Godot.Transform2D __field_Transform2D_default_value = global::Godot.Transform2D.Identity;
- values.Add(PropertyName.field_Transform2D, global::Godot.Variant.From<global::Godot.Transform2D>(__field_Transform2D_default_value));
- global::Godot.Vector3 __field_Vector3_default_value = new(10f, 10f, 10f);
- values.Add(PropertyName.field_Vector3, global::Godot.Variant.From<global::Godot.Vector3>(__field_Vector3_default_value));
- global::Godot.Vector3I __field_Vector3I_default_value = global::Godot.Vector3I.Back;
- values.Add(PropertyName.field_Vector3I, global::Godot.Variant.From<global::Godot.Vector3I>(__field_Vector3I_default_value));
- global::Godot.Basis __field_Basis_default_value = new global::Godot.Basis(global::Godot.Quaternion.Identity);
- values.Add(PropertyName.field_Basis, global::Godot.Variant.From<global::Godot.Basis>(__field_Basis_default_value));
- global::Godot.Quaternion __field_Quaternion_default_value = new global::Godot.Quaternion(global::Godot.Basis.Identity);
- values.Add(PropertyName.field_Quaternion, global::Godot.Variant.From<global::Godot.Quaternion>(__field_Quaternion_default_value));
- global::Godot.Transform3D __field_Transform3D_default_value = global::Godot.Transform3D.Identity;
- values.Add(PropertyName.field_Transform3D, global::Godot.Variant.From<global::Godot.Transform3D>(__field_Transform3D_default_value));
- global::Godot.Vector4 __field_Vector4_default_value = new(10f, 10f, 10f, 10f);
- values.Add(PropertyName.field_Vector4, global::Godot.Variant.From<global::Godot.Vector4>(__field_Vector4_default_value));
- global::Godot.Vector4I __field_Vector4I_default_value = global::Godot.Vector4I.One;
- values.Add(PropertyName.field_Vector4I, global::Godot.Variant.From<global::Godot.Vector4I>(__field_Vector4I_default_value));
- global::Godot.Projection __field_Projection_default_value = global::Godot.Projection.Identity;
- values.Add(PropertyName.field_Projection, global::Godot.Variant.From<global::Godot.Projection>(__field_Projection_default_value));
- global::Godot.Aabb __field_Aabb_default_value = new global::Godot.Aabb(10f, 10f, 10f, new global::Godot.Vector3(1f, 1f, 1f));
- values.Add(PropertyName.field_Aabb, global::Godot.Variant.From<global::Godot.Aabb>(__field_Aabb_default_value));
- global::Godot.Color __field_Color_default_value = global::Godot.Colors.Aquamarine;
- values.Add(PropertyName.field_Color, global::Godot.Variant.From<global::Godot.Color>(__field_Color_default_value));
- global::Godot.Plane __field_Plane_default_value = global::Godot.Plane.PlaneXZ;
- values.Add(PropertyName.field_Plane, global::Godot.Variant.From<global::Godot.Plane>(__field_Plane_default_value));
- global::Godot.Callable __field_Callable_default_value = new global::Godot.Callable(global::Godot.Engine.GetMainLoop(), "_process");
- values.Add(PropertyName.field_Callable, global::Godot.Variant.From<global::Godot.Callable>(__field_Callable_default_value));
- global::Godot.Signal __field_Signal_default_value = new global::Godot.Signal(global::Godot.Engine.GetMainLoop(), "property_list_changed");
- values.Add(PropertyName.field_Signal, global::Godot.Variant.From<global::Godot.Signal>(__field_Signal_default_value));
- global::ExportedFields.MyEnum __field_Enum_default_value = global::ExportedFields.MyEnum.C;
- values.Add(PropertyName.field_Enum, global::Godot.Variant.From<global::ExportedFields.MyEnum>(__field_Enum_default_value));
- global::ExportedFields.MyFlagsEnum __field_FlagsEnum_default_value = global::ExportedFields.MyFlagsEnum.C;
- values.Add(PropertyName.field_FlagsEnum, global::Godot.Variant.From<global::ExportedFields.MyFlagsEnum>(__field_FlagsEnum_default_value));
- byte[] __field_ByteArray_default_value = { 0, 1, 2, 3, 4, 5, 6 };
- values.Add(PropertyName.field_ByteArray, global::Godot.Variant.From<byte[]>(__field_ByteArray_default_value));
- int[] __field_Int32Array_default_value = { 0, 1, 2, 3, 4, 5, 6 };
- values.Add(PropertyName.field_Int32Array, global::Godot.Variant.From<int[]>(__field_Int32Array_default_value));
- long[] __field_Int64Array_default_value = { 0, 1, 2, 3, 4, 5, 6 };
- values.Add(PropertyName.field_Int64Array, global::Godot.Variant.From<long[]>(__field_Int64Array_default_value));
- float[] __field_SingleArray_default_value = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
- values.Add(PropertyName.field_SingleArray, global::Godot.Variant.From<float[]>(__field_SingleArray_default_value));
- double[] __field_DoubleArray_default_value = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
- values.Add(PropertyName.field_DoubleArray, global::Godot.Variant.From<double[]>(__field_DoubleArray_default_value));
- string[] __field_StringArray_default_value = { "foo", "bar" };
- values.Add(PropertyName.field_StringArray, global::Godot.Variant.From<string[]>(__field_StringArray_default_value));
- string[] __field_StringArrayEnum_default_value = { "foo", "bar" };
- values.Add(PropertyName.field_StringArrayEnum, global::Godot.Variant.From<string[]>(__field_StringArrayEnum_default_value));
- global::Godot.Vector2[] __field_Vector2Array_default_value = { global::Godot.Vector2.Up, global::Godot.Vector2.Down, global::Godot.Vector2.Left, global::Godot.Vector2.Right };
- values.Add(PropertyName.field_Vector2Array, global::Godot.Variant.From<global::Godot.Vector2[]>(__field_Vector2Array_default_value));
- global::Godot.Vector3[] __field_Vector3Array_default_value = { global::Godot.Vector3.Up, global::Godot.Vector3.Down, global::Godot.Vector3.Left, global::Godot.Vector3.Right };
- values.Add(PropertyName.field_Vector3Array, global::Godot.Variant.From<global::Godot.Vector3[]>(__field_Vector3Array_default_value));
- global::Godot.Color[] __field_ColorArray_default_value = { global::Godot.Colors.Aqua, global::Godot.Colors.Aquamarine, global::Godot.Colors.Azure, global::Godot.Colors.Beige };
- values.Add(PropertyName.field_ColorArray, global::Godot.Variant.From<global::Godot.Color[]>(__field_ColorArray_default_value));
- global::Godot.GodotObject[] __field_GodotObjectOrDerivedArray_default_value = { null };
- values.Add(PropertyName.field_GodotObjectOrDerivedArray, global::Godot.Variant.CreateFrom(__field_GodotObjectOrDerivedArray_default_value));
- global::Godot.StringName[] __field_StringNameArray_default_value = { "foo", "bar" };
- values.Add(PropertyName.field_StringNameArray, global::Godot.Variant.From<global::Godot.StringName[]>(__field_StringNameArray_default_value));
- global::Godot.NodePath[] __field_NodePathArray_default_value = { "foo", "bar" };
- values.Add(PropertyName.field_NodePathArray, global::Godot.Variant.From<global::Godot.NodePath[]>(__field_NodePathArray_default_value));
- global::Godot.Rid[] __field_RidArray_default_value = { default, default, default };
- values.Add(PropertyName.field_RidArray, global::Godot.Variant.From<global::Godot.Rid[]>(__field_RidArray_default_value));
- int[] __field_empty_Int32Array_default_value = global::System.Array.Empty<int>();
- values.Add(PropertyName.field_empty_Int32Array, global::Godot.Variant.From<int[]>(__field_empty_Int32Array_default_value));
- int[] __field_array_from_list_default_value = new global::System.Collections.Generic.List<int>(global::System.Array.Empty<int>()).ToArray();
- values.Add(PropertyName.field_array_from_list, global::Godot.Variant.From<int[]>(__field_array_from_list_default_value));
- global::Godot.Variant __field_Variant_default_value = "foo";
- values.Add(PropertyName.field_Variant, global::Godot.Variant.From<global::Godot.Variant>(__field_Variant_default_value));
- global::Godot.GodotObject __field_GodotObjectOrDerived_default_value = default;
- values.Add(PropertyName.field_GodotObjectOrDerived, global::Godot.Variant.From<global::Godot.GodotObject>(__field_GodotObjectOrDerived_default_value));
- global::Godot.Texture __field_GodotResourceTexture_default_value = default;
- values.Add(PropertyName.field_GodotResourceTexture, global::Godot.Variant.From<global::Godot.Texture>(__field_GodotResourceTexture_default_value));
- global::Godot.StringName __field_StringName_default_value = new global::Godot.StringName("foo");
- values.Add(PropertyName.field_StringName, global::Godot.Variant.From<global::Godot.StringName>(__field_StringName_default_value));
- global::Godot.NodePath __field_NodePath_default_value = new global::Godot.NodePath("foo");
- values.Add(PropertyName.field_NodePath, global::Godot.Variant.From<global::Godot.NodePath>(__field_NodePath_default_value));
- global::Godot.Rid __field_Rid_default_value = default;
- values.Add(PropertyName.field_Rid, global::Godot.Variant.From<global::Godot.Rid>(__field_Rid_default_value));
- global::Godot.Collections.Dictionary __field_GodotDictionary_default_value = new() { { "foo", 10 }, { global::Godot.Vector2.Up, global::Godot.Colors.Chocolate } };
- values.Add(PropertyName.field_GodotDictionary, global::Godot.Variant.From<global::Godot.Collections.Dictionary>(__field_GodotDictionary_default_value));
- global::Godot.Collections.Array __field_GodotArray_default_value = new() { "foo", 10, global::Godot.Vector2.Up, global::Godot.Colors.Chocolate };
- values.Add(PropertyName.field_GodotArray, global::Godot.Variant.From<global::Godot.Collections.Array>(__field_GodotArray_default_value));
- global::Godot.Collections.Dictionary<string, bool> __field_GodotGenericDictionary_default_value = new() { { "foo", true }, { "bar", false } };
- values.Add(PropertyName.field_GodotGenericDictionary, global::Godot.Variant.CreateFrom(__field_GodotGenericDictionary_default_value));
- global::Godot.Collections.Array<int> __field_GodotGenericArray_default_value = new() { 0, 1, 2, 3, 4, 5, 6 };
- values.Add(PropertyName.field_GodotGenericArray, global::Godot.Variant.CreateFrom(__field_GodotGenericArray_default_value));
- long[] __field_empty_Int64Array_default_value = global::System.Array.Empty<long>();
- values.Add(PropertyName.field_empty_Int64Array, global::Godot.Variant.From<long[]>(__field_empty_Int64Array_default_value));
+ bool ___fieldBoolean_default_value = true;
+ values.Add(PropertyName._fieldBoolean, global::Godot.Variant.From<bool>(___fieldBoolean_default_value));
+ char ___fieldChar_default_value = 'f';
+ values.Add(PropertyName._fieldChar, global::Godot.Variant.From<char>(___fieldChar_default_value));
+ sbyte ___fieldSByte_default_value = 10;
+ values.Add(PropertyName._fieldSByte, global::Godot.Variant.From<sbyte>(___fieldSByte_default_value));
+ short ___fieldInt16_default_value = 10;
+ values.Add(PropertyName._fieldInt16, global::Godot.Variant.From<short>(___fieldInt16_default_value));
+ int ___fieldInt32_default_value = 10;
+ values.Add(PropertyName._fieldInt32, global::Godot.Variant.From<int>(___fieldInt32_default_value));
+ long ___fieldInt64_default_value = 10;
+ values.Add(PropertyName._fieldInt64, global::Godot.Variant.From<long>(___fieldInt64_default_value));
+ byte ___fieldByte_default_value = 10;
+ values.Add(PropertyName._fieldByte, global::Godot.Variant.From<byte>(___fieldByte_default_value));
+ ushort ___fieldUInt16_default_value = 10;
+ values.Add(PropertyName._fieldUInt16, global::Godot.Variant.From<ushort>(___fieldUInt16_default_value));
+ uint ___fieldUInt32_default_value = 10;
+ values.Add(PropertyName._fieldUInt32, global::Godot.Variant.From<uint>(___fieldUInt32_default_value));
+ ulong ___fieldUInt64_default_value = 10;
+ values.Add(PropertyName._fieldUInt64, global::Godot.Variant.From<ulong>(___fieldUInt64_default_value));
+ float ___fieldSingle_default_value = 10;
+ values.Add(PropertyName._fieldSingle, global::Godot.Variant.From<float>(___fieldSingle_default_value));
+ double ___fieldDouble_default_value = 10;
+ values.Add(PropertyName._fieldDouble, global::Godot.Variant.From<double>(___fieldDouble_default_value));
+ string ___fieldString_default_value = "foo";
+ values.Add(PropertyName._fieldString, global::Godot.Variant.From<string>(___fieldString_default_value));
+ global::Godot.Vector2 ___fieldVector2_default_value = new(10f, 10f);
+ values.Add(PropertyName._fieldVector2, global::Godot.Variant.From<global::Godot.Vector2>(___fieldVector2_default_value));
+ global::Godot.Vector2I ___fieldVector2I_default_value = global::Godot.Vector2I.Up;
+ values.Add(PropertyName._fieldVector2I, global::Godot.Variant.From<global::Godot.Vector2I>(___fieldVector2I_default_value));
+ global::Godot.Rect2 ___fieldRect2_default_value = new(new global::Godot.Vector2(10f, 10f), new global::Godot.Vector2(10f, 10f));
+ values.Add(PropertyName._fieldRect2, global::Godot.Variant.From<global::Godot.Rect2>(___fieldRect2_default_value));
+ global::Godot.Rect2I ___fieldRect2I_default_value = new(new global::Godot.Vector2I(10, 10), new global::Godot.Vector2I(10, 10));
+ values.Add(PropertyName._fieldRect2I, global::Godot.Variant.From<global::Godot.Rect2I>(___fieldRect2I_default_value));
+ global::Godot.Transform2D ___fieldTransform2D_default_value = global::Godot.Transform2D.Identity;
+ values.Add(PropertyName._fieldTransform2D, global::Godot.Variant.From<global::Godot.Transform2D>(___fieldTransform2D_default_value));
+ global::Godot.Vector3 ___fieldVector3_default_value = new(10f, 10f, 10f);
+ values.Add(PropertyName._fieldVector3, global::Godot.Variant.From<global::Godot.Vector3>(___fieldVector3_default_value));
+ global::Godot.Vector3I ___fieldVector3I_default_value = global::Godot.Vector3I.Back;
+ values.Add(PropertyName._fieldVector3I, global::Godot.Variant.From<global::Godot.Vector3I>(___fieldVector3I_default_value));
+ global::Godot.Basis ___fieldBasis_default_value = new global::Godot.Basis(global::Godot.Quaternion.Identity);
+ values.Add(PropertyName._fieldBasis, global::Godot.Variant.From<global::Godot.Basis>(___fieldBasis_default_value));
+ global::Godot.Quaternion ___fieldQuaternion_default_value = new global::Godot.Quaternion(global::Godot.Basis.Identity);
+ values.Add(PropertyName._fieldQuaternion, global::Godot.Variant.From<global::Godot.Quaternion>(___fieldQuaternion_default_value));
+ global::Godot.Transform3D ___fieldTransform3D_default_value = global::Godot.Transform3D.Identity;
+ values.Add(PropertyName._fieldTransform3D, global::Godot.Variant.From<global::Godot.Transform3D>(___fieldTransform3D_default_value));
+ global::Godot.Vector4 ___fieldVector4_default_value = new(10f, 10f, 10f, 10f);
+ values.Add(PropertyName._fieldVector4, global::Godot.Variant.From<global::Godot.Vector4>(___fieldVector4_default_value));
+ global::Godot.Vector4I ___fieldVector4I_default_value = global::Godot.Vector4I.One;
+ values.Add(PropertyName._fieldVector4I, global::Godot.Variant.From<global::Godot.Vector4I>(___fieldVector4I_default_value));
+ global::Godot.Projection ___fieldProjection_default_value = global::Godot.Projection.Identity;
+ values.Add(PropertyName._fieldProjection, global::Godot.Variant.From<global::Godot.Projection>(___fieldProjection_default_value));
+ global::Godot.Aabb ___fieldAabb_default_value = new global::Godot.Aabb(10f, 10f, 10f, new global::Godot.Vector3(1f, 1f, 1f));
+ values.Add(PropertyName._fieldAabb, global::Godot.Variant.From<global::Godot.Aabb>(___fieldAabb_default_value));
+ global::Godot.Color ___fieldColor_default_value = global::Godot.Colors.Aquamarine;
+ values.Add(PropertyName._fieldColor, global::Godot.Variant.From<global::Godot.Color>(___fieldColor_default_value));
+ global::Godot.Plane ___fieldPlane_default_value = global::Godot.Plane.PlaneXZ;
+ values.Add(PropertyName._fieldPlane, global::Godot.Variant.From<global::Godot.Plane>(___fieldPlane_default_value));
+ global::Godot.Callable ___fieldCallable_default_value = new global::Godot.Callable(global::Godot.Engine.GetMainLoop(), "_process");
+ values.Add(PropertyName._fieldCallable, global::Godot.Variant.From<global::Godot.Callable>(___fieldCallable_default_value));
+ global::Godot.Signal ___fieldSignal_default_value = new global::Godot.Signal(global::Godot.Engine.GetMainLoop(), "property_list_changed");
+ values.Add(PropertyName._fieldSignal, global::Godot.Variant.From<global::Godot.Signal>(___fieldSignal_default_value));
+ global::ExportedFields.MyEnum ___fieldEnum_default_value = global::ExportedFields.MyEnum.C;
+ values.Add(PropertyName._fieldEnum, global::Godot.Variant.From<global::ExportedFields.MyEnum>(___fieldEnum_default_value));
+ global::ExportedFields.MyFlagsEnum ___fieldFlagsEnum_default_value = global::ExportedFields.MyFlagsEnum.C;
+ values.Add(PropertyName._fieldFlagsEnum, global::Godot.Variant.From<global::ExportedFields.MyFlagsEnum>(___fieldFlagsEnum_default_value));
+ byte[] ___fieldByteArray_default_value = { 0, 1, 2, 3, 4, 5, 6 };
+ values.Add(PropertyName._fieldByteArray, global::Godot.Variant.From<byte[]>(___fieldByteArray_default_value));
+ int[] ___fieldInt32Array_default_value = { 0, 1, 2, 3, 4, 5, 6 };
+ values.Add(PropertyName._fieldInt32Array, global::Godot.Variant.From<int[]>(___fieldInt32Array_default_value));
+ long[] ___fieldInt64Array_default_value = { 0, 1, 2, 3, 4, 5, 6 };
+ values.Add(PropertyName._fieldInt64Array, global::Godot.Variant.From<long[]>(___fieldInt64Array_default_value));
+ float[] ___fieldSingleArray_default_value = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
+ values.Add(PropertyName._fieldSingleArray, global::Godot.Variant.From<float[]>(___fieldSingleArray_default_value));
+ double[] ___fieldDoubleArray_default_value = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
+ values.Add(PropertyName._fieldDoubleArray, global::Godot.Variant.From<double[]>(___fieldDoubleArray_default_value));
+ string[] ___fieldStringArray_default_value = { "foo", "bar" };
+ values.Add(PropertyName._fieldStringArray, global::Godot.Variant.From<string[]>(___fieldStringArray_default_value));
+ string[] ___fieldStringArrayEnum_default_value = { "foo", "bar" };
+ values.Add(PropertyName._fieldStringArrayEnum, global::Godot.Variant.From<string[]>(___fieldStringArrayEnum_default_value));
+ global::Godot.Vector2[] ___fieldVector2Array_default_value = { global::Godot.Vector2.Up, global::Godot.Vector2.Down, global::Godot.Vector2.Left, global::Godot.Vector2.Right };
+ values.Add(PropertyName._fieldVector2Array, global::Godot.Variant.From<global::Godot.Vector2[]>(___fieldVector2Array_default_value));
+ global::Godot.Vector3[] ___fieldVector3Array_default_value = { global::Godot.Vector3.Up, global::Godot.Vector3.Down, global::Godot.Vector3.Left, global::Godot.Vector3.Right };
+ values.Add(PropertyName._fieldVector3Array, global::Godot.Variant.From<global::Godot.Vector3[]>(___fieldVector3Array_default_value));
+ global::Godot.Color[] ___fieldColorArray_default_value = { global::Godot.Colors.Aqua, global::Godot.Colors.Aquamarine, global::Godot.Colors.Azure, global::Godot.Colors.Beige };
+ values.Add(PropertyName._fieldColorArray, global::Godot.Variant.From<global::Godot.Color[]>(___fieldColorArray_default_value));
+ global::Godot.GodotObject[] ___fieldGodotObjectOrDerivedArray_default_value = { null };
+ values.Add(PropertyName._fieldGodotObjectOrDerivedArray, global::Godot.Variant.CreateFrom(___fieldGodotObjectOrDerivedArray_default_value));
+ global::Godot.StringName[] ___fieldStringNameArray_default_value = { "foo", "bar" };
+ values.Add(PropertyName._fieldStringNameArray, global::Godot.Variant.From<global::Godot.StringName[]>(___fieldStringNameArray_default_value));
+ global::Godot.NodePath[] ___fieldNodePathArray_default_value = { "foo", "bar" };
+ values.Add(PropertyName._fieldNodePathArray, global::Godot.Variant.From<global::Godot.NodePath[]>(___fieldNodePathArray_default_value));
+ global::Godot.Rid[] ___fieldRidArray_default_value = { default, default, default };
+ values.Add(PropertyName._fieldRidArray, global::Godot.Variant.From<global::Godot.Rid[]>(___fieldRidArray_default_value));
+ int[] ___fieldEmptyInt32Array_default_value = global::System.Array.Empty<int>();
+ values.Add(PropertyName._fieldEmptyInt32Array, global::Godot.Variant.From<int[]>(___fieldEmptyInt32Array_default_value));
+ int[] ___fieldArrayFromList_default_value = new global::System.Collections.Generic.List<int>(global::System.Array.Empty<int>()).ToArray();
+ values.Add(PropertyName._fieldArrayFromList, global::Godot.Variant.From<int[]>(___fieldArrayFromList_default_value));
+ global::Godot.Variant ___fieldVariant_default_value = "foo";
+ values.Add(PropertyName._fieldVariant, global::Godot.Variant.From<global::Godot.Variant>(___fieldVariant_default_value));
+ global::Godot.GodotObject ___fieldGodotObjectOrDerived_default_value = default;
+ values.Add(PropertyName._fieldGodotObjectOrDerived, global::Godot.Variant.From<global::Godot.GodotObject>(___fieldGodotObjectOrDerived_default_value));
+ global::Godot.Texture ___fieldGodotResourceTexture_default_value = default;
+ values.Add(PropertyName._fieldGodotResourceTexture, global::Godot.Variant.From<global::Godot.Texture>(___fieldGodotResourceTexture_default_value));
+ global::Godot.StringName ___fieldStringName_default_value = new global::Godot.StringName("foo");
+ values.Add(PropertyName._fieldStringName, global::Godot.Variant.From<global::Godot.StringName>(___fieldStringName_default_value));
+ global::Godot.NodePath ___fieldNodePath_default_value = new global::Godot.NodePath("foo");
+ values.Add(PropertyName._fieldNodePath, global::Godot.Variant.From<global::Godot.NodePath>(___fieldNodePath_default_value));
+ global::Godot.Rid ___fieldRid_default_value = default;
+ values.Add(PropertyName._fieldRid, global::Godot.Variant.From<global::Godot.Rid>(___fieldRid_default_value));
+ global::Godot.Collections.Dictionary ___fieldGodotDictionary_default_value = new() { { "foo", 10 }, { global::Godot.Vector2.Up, global::Godot.Colors.Chocolate } };
+ values.Add(PropertyName._fieldGodotDictionary, global::Godot.Variant.From<global::Godot.Collections.Dictionary>(___fieldGodotDictionary_default_value));
+ global::Godot.Collections.Array ___fieldGodotArray_default_value = new() { "foo", 10, global::Godot.Vector2.Up, global::Godot.Colors.Chocolate };
+ values.Add(PropertyName._fieldGodotArray, global::Godot.Variant.From<global::Godot.Collections.Array>(___fieldGodotArray_default_value));
+ global::Godot.Collections.Dictionary<string, bool> ___fieldGodotGenericDictionary_default_value = new() { { "foo", true }, { "bar", false } };
+ values.Add(PropertyName._fieldGodotGenericDictionary, global::Godot.Variant.CreateFrom(___fieldGodotGenericDictionary_default_value));
+ global::Godot.Collections.Array<int> ___fieldGodotGenericArray_default_value = new() { 0, 1, 2, 3, 4, 5, 6 };
+ values.Add(PropertyName._fieldGodotGenericArray, global::Godot.Variant.CreateFrom(___fieldGodotGenericArray_default_value));
+ long[] ___fieldEmptyInt64Array_default_value = global::System.Array.Empty<long>();
+ values.Add(PropertyName._fieldEmptyInt64Array, global::Godot.Variant.From<long[]>(___fieldEmptyInt64Array_default_value));
return values;
}
#endif // TOOLS
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptProperties.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptProperties.generated.cs
index b5ec9b5b49..6e0e9fffbe 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptProperties.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptProperties.generated.cs
@@ -9,209 +9,209 @@ partial class ExportedProperties
/// </summary>
public new class PropertyName : global::Godot.GodotObject.PropertyName {
/// <summary>
- /// Cached name for the 'NotGenerate_Complex_Lamda_Property' property.
+ /// Cached name for the 'NotGenerateComplexLamdaProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName NotGenerate_Complex_Lamda_Property = "NotGenerate_Complex_Lamda_Property";
+ public new static readonly global::Godot.StringName NotGenerateComplexLamdaProperty = "NotGenerateComplexLamdaProperty";
/// <summary>
- /// Cached name for the 'NotGenerate_Lamda_NoField_Property' property.
+ /// Cached name for the 'NotGenerateLamdaNoFieldProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName NotGenerate_Lamda_NoField_Property = "NotGenerate_Lamda_NoField_Property";
+ public new static readonly global::Godot.StringName NotGenerateLamdaNoFieldProperty = "NotGenerateLamdaNoFieldProperty";
/// <summary>
- /// Cached name for the 'NotGenerate_Complex_Return_Property' property.
+ /// Cached name for the 'NotGenerateComplexReturnProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName NotGenerate_Complex_Return_Property = "NotGenerate_Complex_Return_Property";
+ public new static readonly global::Godot.StringName NotGenerateComplexReturnProperty = "NotGenerateComplexReturnProperty";
/// <summary>
- /// Cached name for the 'NotGenerate_Returns_Property' property.
+ /// Cached name for the 'NotGenerateReturnsProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName NotGenerate_Returns_Property = "NotGenerate_Returns_Property";
+ public new static readonly global::Godot.StringName NotGenerateReturnsProperty = "NotGenerateReturnsProperty";
/// <summary>
- /// Cached name for the 'FullProperty_String' property.
+ /// Cached name for the 'FullPropertyString' property.
/// </summary>
- public new static readonly global::Godot.StringName FullProperty_String = "FullProperty_String";
+ public new static readonly global::Godot.StringName FullPropertyString = "FullPropertyString";
/// <summary>
- /// Cached name for the 'FullProperty_String_Complex' property.
+ /// Cached name for the 'FullPropertyString_Complex' property.
/// </summary>
- public new static readonly global::Godot.StringName FullProperty_String_Complex = "FullProperty_String_Complex";
+ public new static readonly global::Godot.StringName FullPropertyString_Complex = "FullPropertyString_Complex";
/// <summary>
- /// Cached name for the 'LamdaProperty_String' property.
+ /// Cached name for the 'LamdaPropertyString' property.
/// </summary>
- public new static readonly global::Godot.StringName LamdaProperty_String = "LamdaProperty_String";
+ public new static readonly global::Godot.StringName LamdaPropertyString = "LamdaPropertyString";
/// <summary>
- /// Cached name for the 'property_Boolean' property.
+ /// Cached name for the 'PropertyBoolean' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Boolean = "property_Boolean";
+ public new static readonly global::Godot.StringName PropertyBoolean = "PropertyBoolean";
/// <summary>
- /// Cached name for the 'property_Char' property.
+ /// Cached name for the 'PropertyChar' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Char = "property_Char";
+ public new static readonly global::Godot.StringName PropertyChar = "PropertyChar";
/// <summary>
- /// Cached name for the 'property_SByte' property.
+ /// Cached name for the 'PropertySByte' property.
/// </summary>
- public new static readonly global::Godot.StringName property_SByte = "property_SByte";
+ public new static readonly global::Godot.StringName PropertySByte = "PropertySByte";
/// <summary>
- /// Cached name for the 'property_Int16' property.
+ /// Cached name for the 'PropertyInt16' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Int16 = "property_Int16";
+ public new static readonly global::Godot.StringName PropertyInt16 = "PropertyInt16";
/// <summary>
- /// Cached name for the 'property_Int32' property.
+ /// Cached name for the 'PropertyInt32' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Int32 = "property_Int32";
+ public new static readonly global::Godot.StringName PropertyInt32 = "PropertyInt32";
/// <summary>
- /// Cached name for the 'property_Int64' property.
+ /// Cached name for the 'PropertyInt64' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Int64 = "property_Int64";
+ public new static readonly global::Godot.StringName PropertyInt64 = "PropertyInt64";
/// <summary>
- /// Cached name for the 'property_Byte' property.
+ /// Cached name for the 'PropertyByte' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Byte = "property_Byte";
+ public new static readonly global::Godot.StringName PropertyByte = "PropertyByte";
/// <summary>
- /// Cached name for the 'property_UInt16' property.
+ /// Cached name for the 'PropertyUInt16' property.
/// </summary>
- public new static readonly global::Godot.StringName property_UInt16 = "property_UInt16";
+ public new static readonly global::Godot.StringName PropertyUInt16 = "PropertyUInt16";
/// <summary>
- /// Cached name for the 'property_UInt32' property.
+ /// Cached name for the 'PropertyUInt32' property.
/// </summary>
- public new static readonly global::Godot.StringName property_UInt32 = "property_UInt32";
+ public new static readonly global::Godot.StringName PropertyUInt32 = "PropertyUInt32";
/// <summary>
- /// Cached name for the 'property_UInt64' property.
+ /// Cached name for the 'PropertyUInt64' property.
/// </summary>
- public new static readonly global::Godot.StringName property_UInt64 = "property_UInt64";
+ public new static readonly global::Godot.StringName PropertyUInt64 = "PropertyUInt64";
/// <summary>
- /// Cached name for the 'property_Single' property.
+ /// Cached name for the 'PropertySingle' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Single = "property_Single";
+ public new static readonly global::Godot.StringName PropertySingle = "PropertySingle";
/// <summary>
- /// Cached name for the 'property_Double' property.
+ /// Cached name for the 'PropertyDouble' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Double = "property_Double";
+ public new static readonly global::Godot.StringName PropertyDouble = "PropertyDouble";
/// <summary>
- /// Cached name for the 'property_String' property.
+ /// Cached name for the 'PropertyString' property.
/// </summary>
- public new static readonly global::Godot.StringName property_String = "property_String";
+ public new static readonly global::Godot.StringName PropertyString = "PropertyString";
/// <summary>
- /// Cached name for the 'property_Vector2' property.
+ /// Cached name for the 'PropertyVector2' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Vector2 = "property_Vector2";
+ public new static readonly global::Godot.StringName PropertyVector2 = "PropertyVector2";
/// <summary>
- /// Cached name for the 'property_Vector2I' property.
+ /// Cached name for the 'PropertyVector2I' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Vector2I = "property_Vector2I";
+ public new static readonly global::Godot.StringName PropertyVector2I = "PropertyVector2I";
/// <summary>
- /// Cached name for the 'property_Rect2' property.
+ /// Cached name for the 'PropertyRect2' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Rect2 = "property_Rect2";
+ public new static readonly global::Godot.StringName PropertyRect2 = "PropertyRect2";
/// <summary>
- /// Cached name for the 'property_Rect2I' property.
+ /// Cached name for the 'PropertyRect2I' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Rect2I = "property_Rect2I";
+ public new static readonly global::Godot.StringName PropertyRect2I = "PropertyRect2I";
/// <summary>
- /// Cached name for the 'property_Transform2D' property.
+ /// Cached name for the 'PropertyTransform2D' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Transform2D = "property_Transform2D";
+ public new static readonly global::Godot.StringName PropertyTransform2D = "PropertyTransform2D";
/// <summary>
- /// Cached name for the 'property_Vector3' property.
+ /// Cached name for the 'PropertyVector3' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Vector3 = "property_Vector3";
+ public new static readonly global::Godot.StringName PropertyVector3 = "PropertyVector3";
/// <summary>
- /// Cached name for the 'property_Vector3I' property.
+ /// Cached name for the 'PropertyVector3I' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Vector3I = "property_Vector3I";
+ public new static readonly global::Godot.StringName PropertyVector3I = "PropertyVector3I";
/// <summary>
- /// Cached name for the 'property_Basis' property.
+ /// Cached name for the 'PropertyBasis' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Basis = "property_Basis";
+ public new static readonly global::Godot.StringName PropertyBasis = "PropertyBasis";
/// <summary>
- /// Cached name for the 'property_Quaternion' property.
+ /// Cached name for the 'PropertyQuaternion' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Quaternion = "property_Quaternion";
+ public new static readonly global::Godot.StringName PropertyQuaternion = "PropertyQuaternion";
/// <summary>
- /// Cached name for the 'property_Transform3D' property.
+ /// Cached name for the 'PropertyTransform3D' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Transform3D = "property_Transform3D";
+ public new static readonly global::Godot.StringName PropertyTransform3D = "PropertyTransform3D";
/// <summary>
- /// Cached name for the 'property_Vector4' property.
+ /// Cached name for the 'PropertyVector4' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Vector4 = "property_Vector4";
+ public new static readonly global::Godot.StringName PropertyVector4 = "PropertyVector4";
/// <summary>
- /// Cached name for the 'property_Vector4I' property.
+ /// Cached name for the 'PropertyVector4I' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Vector4I = "property_Vector4I";
+ public new static readonly global::Godot.StringName PropertyVector4I = "PropertyVector4I";
/// <summary>
- /// Cached name for the 'property_Projection' property.
+ /// Cached name for the 'PropertyProjection' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Projection = "property_Projection";
+ public new static readonly global::Godot.StringName PropertyProjection = "PropertyProjection";
/// <summary>
- /// Cached name for the 'property_Aabb' property.
+ /// Cached name for the 'PropertyAabb' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Aabb = "property_Aabb";
+ public new static readonly global::Godot.StringName PropertyAabb = "PropertyAabb";
/// <summary>
- /// Cached name for the 'property_Color' property.
+ /// Cached name for the 'PropertyColor' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Color = "property_Color";
+ public new static readonly global::Godot.StringName PropertyColor = "PropertyColor";
/// <summary>
- /// Cached name for the 'property_Plane' property.
+ /// Cached name for the 'PropertyPlane' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Plane = "property_Plane";
+ public new static readonly global::Godot.StringName PropertyPlane = "PropertyPlane";
/// <summary>
- /// Cached name for the 'property_Callable' property.
+ /// Cached name for the 'PropertyCallable' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Callable = "property_Callable";
+ public new static readonly global::Godot.StringName PropertyCallable = "PropertyCallable";
/// <summary>
- /// Cached name for the 'property_Signal' property.
+ /// Cached name for the 'PropertySignal' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Signal = "property_Signal";
+ public new static readonly global::Godot.StringName PropertySignal = "PropertySignal";
/// <summary>
- /// Cached name for the 'property_Enum' property.
+ /// Cached name for the 'PropertyEnum' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Enum = "property_Enum";
+ public new static readonly global::Godot.StringName PropertyEnum = "PropertyEnum";
/// <summary>
- /// Cached name for the 'property_FlagsEnum' property.
+ /// Cached name for the 'PropertyFlagsEnum' property.
/// </summary>
- public new static readonly global::Godot.StringName property_FlagsEnum = "property_FlagsEnum";
+ public new static readonly global::Godot.StringName PropertyFlagsEnum = "PropertyFlagsEnum";
/// <summary>
- /// Cached name for the 'property_ByteArray' property.
+ /// Cached name for the 'PropertyByteArray' property.
/// </summary>
- public new static readonly global::Godot.StringName property_ByteArray = "property_ByteArray";
+ public new static readonly global::Godot.StringName PropertyByteArray = "PropertyByteArray";
/// <summary>
- /// Cached name for the 'property_Int32Array' property.
+ /// Cached name for the 'PropertyInt32Array' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Int32Array = "property_Int32Array";
+ public new static readonly global::Godot.StringName PropertyInt32Array = "PropertyInt32Array";
/// <summary>
- /// Cached name for the 'property_Int64Array' property.
+ /// Cached name for the 'PropertyInt64Array' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Int64Array = "property_Int64Array";
+ public new static readonly global::Godot.StringName PropertyInt64Array = "PropertyInt64Array";
/// <summary>
- /// Cached name for the 'property_SingleArray' property.
+ /// Cached name for the 'PropertySingleArray' property.
/// </summary>
- public new static readonly global::Godot.StringName property_SingleArray = "property_SingleArray";
+ public new static readonly global::Godot.StringName PropertySingleArray = "PropertySingleArray";
/// <summary>
- /// Cached name for the 'property_DoubleArray' property.
+ /// Cached name for the 'PropertyDoubleArray' property.
/// </summary>
- public new static readonly global::Godot.StringName property_DoubleArray = "property_DoubleArray";
+ public new static readonly global::Godot.StringName PropertyDoubleArray = "PropertyDoubleArray";
/// <summary>
- /// Cached name for the 'property_StringArray' property.
+ /// Cached name for the 'PropertyStringArray' property.
/// </summary>
- public new static readonly global::Godot.StringName property_StringArray = "property_StringArray";
+ public new static readonly global::Godot.StringName PropertyStringArray = "PropertyStringArray";
/// <summary>
- /// Cached name for the 'property_StringArrayEnum' property.
+ /// Cached name for the 'PropertyStringArrayEnum' property.
/// </summary>
- public new static readonly global::Godot.StringName property_StringArrayEnum = "property_StringArrayEnum";
+ public new static readonly global::Godot.StringName PropertyStringArrayEnum = "PropertyStringArrayEnum";
/// <summary>
- /// Cached name for the 'property_Vector2Array' property.
+ /// Cached name for the 'PropertyVector2Array' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Vector2Array = "property_Vector2Array";
+ public new static readonly global::Godot.StringName PropertyVector2Array = "PropertyVector2Array";
/// <summary>
- /// Cached name for the 'property_Vector3Array' property.
+ /// Cached name for the 'PropertyVector3Array' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Vector3Array = "property_Vector3Array";
+ public new static readonly global::Godot.StringName PropertyVector3Array = "PropertyVector3Array";
/// <summary>
- /// Cached name for the 'property_ColorArray' property.
+ /// Cached name for the 'PropertyColorArray' property.
/// </summary>
- public new static readonly global::Godot.StringName property_ColorArray = "property_ColorArray";
+ public new static readonly global::Godot.StringName PropertyColorArray = "PropertyColorArray";
/// <summary>
- /// Cached name for the 'property_GodotObjectOrDerivedArray' property.
+ /// Cached name for the 'PropertyGodotObjectOrDerivedArray' property.
/// </summary>
- public new static readonly global::Godot.StringName property_GodotObjectOrDerivedArray = "property_GodotObjectOrDerivedArray";
+ public new static readonly global::Godot.StringName PropertyGodotObjectOrDerivedArray = "PropertyGodotObjectOrDerivedArray";
/// <summary>
/// Cached name for the 'field_StringNameArray' property.
/// </summary>
@@ -225,272 +225,272 @@ partial class ExportedProperties
/// </summary>
public new static readonly global::Godot.StringName field_RidArray = "field_RidArray";
/// <summary>
- /// Cached name for the 'property_Variant' property.
+ /// Cached name for the 'PropertyVariant' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Variant = "property_Variant";
+ public new static readonly global::Godot.StringName PropertyVariant = "PropertyVariant";
/// <summary>
- /// Cached name for the 'property_GodotObjectOrDerived' property.
+ /// Cached name for the 'PropertyGodotObjectOrDerived' property.
/// </summary>
- public new static readonly global::Godot.StringName property_GodotObjectOrDerived = "property_GodotObjectOrDerived";
+ public new static readonly global::Godot.StringName PropertyGodotObjectOrDerived = "PropertyGodotObjectOrDerived";
/// <summary>
- /// Cached name for the 'property_GodotResourceTexture' property.
+ /// Cached name for the 'PropertyGodotResourceTexture' property.
/// </summary>
- public new static readonly global::Godot.StringName property_GodotResourceTexture = "property_GodotResourceTexture";
+ public new static readonly global::Godot.StringName PropertyGodotResourceTexture = "PropertyGodotResourceTexture";
/// <summary>
- /// Cached name for the 'property_StringName' property.
+ /// Cached name for the 'PropertyStringName' property.
/// </summary>
- public new static readonly global::Godot.StringName property_StringName = "property_StringName";
+ public new static readonly global::Godot.StringName PropertyStringName = "PropertyStringName";
/// <summary>
- /// Cached name for the 'property_NodePath' property.
+ /// Cached name for the 'PropertyNodePath' property.
/// </summary>
- public new static readonly global::Godot.StringName property_NodePath = "property_NodePath";
+ public new static readonly global::Godot.StringName PropertyNodePath = "PropertyNodePath";
/// <summary>
- /// Cached name for the 'property_Rid' property.
+ /// Cached name for the 'PropertyRid' property.
/// </summary>
- public new static readonly global::Godot.StringName property_Rid = "property_Rid";
+ public new static readonly global::Godot.StringName PropertyRid = "PropertyRid";
/// <summary>
- /// Cached name for the 'property_GodotDictionary' property.
+ /// Cached name for the 'PropertyGodotDictionary' property.
/// </summary>
- public new static readonly global::Godot.StringName property_GodotDictionary = "property_GodotDictionary";
+ public new static readonly global::Godot.StringName PropertyGodotDictionary = "PropertyGodotDictionary";
/// <summary>
- /// Cached name for the 'property_GodotArray' property.
+ /// Cached name for the 'PropertyGodotArray' property.
/// </summary>
- public new static readonly global::Godot.StringName property_GodotArray = "property_GodotArray";
+ public new static readonly global::Godot.StringName PropertyGodotArray = "PropertyGodotArray";
/// <summary>
- /// Cached name for the 'property_GodotGenericDictionary' property.
+ /// Cached name for the 'PropertyGodotGenericDictionary' property.
/// </summary>
- public new static readonly global::Godot.StringName property_GodotGenericDictionary = "property_GodotGenericDictionary";
+ public new static readonly global::Godot.StringName PropertyGodotGenericDictionary = "PropertyGodotGenericDictionary";
/// <summary>
- /// Cached name for the 'property_GodotGenericArray' property.
+ /// Cached name for the 'PropertyGodotGenericArray' property.
/// </summary>
- public new static readonly global::Godot.StringName property_GodotGenericArray = "property_GodotGenericArray";
+ public new static readonly global::Godot.StringName PropertyGodotGenericArray = "PropertyGodotGenericArray";
/// <summary>
- /// Cached name for the '_notGenerate_Property_String' field.
+ /// Cached name for the '_notGeneratePropertyString' field.
/// </summary>
- public new static readonly global::Godot.StringName _notGenerate_Property_String = "_notGenerate_Property_String";
+ public new static readonly global::Godot.StringName _notGeneratePropertyString = "_notGeneratePropertyString";
/// <summary>
- /// Cached name for the '_notGenerate_Property_Int' field.
+ /// Cached name for the '_notGeneratePropertyInt' field.
/// </summary>
- public new static readonly global::Godot.StringName _notGenerate_Property_Int = "_notGenerate_Property_Int";
+ public new static readonly global::Godot.StringName _notGeneratePropertyInt = "_notGeneratePropertyInt";
/// <summary>
- /// Cached name for the '_fullProperty_String' field.
+ /// Cached name for the '_fullPropertyString' field.
/// </summary>
- public new static readonly global::Godot.StringName _fullProperty_String = "_fullProperty_String";
+ public new static readonly global::Godot.StringName _fullPropertyString = "_fullPropertyString";
/// <summary>
- /// Cached name for the '_fullProperty_String_Complex' field.
+ /// Cached name for the '_fullPropertyStringComplex' field.
/// </summary>
- public new static readonly global::Godot.StringName _fullProperty_String_Complex = "_fullProperty_String_Complex";
+ public new static readonly global::Godot.StringName _fullPropertyStringComplex = "_fullPropertyStringComplex";
/// <summary>
- /// Cached name for the '_lamdaProperty_String' field.
+ /// Cached name for the '_lamdaPropertyString' field.
/// </summary>
- public new static readonly global::Godot.StringName _lamdaProperty_String = "_lamdaProperty_String";
+ public new static readonly global::Godot.StringName _lamdaPropertyString = "_lamdaPropertyString";
}
/// <inheritdoc/>
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool SetGodotClassPropertyValue(in godot_string_name name, in godot_variant value)
{
- if (name == PropertyName.NotGenerate_Complex_Lamda_Property) {
- this.NotGenerate_Complex_Lamda_Property = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ if (name == PropertyName.NotGenerateComplexLamdaProperty) {
+ this.NotGenerateComplexLamdaProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.NotGenerate_Lamda_NoField_Property) {
- this.NotGenerate_Lamda_NoField_Property = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName.NotGenerateLamdaNoFieldProperty) {
+ this.NotGenerateLamdaNoFieldProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.NotGenerate_Complex_Return_Property) {
- this.NotGenerate_Complex_Return_Property = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName.NotGenerateComplexReturnProperty) {
+ this.NotGenerateComplexReturnProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.NotGenerate_Returns_Property) {
- this.NotGenerate_Returns_Property = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName.NotGenerateReturnsProperty) {
+ this.NotGenerateReturnsProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.FullProperty_String) {
- this.FullProperty_String = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName.FullPropertyString) {
+ this.FullPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.FullProperty_String_Complex) {
- this.FullProperty_String_Complex = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName.FullPropertyString_Complex) {
+ this.FullPropertyString_Complex = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.LamdaProperty_String) {
- this.LamdaProperty_String = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName.LamdaPropertyString) {
+ this.LamdaPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.property_Boolean) {
- this.property_Boolean = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
+ else if (name == PropertyName.PropertyBoolean) {
+ this.PropertyBoolean = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
- else if (name == PropertyName.property_Char) {
- this.property_Char = global::Godot.NativeInterop.VariantUtils.ConvertTo<char>(value);
+ else if (name == PropertyName.PropertyChar) {
+ this.PropertyChar = global::Godot.NativeInterop.VariantUtils.ConvertTo<char>(value);
return true;
}
- else if (name == PropertyName.property_SByte) {
- this.property_SByte = global::Godot.NativeInterop.VariantUtils.ConvertTo<sbyte>(value);
+ else if (name == PropertyName.PropertySByte) {
+ this.PropertySByte = global::Godot.NativeInterop.VariantUtils.ConvertTo<sbyte>(value);
return true;
}
- else if (name == PropertyName.property_Int16) {
- this.property_Int16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<short>(value);
+ else if (name == PropertyName.PropertyInt16) {
+ this.PropertyInt16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<short>(value);
return true;
}
- else if (name == PropertyName.property_Int32) {
- this.property_Int32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
+ else if (name == PropertyName.PropertyInt32) {
+ this.PropertyInt32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
return true;
}
- else if (name == PropertyName.property_Int64) {
- this.property_Int64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<long>(value);
+ else if (name == PropertyName.PropertyInt64) {
+ this.PropertyInt64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<long>(value);
return true;
}
- else if (name == PropertyName.property_Byte) {
- this.property_Byte = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte>(value);
+ else if (name == PropertyName.PropertyByte) {
+ this.PropertyByte = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte>(value);
return true;
}
- else if (name == PropertyName.property_UInt16) {
- this.property_UInt16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ushort>(value);
+ else if (name == PropertyName.PropertyUInt16) {
+ this.PropertyUInt16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ushort>(value);
return true;
}
- else if (name == PropertyName.property_UInt32) {
- this.property_UInt32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<uint>(value);
+ else if (name == PropertyName.PropertyUInt32) {
+ this.PropertyUInt32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<uint>(value);
return true;
}
- else if (name == PropertyName.property_UInt64) {
- this.property_UInt64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ulong>(value);
+ else if (name == PropertyName.PropertyUInt64) {
+ this.PropertyUInt64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ulong>(value);
return true;
}
- else if (name == PropertyName.property_Single) {
- this.property_Single = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
+ else if (name == PropertyName.PropertySingle) {
+ this.PropertySingle = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
return true;
}
- else if (name == PropertyName.property_Double) {
- this.property_Double = global::Godot.NativeInterop.VariantUtils.ConvertTo<double>(value);
+ else if (name == PropertyName.PropertyDouble) {
+ this.PropertyDouble = global::Godot.NativeInterop.VariantUtils.ConvertTo<double>(value);
return true;
}
- else if (name == PropertyName.property_String) {
- this.property_String = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName.PropertyString) {
+ this.PropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.property_Vector2) {
- this.property_Vector2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2>(value);
+ else if (name == PropertyName.PropertyVector2) {
+ this.PropertyVector2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2>(value);
return true;
}
- else if (name == PropertyName.property_Vector2I) {
- this.property_Vector2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2I>(value);
+ else if (name == PropertyName.PropertyVector2I) {
+ this.PropertyVector2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2I>(value);
return true;
}
- else if (name == PropertyName.property_Rect2) {
- this.property_Rect2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2>(value);
+ else if (name == PropertyName.PropertyRect2) {
+ this.PropertyRect2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2>(value);
return true;
}
- else if (name == PropertyName.property_Rect2I) {
- this.property_Rect2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2I>(value);
+ else if (name == PropertyName.PropertyRect2I) {
+ this.PropertyRect2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2I>(value);
return true;
}
- else if (name == PropertyName.property_Transform2D) {
- this.property_Transform2D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform2D>(value);
+ else if (name == PropertyName.PropertyTransform2D) {
+ this.PropertyTransform2D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform2D>(value);
return true;
}
- else if (name == PropertyName.property_Vector3) {
- this.property_Vector3 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3>(value);
+ else if (name == PropertyName.PropertyVector3) {
+ this.PropertyVector3 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3>(value);
return true;
}
- else if (name == PropertyName.property_Vector3I) {
- this.property_Vector3I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3I>(value);
+ else if (name == PropertyName.PropertyVector3I) {
+ this.PropertyVector3I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3I>(value);
return true;
}
- else if (name == PropertyName.property_Basis) {
- this.property_Basis = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Basis>(value);
+ else if (name == PropertyName.PropertyBasis) {
+ this.PropertyBasis = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Basis>(value);
return true;
}
- else if (name == PropertyName.property_Quaternion) {
- this.property_Quaternion = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Quaternion>(value);
+ else if (name == PropertyName.PropertyQuaternion) {
+ this.PropertyQuaternion = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Quaternion>(value);
return true;
}
- else if (name == PropertyName.property_Transform3D) {
- this.property_Transform3D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform3D>(value);
+ else if (name == PropertyName.PropertyTransform3D) {
+ this.PropertyTransform3D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform3D>(value);
return true;
}
- else if (name == PropertyName.property_Vector4) {
- this.property_Vector4 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4>(value);
+ else if (name == PropertyName.PropertyVector4) {
+ this.PropertyVector4 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4>(value);
return true;
}
- else if (name == PropertyName.property_Vector4I) {
- this.property_Vector4I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4I>(value);
+ else if (name == PropertyName.PropertyVector4I) {
+ this.PropertyVector4I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4I>(value);
return true;
}
- else if (name == PropertyName.property_Projection) {
- this.property_Projection = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Projection>(value);
+ else if (name == PropertyName.PropertyProjection) {
+ this.PropertyProjection = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Projection>(value);
return true;
}
- else if (name == PropertyName.property_Aabb) {
- this.property_Aabb = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Aabb>(value);
+ else if (name == PropertyName.PropertyAabb) {
+ this.PropertyAabb = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Aabb>(value);
return true;
}
- else if (name == PropertyName.property_Color) {
- this.property_Color = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color>(value);
+ else if (name == PropertyName.PropertyColor) {
+ this.PropertyColor = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color>(value);
return true;
}
- else if (name == PropertyName.property_Plane) {
- this.property_Plane = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Plane>(value);
+ else if (name == PropertyName.PropertyPlane) {
+ this.PropertyPlane = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Plane>(value);
return true;
}
- else if (name == PropertyName.property_Callable) {
- this.property_Callable = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Callable>(value);
+ else if (name == PropertyName.PropertyCallable) {
+ this.PropertyCallable = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Callable>(value);
return true;
}
- else if (name == PropertyName.property_Signal) {
- this.property_Signal = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Signal>(value);
+ else if (name == PropertyName.PropertySignal) {
+ this.PropertySignal = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Signal>(value);
return true;
}
- else if (name == PropertyName.property_Enum) {
- this.property_Enum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedProperties.MyEnum>(value);
+ else if (name == PropertyName.PropertyEnum) {
+ this.PropertyEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedProperties.MyEnum>(value);
return true;
}
- else if (name == PropertyName.property_FlagsEnum) {
- this.property_FlagsEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedProperties.MyFlagsEnum>(value);
+ else if (name == PropertyName.PropertyFlagsEnum) {
+ this.PropertyFlagsEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedProperties.MyFlagsEnum>(value);
return true;
}
- else if (name == PropertyName.property_ByteArray) {
- this.property_ByteArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte[]>(value);
+ else if (name == PropertyName.PropertyByteArray) {
+ this.PropertyByteArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte[]>(value);
return true;
}
- else if (name == PropertyName.property_Int32Array) {
- this.property_Int32Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
+ else if (name == PropertyName.PropertyInt32Array) {
+ this.PropertyInt32Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
return true;
}
- else if (name == PropertyName.property_Int64Array) {
- this.property_Int64Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<long[]>(value);
+ else if (name == PropertyName.PropertyInt64Array) {
+ this.PropertyInt64Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<long[]>(value);
return true;
}
- else if (name == PropertyName.property_SingleArray) {
- this.property_SingleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<float[]>(value);
+ else if (name == PropertyName.PropertySingleArray) {
+ this.PropertySingleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<float[]>(value);
return true;
}
- else if (name == PropertyName.property_DoubleArray) {
- this.property_DoubleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<double[]>(value);
+ else if (name == PropertyName.PropertyDoubleArray) {
+ this.PropertyDoubleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<double[]>(value);
return true;
}
- else if (name == PropertyName.property_StringArray) {
- this.property_StringArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
+ else if (name == PropertyName.PropertyStringArray) {
+ this.PropertyStringArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
return true;
}
- else if (name == PropertyName.property_StringArrayEnum) {
- this.property_StringArrayEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
+ else if (name == PropertyName.PropertyStringArrayEnum) {
+ this.PropertyStringArrayEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
return true;
}
- else if (name == PropertyName.property_Vector2Array) {
- this.property_Vector2Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2[]>(value);
+ else if (name == PropertyName.PropertyVector2Array) {
+ this.PropertyVector2Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2[]>(value);
return true;
}
- else if (name == PropertyName.property_Vector3Array) {
- this.property_Vector3Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3[]>(value);
+ else if (name == PropertyName.PropertyVector3Array) {
+ this.PropertyVector3Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3[]>(value);
return true;
}
- else if (name == PropertyName.property_ColorArray) {
- this.property_ColorArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color[]>(value);
+ else if (name == PropertyName.PropertyColorArray) {
+ this.PropertyColorArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color[]>(value);
return true;
}
- else if (name == PropertyName.property_GodotObjectOrDerivedArray) {
- this.property_GodotObjectOrDerivedArray = global::Godot.NativeInterop.VariantUtils.ConvertToSystemArrayOfGodotObject<global::Godot.GodotObject>(value);
+ else if (name == PropertyName.PropertyGodotObjectOrDerivedArray) {
+ this.PropertyGodotObjectOrDerivedArray = global::Godot.NativeInterop.VariantUtils.ConvertToSystemArrayOfGodotObject<global::Godot.GodotObject>(value);
return true;
}
else if (name == PropertyName.field_StringNameArray) {
@@ -505,64 +505,64 @@ partial class ExportedProperties
this.field_RidArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid[]>(value);
return true;
}
- else if (name == PropertyName.property_Variant) {
- this.property_Variant = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Variant>(value);
+ else if (name == PropertyName.PropertyVariant) {
+ this.PropertyVariant = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Variant>(value);
return true;
}
- else if (name == PropertyName.property_GodotObjectOrDerived) {
- this.property_GodotObjectOrDerived = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.GodotObject>(value);
+ else if (name == PropertyName.PropertyGodotObjectOrDerived) {
+ this.PropertyGodotObjectOrDerived = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.GodotObject>(value);
return true;
}
- else if (name == PropertyName.property_GodotResourceTexture) {
- this.property_GodotResourceTexture = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Texture>(value);
+ else if (name == PropertyName.PropertyGodotResourceTexture) {
+ this.PropertyGodotResourceTexture = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Texture>(value);
return true;
}
- else if (name == PropertyName.property_StringName) {
- this.property_StringName = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.StringName>(value);
+ else if (name == PropertyName.PropertyStringName) {
+ this.PropertyStringName = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.StringName>(value);
return true;
}
- else if (name == PropertyName.property_NodePath) {
- this.property_NodePath = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath>(value);
+ else if (name == PropertyName.PropertyNodePath) {
+ this.PropertyNodePath = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath>(value);
return true;
}
- else if (name == PropertyName.property_Rid) {
- this.property_Rid = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid>(value);
+ else if (name == PropertyName.PropertyRid) {
+ this.PropertyRid = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid>(value);
return true;
}
- else if (name == PropertyName.property_GodotDictionary) {
- this.property_GodotDictionary = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Dictionary>(value);
+ else if (name == PropertyName.PropertyGodotDictionary) {
+ this.PropertyGodotDictionary = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Dictionary>(value);
return true;
}
- else if (name == PropertyName.property_GodotArray) {
- this.property_GodotArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Array>(value);
+ else if (name == PropertyName.PropertyGodotArray) {
+ this.PropertyGodotArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Array>(value);
return true;
}
- else if (name == PropertyName.property_GodotGenericDictionary) {
- this.property_GodotGenericDictionary = global::Godot.NativeInterop.VariantUtils.ConvertToDictionary<string, bool>(value);
+ else if (name == PropertyName.PropertyGodotGenericDictionary) {
+ this.PropertyGodotGenericDictionary = global::Godot.NativeInterop.VariantUtils.ConvertToDictionary<string, bool>(value);
return true;
}
- else if (name == PropertyName.property_GodotGenericArray) {
- this.property_GodotGenericArray = global::Godot.NativeInterop.VariantUtils.ConvertToArray<int>(value);
+ else if (name == PropertyName.PropertyGodotGenericArray) {
+ this.PropertyGodotGenericArray = global::Godot.NativeInterop.VariantUtils.ConvertToArray<int>(value);
return true;
}
- else if (name == PropertyName._notGenerate_Property_String) {
- this._notGenerate_Property_String = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName._notGeneratePropertyString) {
+ this._notGeneratePropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName._notGenerate_Property_Int) {
- this._notGenerate_Property_Int = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
+ else if (name == PropertyName._notGeneratePropertyInt) {
+ this._notGeneratePropertyInt = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
return true;
}
- else if (name == PropertyName._fullProperty_String) {
- this._fullProperty_String = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName._fullPropertyString) {
+ this._fullPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName._fullProperty_String_Complex) {
- this._fullProperty_String_Complex = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName._fullPropertyStringComplex) {
+ this._fullPropertyStringComplex = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName._lamdaProperty_String) {
- this._lamdaProperty_String = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
+ else if (name == PropertyName._lamdaPropertyString) {
+ this._lamdaPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
return base.SetGodotClassPropertyValue(name, value);
@@ -571,208 +571,208 @@ partial class ExportedProperties
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool GetGodotClassPropertyValue(in godot_string_name name, out godot_variant value)
{
- if (name == PropertyName.NotGenerate_Complex_Lamda_Property) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerate_Complex_Lamda_Property);
+ if (name == PropertyName.NotGenerateComplexLamdaProperty) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerateComplexLamdaProperty);
return true;
}
- else if (name == PropertyName.NotGenerate_Lamda_NoField_Property) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerate_Lamda_NoField_Property);
+ else if (name == PropertyName.NotGenerateLamdaNoFieldProperty) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerateLamdaNoFieldProperty);
return true;
}
- else if (name == PropertyName.NotGenerate_Complex_Return_Property) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerate_Complex_Return_Property);
+ else if (name == PropertyName.NotGenerateComplexReturnProperty) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerateComplexReturnProperty);
return true;
}
- else if (name == PropertyName.NotGenerate_Returns_Property) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerate_Returns_Property);
+ else if (name == PropertyName.NotGenerateReturnsProperty) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerateReturnsProperty);
return true;
}
- else if (name == PropertyName.FullProperty_String) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.FullProperty_String);
+ else if (name == PropertyName.FullPropertyString) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.FullPropertyString);
return true;
}
- else if (name == PropertyName.FullProperty_String_Complex) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.FullProperty_String_Complex);
+ else if (name == PropertyName.FullPropertyString_Complex) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.FullPropertyString_Complex);
return true;
}
- else if (name == PropertyName.LamdaProperty_String) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.LamdaProperty_String);
+ else if (name == PropertyName.LamdaPropertyString) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.LamdaPropertyString);
return true;
}
- else if (name == PropertyName.property_Boolean) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this.property_Boolean);
+ else if (name == PropertyName.PropertyBoolean) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this.PropertyBoolean);
return true;
}
- else if (name == PropertyName.property_Char) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<char>(this.property_Char);
+ else if (name == PropertyName.PropertyChar) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<char>(this.PropertyChar);
return true;
}
- else if (name == PropertyName.property_SByte) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<sbyte>(this.property_SByte);
+ else if (name == PropertyName.PropertySByte) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<sbyte>(this.PropertySByte);
return true;
}
- else if (name == PropertyName.property_Int16) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<short>(this.property_Int16);
+ else if (name == PropertyName.PropertyInt16) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<short>(this.PropertyInt16);
return true;
}
- else if (name == PropertyName.property_Int32) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this.property_Int32);
+ else if (name == PropertyName.PropertyInt32) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this.PropertyInt32);
return true;
}
- else if (name == PropertyName.property_Int64) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long>(this.property_Int64);
+ else if (name == PropertyName.PropertyInt64) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long>(this.PropertyInt64);
return true;
}
- else if (name == PropertyName.property_Byte) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte>(this.property_Byte);
+ else if (name == PropertyName.PropertyByte) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte>(this.PropertyByte);
return true;
}
- else if (name == PropertyName.property_UInt16) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ushort>(this.property_UInt16);
+ else if (name == PropertyName.PropertyUInt16) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ushort>(this.PropertyUInt16);
return true;
}
- else if (name == PropertyName.property_UInt32) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<uint>(this.property_UInt32);
+ else if (name == PropertyName.PropertyUInt32) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<uint>(this.PropertyUInt32);
return true;
}
- else if (name == PropertyName.property_UInt64) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ulong>(this.property_UInt64);
+ else if (name == PropertyName.PropertyUInt64) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ulong>(this.PropertyUInt64);
return true;
}
- else if (name == PropertyName.property_Single) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.property_Single);
+ else if (name == PropertyName.PropertySingle) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.PropertySingle);
return true;
}
- else if (name == PropertyName.property_Double) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double>(this.property_Double);
+ else if (name == PropertyName.PropertyDouble) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double>(this.PropertyDouble);
return true;
}
- else if (name == PropertyName.property_String) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.property_String);
+ else if (name == PropertyName.PropertyString) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.PropertyString);
return true;
}
- else if (name == PropertyName.property_Vector2) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2>(this.property_Vector2);
+ else if (name == PropertyName.PropertyVector2) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2>(this.PropertyVector2);
return true;
}
- else if (name == PropertyName.property_Vector2I) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2I>(this.property_Vector2I);
+ else if (name == PropertyName.PropertyVector2I) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2I>(this.PropertyVector2I);
return true;
}
- else if (name == PropertyName.property_Rect2) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2>(this.property_Rect2);
+ else if (name == PropertyName.PropertyRect2) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2>(this.PropertyRect2);
return true;
}
- else if (name == PropertyName.property_Rect2I) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2I>(this.property_Rect2I);
+ else if (name == PropertyName.PropertyRect2I) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2I>(this.PropertyRect2I);
return true;
}
- else if (name == PropertyName.property_Transform2D) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform2D>(this.property_Transform2D);
+ else if (name == PropertyName.PropertyTransform2D) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform2D>(this.PropertyTransform2D);
return true;
}
- else if (name == PropertyName.property_Vector3) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3>(this.property_Vector3);
+ else if (name == PropertyName.PropertyVector3) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3>(this.PropertyVector3);
return true;
}
- else if (name == PropertyName.property_Vector3I) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3I>(this.property_Vector3I);
+ else if (name == PropertyName.PropertyVector3I) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3I>(this.PropertyVector3I);
return true;
}
- else if (name == PropertyName.property_Basis) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Basis>(this.property_Basis);
+ else if (name == PropertyName.PropertyBasis) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Basis>(this.PropertyBasis);
return true;
}
- else if (name == PropertyName.property_Quaternion) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Quaternion>(this.property_Quaternion);
+ else if (name == PropertyName.PropertyQuaternion) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Quaternion>(this.PropertyQuaternion);
return true;
}
- else if (name == PropertyName.property_Transform3D) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform3D>(this.property_Transform3D);
+ else if (name == PropertyName.PropertyTransform3D) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform3D>(this.PropertyTransform3D);
return true;
}
- else if (name == PropertyName.property_Vector4) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4>(this.property_Vector4);
+ else if (name == PropertyName.PropertyVector4) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4>(this.PropertyVector4);
return true;
}
- else if (name == PropertyName.property_Vector4I) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4I>(this.property_Vector4I);
+ else if (name == PropertyName.PropertyVector4I) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4I>(this.PropertyVector4I);
return true;
}
- else if (name == PropertyName.property_Projection) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Projection>(this.property_Projection);
+ else if (name == PropertyName.PropertyProjection) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Projection>(this.PropertyProjection);
return true;
}
- else if (name == PropertyName.property_Aabb) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Aabb>(this.property_Aabb);
+ else if (name == PropertyName.PropertyAabb) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Aabb>(this.PropertyAabb);
return true;
}
- else if (name == PropertyName.property_Color) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color>(this.property_Color);
+ else if (name == PropertyName.PropertyColor) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color>(this.PropertyColor);
return true;
}
- else if (name == PropertyName.property_Plane) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Plane>(this.property_Plane);
+ else if (name == PropertyName.PropertyPlane) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Plane>(this.PropertyPlane);
return true;
}
- else if (name == PropertyName.property_Callable) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Callable>(this.property_Callable);
+ else if (name == PropertyName.PropertyCallable) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Callable>(this.PropertyCallable);
return true;
}
- else if (name == PropertyName.property_Signal) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Signal>(this.property_Signal);
+ else if (name == PropertyName.PropertySignal) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Signal>(this.PropertySignal);
return true;
}
- else if (name == PropertyName.property_Enum) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedProperties.MyEnum>(this.property_Enum);
+ else if (name == PropertyName.PropertyEnum) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedProperties.MyEnum>(this.PropertyEnum);
return true;
}
- else if (name == PropertyName.property_FlagsEnum) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedProperties.MyFlagsEnum>(this.property_FlagsEnum);
+ else if (name == PropertyName.PropertyFlagsEnum) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedProperties.MyFlagsEnum>(this.PropertyFlagsEnum);
return true;
}
- else if (name == PropertyName.property_ByteArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte[]>(this.property_ByteArray);
+ else if (name == PropertyName.PropertyByteArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte[]>(this.PropertyByteArray);
return true;
}
- else if (name == PropertyName.property_Int32Array) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this.property_Int32Array);
+ else if (name == PropertyName.PropertyInt32Array) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this.PropertyInt32Array);
return true;
}
- else if (name == PropertyName.property_Int64Array) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long[]>(this.property_Int64Array);
+ else if (name == PropertyName.PropertyInt64Array) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long[]>(this.PropertyInt64Array);
return true;
}
- else if (name == PropertyName.property_SingleArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float[]>(this.property_SingleArray);
+ else if (name == PropertyName.PropertySingleArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float[]>(this.PropertySingleArray);
return true;
}
- else if (name == PropertyName.property_DoubleArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double[]>(this.property_DoubleArray);
+ else if (name == PropertyName.PropertyDoubleArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double[]>(this.PropertyDoubleArray);
return true;
}
- else if (name == PropertyName.property_StringArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this.property_StringArray);
+ else if (name == PropertyName.PropertyStringArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this.PropertyStringArray);
return true;
}
- else if (name == PropertyName.property_StringArrayEnum) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this.property_StringArrayEnum);
+ else if (name == PropertyName.PropertyStringArrayEnum) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this.PropertyStringArrayEnum);
return true;
}
- else if (name == PropertyName.property_Vector2Array) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2[]>(this.property_Vector2Array);
+ else if (name == PropertyName.PropertyVector2Array) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2[]>(this.PropertyVector2Array);
return true;
}
- else if (name == PropertyName.property_Vector3Array) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3[]>(this.property_Vector3Array);
+ else if (name == PropertyName.PropertyVector3Array) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3[]>(this.PropertyVector3Array);
return true;
}
- else if (name == PropertyName.property_ColorArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color[]>(this.property_ColorArray);
+ else if (name == PropertyName.PropertyColorArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color[]>(this.PropertyColorArray);
return true;
}
- else if (name == PropertyName.property_GodotObjectOrDerivedArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFromSystemArrayOfGodotObject(this.property_GodotObjectOrDerivedArray);
+ else if (name == PropertyName.PropertyGodotObjectOrDerivedArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFromSystemArrayOfGodotObject(this.PropertyGodotObjectOrDerivedArray);
return true;
}
else if (name == PropertyName.field_StringNameArray) {
@@ -787,64 +787,64 @@ partial class ExportedProperties
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid[]>(this.field_RidArray);
return true;
}
- else if (name == PropertyName.property_Variant) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Variant>(this.property_Variant);
+ else if (name == PropertyName.PropertyVariant) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Variant>(this.PropertyVariant);
return true;
}
- else if (name == PropertyName.property_GodotObjectOrDerived) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.GodotObject>(this.property_GodotObjectOrDerived);
+ else if (name == PropertyName.PropertyGodotObjectOrDerived) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.GodotObject>(this.PropertyGodotObjectOrDerived);
return true;
}
- else if (name == PropertyName.property_GodotResourceTexture) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Texture>(this.property_GodotResourceTexture);
+ else if (name == PropertyName.PropertyGodotResourceTexture) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Texture>(this.PropertyGodotResourceTexture);
return true;
}
- else if (name == PropertyName.property_StringName) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.StringName>(this.property_StringName);
+ else if (name == PropertyName.PropertyStringName) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.StringName>(this.PropertyStringName);
return true;
}
- else if (name == PropertyName.property_NodePath) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath>(this.property_NodePath);
+ else if (name == PropertyName.PropertyNodePath) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath>(this.PropertyNodePath);
return true;
}
- else if (name == PropertyName.property_Rid) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid>(this.property_Rid);
+ else if (name == PropertyName.PropertyRid) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid>(this.PropertyRid);
return true;
}
- else if (name == PropertyName.property_GodotDictionary) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Dictionary>(this.property_GodotDictionary);
+ else if (name == PropertyName.PropertyGodotDictionary) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Dictionary>(this.PropertyGodotDictionary);
return true;
}
- else if (name == PropertyName.property_GodotArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Array>(this.property_GodotArray);
+ else if (name == PropertyName.PropertyGodotArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Array>(this.PropertyGodotArray);
return true;
}
- else if (name == PropertyName.property_GodotGenericDictionary) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFromDictionary(this.property_GodotGenericDictionary);
+ else if (name == PropertyName.PropertyGodotGenericDictionary) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFromDictionary(this.PropertyGodotGenericDictionary);
return true;
}
- else if (name == PropertyName.property_GodotGenericArray) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFromArray(this.property_GodotGenericArray);
+ else if (name == PropertyName.PropertyGodotGenericArray) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFromArray(this.PropertyGodotGenericArray);
return true;
}
- else if (name == PropertyName._notGenerate_Property_String) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._notGenerate_Property_String);
+ else if (name == PropertyName._notGeneratePropertyString) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._notGeneratePropertyString);
return true;
}
- else if (name == PropertyName._notGenerate_Property_Int) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this._notGenerate_Property_Int);
+ else if (name == PropertyName._notGeneratePropertyInt) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this._notGeneratePropertyInt);
return true;
}
- else if (name == PropertyName._fullProperty_String) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._fullProperty_String);
+ else if (name == PropertyName._fullPropertyString) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._fullPropertyString);
return true;
}
- else if (name == PropertyName._fullProperty_String_Complex) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._fullProperty_String_Complex);
+ else if (name == PropertyName._fullPropertyStringComplex) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._fullPropertyStringComplex);
return true;
}
- else if (name == PropertyName._lamdaProperty_String) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._lamdaProperty_String);
+ else if (name == PropertyName._lamdaPropertyString) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._lamdaPropertyString);
return true;
}
return base.GetGodotClassPropertyValue(name, out value);
@@ -858,75 +858,75 @@ partial class ExportedProperties
internal new static global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo> GetGodotPropertyList()
{
var properties = new global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo>();
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName._notGenerate_Property_String, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.NotGenerate_Complex_Lamda_Property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.NotGenerate_Lamda_NoField_Property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.NotGenerate_Complex_Return_Property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._notGenerate_Property_Int, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.NotGenerate_Returns_Property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName._fullProperty_String, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.FullProperty_String, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName._fullProperty_String_Complex, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.FullProperty_String_Complex, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName._lamdaProperty_String, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.LamdaProperty_String, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.property_Boolean, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_Char, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_SByte, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_Int16, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_Int32, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_Int64, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_Byte, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_UInt16, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_UInt32, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_UInt64, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.property_Single, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.property_Double, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.property_String, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)5, name: PropertyName.property_Vector2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)6, name: PropertyName.property_Vector2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)7, name: PropertyName.property_Rect2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)8, name: PropertyName.property_Rect2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)11, name: PropertyName.property_Transform2D, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)9, name: PropertyName.property_Vector3, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)10, name: PropertyName.property_Vector3I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)17, name: PropertyName.property_Basis, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)15, name: PropertyName.property_Quaternion, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)18, name: PropertyName.property_Transform3D, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)12, name: PropertyName.property_Vector4, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)13, name: PropertyName.property_Vector4I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)19, name: PropertyName.property_Projection, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)16, name: PropertyName.property_Aabb, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)20, name: PropertyName.property_Color, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)14, name: PropertyName.property_Plane, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)25, name: PropertyName.property_Callable, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)26, name: PropertyName.property_Signal, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_Enum, hint: (global::Godot.PropertyHint)2, hintString: "A,B,C", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.property_FlagsEnum, hint: (global::Godot.PropertyHint)6, hintString: "A:0,B:1,C:2", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)29, name: PropertyName.property_ByteArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)30, name: PropertyName.property_Int32Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)31, name: PropertyName.property_Int64Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)32, name: PropertyName.property_SingleArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)33, name: PropertyName.property_DoubleArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)34, name: PropertyName.property_StringArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)34, name: PropertyName.property_StringArrayEnum, hint: (global::Godot.PropertyHint)23, hintString: "4/2:A,B,C", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)35, name: PropertyName.property_Vector2Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)36, name: PropertyName.property_Vector3Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)37, name: PropertyName.property_ColorArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.property_GodotObjectOrDerivedArray, hint: (global::Godot.PropertyHint)23, hintString: "24/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName._notGeneratePropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.NotGenerateComplexLamdaProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.NotGenerateLamdaNoFieldProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.NotGenerateComplexReturnProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName._notGeneratePropertyInt, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.NotGenerateReturnsProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName._fullPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.FullPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName._fullPropertyStringComplex, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.FullPropertyString_Complex, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName._lamdaPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.LamdaPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.PropertyBoolean, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertyChar, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertySByte, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertyInt16, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertyInt32, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertyInt64, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertyByte, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertyUInt16, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertyUInt32, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertyUInt64, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.PropertySingle, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.PropertyDouble, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.PropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)5, name: PropertyName.PropertyVector2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)6, name: PropertyName.PropertyVector2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)7, name: PropertyName.PropertyRect2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)8, name: PropertyName.PropertyRect2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)11, name: PropertyName.PropertyTransform2D, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)9, name: PropertyName.PropertyVector3, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)10, name: PropertyName.PropertyVector3I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)17, name: PropertyName.PropertyBasis, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)15, name: PropertyName.PropertyQuaternion, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)18, name: PropertyName.PropertyTransform3D, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)12, name: PropertyName.PropertyVector4, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)13, name: PropertyName.PropertyVector4I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)19, name: PropertyName.PropertyProjection, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)16, name: PropertyName.PropertyAabb, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)20, name: PropertyName.PropertyColor, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)14, name: PropertyName.PropertyPlane, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)25, name: PropertyName.PropertyCallable, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)26, name: PropertyName.PropertySignal, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertyEnum, hint: (global::Godot.PropertyHint)2, hintString: "A,B,C", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.PropertyFlagsEnum, hint: (global::Godot.PropertyHint)6, hintString: "A:0,B:1,C:2", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)29, name: PropertyName.PropertyByteArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)30, name: PropertyName.PropertyInt32Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)31, name: PropertyName.PropertyInt64Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)32, name: PropertyName.PropertySingleArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)33, name: PropertyName.PropertyDoubleArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)34, name: PropertyName.PropertyStringArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)34, name: PropertyName.PropertyStringArrayEnum, hint: (global::Godot.PropertyHint)23, hintString: "4/2:A,B,C", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)35, name: PropertyName.PropertyVector2Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)36, name: PropertyName.PropertyVector3Array, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)37, name: PropertyName.PropertyColorArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.PropertyGodotObjectOrDerivedArray, hint: (global::Godot.PropertyHint)23, hintString: "24/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.field_StringNameArray, hint: (global::Godot.PropertyHint)23, hintString: "21/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.field_NodePathArray, hint: (global::Godot.PropertyHint)23, hintString: "22/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.field_RidArray, hint: (global::Godot.PropertyHint)23, hintString: "23/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)0, name: PropertyName.property_Variant, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)135174, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)24, name: PropertyName.property_GodotObjectOrDerived, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)24, name: PropertyName.property_GodotResourceTexture, hint: (global::Godot.PropertyHint)17, hintString: "Texture", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)21, name: PropertyName.property_StringName, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)22, name: PropertyName.property_NodePath, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)23, name: PropertyName.property_Rid, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)27, name: PropertyName.property_GodotDictionary, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.property_GodotArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)27, name: PropertyName.property_GodotGenericDictionary, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
- properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.property_GodotGenericArray, hint: (global::Godot.PropertyHint)23, hintString: "2/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)0, name: PropertyName.PropertyVariant, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)135174, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)24, name: PropertyName.PropertyGodotObjectOrDerived, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)24, name: PropertyName.PropertyGodotResourceTexture, hint: (global::Godot.PropertyHint)17, hintString: "Texture", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)21, name: PropertyName.PropertyStringName, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)22, name: PropertyName.PropertyNodePath, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)23, name: PropertyName.PropertyRid, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)27, name: PropertyName.PropertyGodotDictionary, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.PropertyGodotArray, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)27, name: PropertyName.PropertyGodotGenericDictionary, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)28, name: PropertyName.PropertyGodotGenericArray, hint: (global::Godot.PropertyHint)23, hintString: "2/0:", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
return properties;
}
#pragma warning restore CS0109
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptPropertyDefVal.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptPropertyDefVal.generated.cs
index a4cd10d080..a1b01aed4f 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptPropertyDefVal.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptPropertyDefVal.generated.cs
@@ -12,134 +12,134 @@ partial class ExportedProperties
internal new static global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant> GetGodotPropertyDefaultValues()
{
var values = new global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant>(64);
- string __NotGenerate_Complex_Lamda_Property_default_value = default;
- values.Add(PropertyName.NotGenerate_Complex_Lamda_Property, global::Godot.Variant.From<string>(__NotGenerate_Complex_Lamda_Property_default_value));
- string __NotGenerate_Lamda_NoField_Property_default_value = default;
- values.Add(PropertyName.NotGenerate_Lamda_NoField_Property, global::Godot.Variant.From<string>(__NotGenerate_Lamda_NoField_Property_default_value));
- string __NotGenerate_Complex_Return_Property_default_value = default;
- values.Add(PropertyName.NotGenerate_Complex_Return_Property, global::Godot.Variant.From<string>(__NotGenerate_Complex_Return_Property_default_value));
- string __NotGenerate_Returns_Property_default_value = default;
- values.Add(PropertyName.NotGenerate_Returns_Property, global::Godot.Variant.From<string>(__NotGenerate_Returns_Property_default_value));
- string __FullProperty_String_default_value = "FullProperty_String";
- values.Add(PropertyName.FullProperty_String, global::Godot.Variant.From<string>(__FullProperty_String_default_value));
- string __FullProperty_String_Complex_default_value = new string("FullProperty_String_Complex") + global::System.Convert.ToInt32("1");
- values.Add(PropertyName.FullProperty_String_Complex, global::Godot.Variant.From<string>(__FullProperty_String_Complex_default_value));
- string __LamdaProperty_String_default_value = "LamdaProperty_String";
- values.Add(PropertyName.LamdaProperty_String, global::Godot.Variant.From<string>(__LamdaProperty_String_default_value));
- bool __property_Boolean_default_value = true;
- values.Add(PropertyName.property_Boolean, global::Godot.Variant.From<bool>(__property_Boolean_default_value));
- char __property_Char_default_value = 'f';
- values.Add(PropertyName.property_Char, global::Godot.Variant.From<char>(__property_Char_default_value));
- sbyte __property_SByte_default_value = 10;
- values.Add(PropertyName.property_SByte, global::Godot.Variant.From<sbyte>(__property_SByte_default_value));
- short __property_Int16_default_value = 10;
- values.Add(PropertyName.property_Int16, global::Godot.Variant.From<short>(__property_Int16_default_value));
- int __property_Int32_default_value = 10;
- values.Add(PropertyName.property_Int32, global::Godot.Variant.From<int>(__property_Int32_default_value));
- long __property_Int64_default_value = 10;
- values.Add(PropertyName.property_Int64, global::Godot.Variant.From<long>(__property_Int64_default_value));
- byte __property_Byte_default_value = 10;
- values.Add(PropertyName.property_Byte, global::Godot.Variant.From<byte>(__property_Byte_default_value));
- ushort __property_UInt16_default_value = 10;
- values.Add(PropertyName.property_UInt16, global::Godot.Variant.From<ushort>(__property_UInt16_default_value));
- uint __property_UInt32_default_value = 10;
- values.Add(PropertyName.property_UInt32, global::Godot.Variant.From<uint>(__property_UInt32_default_value));
- ulong __property_UInt64_default_value = 10;
- values.Add(PropertyName.property_UInt64, global::Godot.Variant.From<ulong>(__property_UInt64_default_value));
- float __property_Single_default_value = 10;
- values.Add(PropertyName.property_Single, global::Godot.Variant.From<float>(__property_Single_default_value));
- double __property_Double_default_value = 10;
- values.Add(PropertyName.property_Double, global::Godot.Variant.From<double>(__property_Double_default_value));
- string __property_String_default_value = "foo";
- values.Add(PropertyName.property_String, global::Godot.Variant.From<string>(__property_String_default_value));
- global::Godot.Vector2 __property_Vector2_default_value = new(10f, 10f);
- values.Add(PropertyName.property_Vector2, global::Godot.Variant.From<global::Godot.Vector2>(__property_Vector2_default_value));
- global::Godot.Vector2I __property_Vector2I_default_value = global::Godot.Vector2I.Up;
- values.Add(PropertyName.property_Vector2I, global::Godot.Variant.From<global::Godot.Vector2I>(__property_Vector2I_default_value));
- global::Godot.Rect2 __property_Rect2_default_value = new(new global::Godot.Vector2(10f, 10f), new global::Godot.Vector2(10f, 10f));
- values.Add(PropertyName.property_Rect2, global::Godot.Variant.From<global::Godot.Rect2>(__property_Rect2_default_value));
- global::Godot.Rect2I __property_Rect2I_default_value = new(new global::Godot.Vector2I(10, 10), new global::Godot.Vector2I(10, 10));
- values.Add(PropertyName.property_Rect2I, global::Godot.Variant.From<global::Godot.Rect2I>(__property_Rect2I_default_value));
- global::Godot.Transform2D __property_Transform2D_default_value = global::Godot.Transform2D.Identity;
- values.Add(PropertyName.property_Transform2D, global::Godot.Variant.From<global::Godot.Transform2D>(__property_Transform2D_default_value));
- global::Godot.Vector3 __property_Vector3_default_value = new(10f, 10f, 10f);
- values.Add(PropertyName.property_Vector3, global::Godot.Variant.From<global::Godot.Vector3>(__property_Vector3_default_value));
- global::Godot.Vector3I __property_Vector3I_default_value = global::Godot.Vector3I.Back;
- values.Add(PropertyName.property_Vector3I, global::Godot.Variant.From<global::Godot.Vector3I>(__property_Vector3I_default_value));
- global::Godot.Basis __property_Basis_default_value = new global::Godot.Basis(global::Godot.Quaternion.Identity);
- values.Add(PropertyName.property_Basis, global::Godot.Variant.From<global::Godot.Basis>(__property_Basis_default_value));
- global::Godot.Quaternion __property_Quaternion_default_value = new global::Godot.Quaternion(global::Godot.Basis.Identity);
- values.Add(PropertyName.property_Quaternion, global::Godot.Variant.From<global::Godot.Quaternion>(__property_Quaternion_default_value));
- global::Godot.Transform3D __property_Transform3D_default_value = global::Godot.Transform3D.Identity;
- values.Add(PropertyName.property_Transform3D, global::Godot.Variant.From<global::Godot.Transform3D>(__property_Transform3D_default_value));
- global::Godot.Vector4 __property_Vector4_default_value = new(10f, 10f, 10f, 10f);
- values.Add(PropertyName.property_Vector4, global::Godot.Variant.From<global::Godot.Vector4>(__property_Vector4_default_value));
- global::Godot.Vector4I __property_Vector4I_default_value = global::Godot.Vector4I.One;
- values.Add(PropertyName.property_Vector4I, global::Godot.Variant.From<global::Godot.Vector4I>(__property_Vector4I_default_value));
- global::Godot.Projection __property_Projection_default_value = global::Godot.Projection.Identity;
- values.Add(PropertyName.property_Projection, global::Godot.Variant.From<global::Godot.Projection>(__property_Projection_default_value));
- global::Godot.Aabb __property_Aabb_default_value = new global::Godot.Aabb(10f, 10f, 10f, new global::Godot.Vector3(1f, 1f, 1f));
- values.Add(PropertyName.property_Aabb, global::Godot.Variant.From<global::Godot.Aabb>(__property_Aabb_default_value));
- global::Godot.Color __property_Color_default_value = global::Godot.Colors.Aquamarine;
- values.Add(PropertyName.property_Color, global::Godot.Variant.From<global::Godot.Color>(__property_Color_default_value));
- global::Godot.Plane __property_Plane_default_value = global::Godot.Plane.PlaneXZ;
- values.Add(PropertyName.property_Plane, global::Godot.Variant.From<global::Godot.Plane>(__property_Plane_default_value));
- global::Godot.Callable __property_Callable_default_value = new global::Godot.Callable(global::Godot.Engine.GetMainLoop(), "_process");
- values.Add(PropertyName.property_Callable, global::Godot.Variant.From<global::Godot.Callable>(__property_Callable_default_value));
- global::Godot.Signal __property_Signal_default_value = new global::Godot.Signal(global::Godot.Engine.GetMainLoop(), "property_list_changed");
- values.Add(PropertyName.property_Signal, global::Godot.Variant.From<global::Godot.Signal>(__property_Signal_default_value));
- global::ExportedProperties.MyEnum __property_Enum_default_value = global::ExportedProperties.MyEnum.C;
- values.Add(PropertyName.property_Enum, global::Godot.Variant.From<global::ExportedProperties.MyEnum>(__property_Enum_default_value));
- global::ExportedProperties.MyFlagsEnum __property_FlagsEnum_default_value = global::ExportedProperties.MyFlagsEnum.C;
- values.Add(PropertyName.property_FlagsEnum, global::Godot.Variant.From<global::ExportedProperties.MyFlagsEnum>(__property_FlagsEnum_default_value));
- byte[] __property_ByteArray_default_value = { 0, 1, 2, 3, 4, 5, 6 };
- values.Add(PropertyName.property_ByteArray, global::Godot.Variant.From<byte[]>(__property_ByteArray_default_value));
- int[] __property_Int32Array_default_value = { 0, 1, 2, 3, 4, 5, 6 };
- values.Add(PropertyName.property_Int32Array, global::Godot.Variant.From<int[]>(__property_Int32Array_default_value));
- long[] __property_Int64Array_default_value = { 0, 1, 2, 3, 4, 5, 6 };
- values.Add(PropertyName.property_Int64Array, global::Godot.Variant.From<long[]>(__property_Int64Array_default_value));
- float[] __property_SingleArray_default_value = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
- values.Add(PropertyName.property_SingleArray, global::Godot.Variant.From<float[]>(__property_SingleArray_default_value));
- double[] __property_DoubleArray_default_value = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
- values.Add(PropertyName.property_DoubleArray, global::Godot.Variant.From<double[]>(__property_DoubleArray_default_value));
- string[] __property_StringArray_default_value = { "foo", "bar" };
- values.Add(PropertyName.property_StringArray, global::Godot.Variant.From<string[]>(__property_StringArray_default_value));
- string[] __property_StringArrayEnum_default_value = { "foo", "bar" };
- values.Add(PropertyName.property_StringArrayEnum, global::Godot.Variant.From<string[]>(__property_StringArrayEnum_default_value));
- global::Godot.Vector2[] __property_Vector2Array_default_value = { global::Godot.Vector2.Up, global::Godot.Vector2.Down, global::Godot.Vector2.Left, global::Godot.Vector2.Right };
- values.Add(PropertyName.property_Vector2Array, global::Godot.Variant.From<global::Godot.Vector2[]>(__property_Vector2Array_default_value));
- global::Godot.Vector3[] __property_Vector3Array_default_value = { global::Godot.Vector3.Up, global::Godot.Vector3.Down, global::Godot.Vector3.Left, global::Godot.Vector3.Right };
- values.Add(PropertyName.property_Vector3Array, global::Godot.Variant.From<global::Godot.Vector3[]>(__property_Vector3Array_default_value));
- global::Godot.Color[] __property_ColorArray_default_value = { global::Godot.Colors.Aqua, global::Godot.Colors.Aquamarine, global::Godot.Colors.Azure, global::Godot.Colors.Beige };
- values.Add(PropertyName.property_ColorArray, global::Godot.Variant.From<global::Godot.Color[]>(__property_ColorArray_default_value));
- global::Godot.GodotObject[] __property_GodotObjectOrDerivedArray_default_value = { null };
- values.Add(PropertyName.property_GodotObjectOrDerivedArray, global::Godot.Variant.CreateFrom(__property_GodotObjectOrDerivedArray_default_value));
+ string __NotGenerateComplexLamdaProperty_default_value = default;
+ values.Add(PropertyName.NotGenerateComplexLamdaProperty, global::Godot.Variant.From<string>(__NotGenerateComplexLamdaProperty_default_value));
+ string __NotGenerateLamdaNoFieldProperty_default_value = default;
+ values.Add(PropertyName.NotGenerateLamdaNoFieldProperty, global::Godot.Variant.From<string>(__NotGenerateLamdaNoFieldProperty_default_value));
+ string __NotGenerateComplexReturnProperty_default_value = default;
+ values.Add(PropertyName.NotGenerateComplexReturnProperty, global::Godot.Variant.From<string>(__NotGenerateComplexReturnProperty_default_value));
+ string __NotGenerateReturnsProperty_default_value = default;
+ values.Add(PropertyName.NotGenerateReturnsProperty, global::Godot.Variant.From<string>(__NotGenerateReturnsProperty_default_value));
+ string __FullPropertyString_default_value = "FullPropertyString";
+ values.Add(PropertyName.FullPropertyString, global::Godot.Variant.From<string>(__FullPropertyString_default_value));
+ string __FullPropertyString_Complex_default_value = new string("FullPropertyString_Complex") + global::System.Convert.ToInt32("1");
+ values.Add(PropertyName.FullPropertyString_Complex, global::Godot.Variant.From<string>(__FullPropertyString_Complex_default_value));
+ string __LamdaPropertyString_default_value = "LamdaPropertyString";
+ values.Add(PropertyName.LamdaPropertyString, global::Godot.Variant.From<string>(__LamdaPropertyString_default_value));
+ bool __PropertyBoolean_default_value = true;
+ values.Add(PropertyName.PropertyBoolean, global::Godot.Variant.From<bool>(__PropertyBoolean_default_value));
+ char __PropertyChar_default_value = 'f';
+ values.Add(PropertyName.PropertyChar, global::Godot.Variant.From<char>(__PropertyChar_default_value));
+ sbyte __PropertySByte_default_value = 10;
+ values.Add(PropertyName.PropertySByte, global::Godot.Variant.From<sbyte>(__PropertySByte_default_value));
+ short __PropertyInt16_default_value = 10;
+ values.Add(PropertyName.PropertyInt16, global::Godot.Variant.From<short>(__PropertyInt16_default_value));
+ int __PropertyInt32_default_value = 10;
+ values.Add(PropertyName.PropertyInt32, global::Godot.Variant.From<int>(__PropertyInt32_default_value));
+ long __PropertyInt64_default_value = 10;
+ values.Add(PropertyName.PropertyInt64, global::Godot.Variant.From<long>(__PropertyInt64_default_value));
+ byte __PropertyByte_default_value = 10;
+ values.Add(PropertyName.PropertyByte, global::Godot.Variant.From<byte>(__PropertyByte_default_value));
+ ushort __PropertyUInt16_default_value = 10;
+ values.Add(PropertyName.PropertyUInt16, global::Godot.Variant.From<ushort>(__PropertyUInt16_default_value));
+ uint __PropertyUInt32_default_value = 10;
+ values.Add(PropertyName.PropertyUInt32, global::Godot.Variant.From<uint>(__PropertyUInt32_default_value));
+ ulong __PropertyUInt64_default_value = 10;
+ values.Add(PropertyName.PropertyUInt64, global::Godot.Variant.From<ulong>(__PropertyUInt64_default_value));
+ float __PropertySingle_default_value = 10;
+ values.Add(PropertyName.PropertySingle, global::Godot.Variant.From<float>(__PropertySingle_default_value));
+ double __PropertyDouble_default_value = 10;
+ values.Add(PropertyName.PropertyDouble, global::Godot.Variant.From<double>(__PropertyDouble_default_value));
+ string __PropertyString_default_value = "foo";
+ values.Add(PropertyName.PropertyString, global::Godot.Variant.From<string>(__PropertyString_default_value));
+ global::Godot.Vector2 __PropertyVector2_default_value = new(10f, 10f);
+ values.Add(PropertyName.PropertyVector2, global::Godot.Variant.From<global::Godot.Vector2>(__PropertyVector2_default_value));
+ global::Godot.Vector2I __PropertyVector2I_default_value = global::Godot.Vector2I.Up;
+ values.Add(PropertyName.PropertyVector2I, global::Godot.Variant.From<global::Godot.Vector2I>(__PropertyVector2I_default_value));
+ global::Godot.Rect2 __PropertyRect2_default_value = new(new global::Godot.Vector2(10f, 10f), new global::Godot.Vector2(10f, 10f));
+ values.Add(PropertyName.PropertyRect2, global::Godot.Variant.From<global::Godot.Rect2>(__PropertyRect2_default_value));
+ global::Godot.Rect2I __PropertyRect2I_default_value = new(new global::Godot.Vector2I(10, 10), new global::Godot.Vector2I(10, 10));
+ values.Add(PropertyName.PropertyRect2I, global::Godot.Variant.From<global::Godot.Rect2I>(__PropertyRect2I_default_value));
+ global::Godot.Transform2D __PropertyTransform2D_default_value = global::Godot.Transform2D.Identity;
+ values.Add(PropertyName.PropertyTransform2D, global::Godot.Variant.From<global::Godot.Transform2D>(__PropertyTransform2D_default_value));
+ global::Godot.Vector3 __PropertyVector3_default_value = new(10f, 10f, 10f);
+ values.Add(PropertyName.PropertyVector3, global::Godot.Variant.From<global::Godot.Vector3>(__PropertyVector3_default_value));
+ global::Godot.Vector3I __PropertyVector3I_default_value = global::Godot.Vector3I.Back;
+ values.Add(PropertyName.PropertyVector3I, global::Godot.Variant.From<global::Godot.Vector3I>(__PropertyVector3I_default_value));
+ global::Godot.Basis __PropertyBasis_default_value = new global::Godot.Basis(global::Godot.Quaternion.Identity);
+ values.Add(PropertyName.PropertyBasis, global::Godot.Variant.From<global::Godot.Basis>(__PropertyBasis_default_value));
+ global::Godot.Quaternion __PropertyQuaternion_default_value = new global::Godot.Quaternion(global::Godot.Basis.Identity);
+ values.Add(PropertyName.PropertyQuaternion, global::Godot.Variant.From<global::Godot.Quaternion>(__PropertyQuaternion_default_value));
+ global::Godot.Transform3D __PropertyTransform3D_default_value = global::Godot.Transform3D.Identity;
+ values.Add(PropertyName.PropertyTransform3D, global::Godot.Variant.From<global::Godot.Transform3D>(__PropertyTransform3D_default_value));
+ global::Godot.Vector4 __PropertyVector4_default_value = new(10f, 10f, 10f, 10f);
+ values.Add(PropertyName.PropertyVector4, global::Godot.Variant.From<global::Godot.Vector4>(__PropertyVector4_default_value));
+ global::Godot.Vector4I __PropertyVector4I_default_value = global::Godot.Vector4I.One;
+ values.Add(PropertyName.PropertyVector4I, global::Godot.Variant.From<global::Godot.Vector4I>(__PropertyVector4I_default_value));
+ global::Godot.Projection __PropertyProjection_default_value = global::Godot.Projection.Identity;
+ values.Add(PropertyName.PropertyProjection, global::Godot.Variant.From<global::Godot.Projection>(__PropertyProjection_default_value));
+ global::Godot.Aabb __PropertyAabb_default_value = new global::Godot.Aabb(10f, 10f, 10f, new global::Godot.Vector3(1f, 1f, 1f));
+ values.Add(PropertyName.PropertyAabb, global::Godot.Variant.From<global::Godot.Aabb>(__PropertyAabb_default_value));
+ global::Godot.Color __PropertyColor_default_value = global::Godot.Colors.Aquamarine;
+ values.Add(PropertyName.PropertyColor, global::Godot.Variant.From<global::Godot.Color>(__PropertyColor_default_value));
+ global::Godot.Plane __PropertyPlane_default_value = global::Godot.Plane.PlaneXZ;
+ values.Add(PropertyName.PropertyPlane, global::Godot.Variant.From<global::Godot.Plane>(__PropertyPlane_default_value));
+ global::Godot.Callable __PropertyCallable_default_value = new global::Godot.Callable(global::Godot.Engine.GetMainLoop(), "_process");
+ values.Add(PropertyName.PropertyCallable, global::Godot.Variant.From<global::Godot.Callable>(__PropertyCallable_default_value));
+ global::Godot.Signal __PropertySignal_default_value = new global::Godot.Signal(global::Godot.Engine.GetMainLoop(), "Propertylist_changed");
+ values.Add(PropertyName.PropertySignal, global::Godot.Variant.From<global::Godot.Signal>(__PropertySignal_default_value));
+ global::ExportedProperties.MyEnum __PropertyEnum_default_value = global::ExportedProperties.MyEnum.C;
+ values.Add(PropertyName.PropertyEnum, global::Godot.Variant.From<global::ExportedProperties.MyEnum>(__PropertyEnum_default_value));
+ global::ExportedProperties.MyFlagsEnum __PropertyFlagsEnum_default_value = global::ExportedProperties.MyFlagsEnum.C;
+ values.Add(PropertyName.PropertyFlagsEnum, global::Godot.Variant.From<global::ExportedProperties.MyFlagsEnum>(__PropertyFlagsEnum_default_value));
+ byte[] __PropertyByteArray_default_value = { 0, 1, 2, 3, 4, 5, 6 };
+ values.Add(PropertyName.PropertyByteArray, global::Godot.Variant.From<byte[]>(__PropertyByteArray_default_value));
+ int[] __PropertyInt32Array_default_value = { 0, 1, 2, 3, 4, 5, 6 };
+ values.Add(PropertyName.PropertyInt32Array, global::Godot.Variant.From<int[]>(__PropertyInt32Array_default_value));
+ long[] __PropertyInt64Array_default_value = { 0, 1, 2, 3, 4, 5, 6 };
+ values.Add(PropertyName.PropertyInt64Array, global::Godot.Variant.From<long[]>(__PropertyInt64Array_default_value));
+ float[] __PropertySingleArray_default_value = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
+ values.Add(PropertyName.PropertySingleArray, global::Godot.Variant.From<float[]>(__PropertySingleArray_default_value));
+ double[] __PropertyDoubleArray_default_value = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
+ values.Add(PropertyName.PropertyDoubleArray, global::Godot.Variant.From<double[]>(__PropertyDoubleArray_default_value));
+ string[] __PropertyStringArray_default_value = { "foo", "bar" };
+ values.Add(PropertyName.PropertyStringArray, global::Godot.Variant.From<string[]>(__PropertyStringArray_default_value));
+ string[] __PropertyStringArrayEnum_default_value = { "foo", "bar" };
+ values.Add(PropertyName.PropertyStringArrayEnum, global::Godot.Variant.From<string[]>(__PropertyStringArrayEnum_default_value));
+ global::Godot.Vector2[] __PropertyVector2Array_default_value = { global::Godot.Vector2.Up, global::Godot.Vector2.Down, global::Godot.Vector2.Left, global::Godot.Vector2.Right };
+ values.Add(PropertyName.PropertyVector2Array, global::Godot.Variant.From<global::Godot.Vector2[]>(__PropertyVector2Array_default_value));
+ global::Godot.Vector3[] __PropertyVector3Array_default_value = { global::Godot.Vector3.Up, global::Godot.Vector3.Down, global::Godot.Vector3.Left, global::Godot.Vector3.Right };
+ values.Add(PropertyName.PropertyVector3Array, global::Godot.Variant.From<global::Godot.Vector3[]>(__PropertyVector3Array_default_value));
+ global::Godot.Color[] __PropertyColorArray_default_value = { global::Godot.Colors.Aqua, global::Godot.Colors.Aquamarine, global::Godot.Colors.Azure, global::Godot.Colors.Beige };
+ values.Add(PropertyName.PropertyColorArray, global::Godot.Variant.From<global::Godot.Color[]>(__PropertyColorArray_default_value));
+ global::Godot.GodotObject[] __PropertyGodotObjectOrDerivedArray_default_value = { null };
+ values.Add(PropertyName.PropertyGodotObjectOrDerivedArray, global::Godot.Variant.CreateFrom(__PropertyGodotObjectOrDerivedArray_default_value));
global::Godot.StringName[] __field_StringNameArray_default_value = { "foo", "bar" };
values.Add(PropertyName.field_StringNameArray, global::Godot.Variant.From<global::Godot.StringName[]>(__field_StringNameArray_default_value));
global::Godot.NodePath[] __field_NodePathArray_default_value = { "foo", "bar" };
values.Add(PropertyName.field_NodePathArray, global::Godot.Variant.From<global::Godot.NodePath[]>(__field_NodePathArray_default_value));
global::Godot.Rid[] __field_RidArray_default_value = { default, default, default };
values.Add(PropertyName.field_RidArray, global::Godot.Variant.From<global::Godot.Rid[]>(__field_RidArray_default_value));
- global::Godot.Variant __property_Variant_default_value = "foo";
- values.Add(PropertyName.property_Variant, global::Godot.Variant.From<global::Godot.Variant>(__property_Variant_default_value));
- global::Godot.GodotObject __property_GodotObjectOrDerived_default_value = default;
- values.Add(PropertyName.property_GodotObjectOrDerived, global::Godot.Variant.From<global::Godot.GodotObject>(__property_GodotObjectOrDerived_default_value));
- global::Godot.Texture __property_GodotResourceTexture_default_value = default;
- values.Add(PropertyName.property_GodotResourceTexture, global::Godot.Variant.From<global::Godot.Texture>(__property_GodotResourceTexture_default_value));
- global::Godot.StringName __property_StringName_default_value = new global::Godot.StringName("foo");
- values.Add(PropertyName.property_StringName, global::Godot.Variant.From<global::Godot.StringName>(__property_StringName_default_value));
- global::Godot.NodePath __property_NodePath_default_value = new global::Godot.NodePath("foo");
- values.Add(PropertyName.property_NodePath, global::Godot.Variant.From<global::Godot.NodePath>(__property_NodePath_default_value));
- global::Godot.Rid __property_Rid_default_value = default;
- values.Add(PropertyName.property_Rid, global::Godot.Variant.From<global::Godot.Rid>(__property_Rid_default_value));
- global::Godot.Collections.Dictionary __property_GodotDictionary_default_value = new() { { "foo", 10 }, { global::Godot.Vector2.Up, global::Godot.Colors.Chocolate } };
- values.Add(PropertyName.property_GodotDictionary, global::Godot.Variant.From<global::Godot.Collections.Dictionary>(__property_GodotDictionary_default_value));
- global::Godot.Collections.Array __property_GodotArray_default_value = new() { "foo", 10, global::Godot.Vector2.Up, global::Godot.Colors.Chocolate };
- values.Add(PropertyName.property_GodotArray, global::Godot.Variant.From<global::Godot.Collections.Array>(__property_GodotArray_default_value));
- global::Godot.Collections.Dictionary<string, bool> __property_GodotGenericDictionary_default_value = new() { { "foo", true }, { "bar", false } };
- values.Add(PropertyName.property_GodotGenericDictionary, global::Godot.Variant.CreateFrom(__property_GodotGenericDictionary_default_value));
- global::Godot.Collections.Array<int> __property_GodotGenericArray_default_value = new() { 0, 1, 2, 3, 4, 5, 6 };
- values.Add(PropertyName.property_GodotGenericArray, global::Godot.Variant.CreateFrom(__property_GodotGenericArray_default_value));
+ global::Godot.Variant __PropertyVariant_default_value = "foo";
+ values.Add(PropertyName.PropertyVariant, global::Godot.Variant.From<global::Godot.Variant>(__PropertyVariant_default_value));
+ global::Godot.GodotObject __PropertyGodotObjectOrDerived_default_value = default;
+ values.Add(PropertyName.PropertyGodotObjectOrDerived, global::Godot.Variant.From<global::Godot.GodotObject>(__PropertyGodotObjectOrDerived_default_value));
+ global::Godot.Texture __PropertyGodotResourceTexture_default_value = default;
+ values.Add(PropertyName.PropertyGodotResourceTexture, global::Godot.Variant.From<global::Godot.Texture>(__PropertyGodotResourceTexture_default_value));
+ global::Godot.StringName __PropertyStringName_default_value = new global::Godot.StringName("foo");
+ values.Add(PropertyName.PropertyStringName, global::Godot.Variant.From<global::Godot.StringName>(__PropertyStringName_default_value));
+ global::Godot.NodePath __PropertyNodePath_default_value = new global::Godot.NodePath("foo");
+ values.Add(PropertyName.PropertyNodePath, global::Godot.Variant.From<global::Godot.NodePath>(__PropertyNodePath_default_value));
+ global::Godot.Rid __PropertyRid_default_value = default;
+ values.Add(PropertyName.PropertyRid, global::Godot.Variant.From<global::Godot.Rid>(__PropertyRid_default_value));
+ global::Godot.Collections.Dictionary __PropertyGodotDictionary_default_value = new() { { "foo", 10 }, { global::Godot.Vector2.Up, global::Godot.Colors.Chocolate } };
+ values.Add(PropertyName.PropertyGodotDictionary, global::Godot.Variant.From<global::Godot.Collections.Dictionary>(__PropertyGodotDictionary_default_value));
+ global::Godot.Collections.Array __PropertyGodotArray_default_value = new() { "foo", 10, global::Godot.Vector2.Up, global::Godot.Colors.Chocolate };
+ values.Add(PropertyName.PropertyGodotArray, global::Godot.Variant.From<global::Godot.Collections.Array>(__PropertyGodotArray_default_value));
+ global::Godot.Collections.Dictionary<string, bool> __PropertyGodotGenericDictionary_default_value = new() { { "foo", true }, { "bar", false } };
+ values.Add(PropertyName.PropertyGodotGenericDictionary, global::Godot.Variant.CreateFrom(__PropertyGodotGenericDictionary_default_value));
+ global::Godot.Collections.Array<int> __PropertyGodotGenericArray_default_value = new() { 0, 1, 2, 3, 4, 5, 6 };
+ values.Add(PropertyName.PropertyGodotGenericArray, global::Godot.Variant.CreateFrom(__PropertyGodotGenericArray_default_value));
return values;
}
#endif // TOOLS
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/MixedReadOnlyWriteOnly_ScriptProperties.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/MixedReadOnlyWriteOnly_ScriptProperties.generated.cs
index f812457aa5..91f808f55e 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/MixedReadOnlyWriteOnly_ScriptProperties.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/MixedReadOnlyWriteOnly_ScriptProperties.generated.cs
@@ -9,40 +9,40 @@ partial class MixedReadOnlyWriteOnly
/// </summary>
public new class PropertyName : global::Godot.GodotObject.PropertyName {
/// <summary>
- /// Cached name for the 'readonly_auto_property' property.
+ /// Cached name for the 'ReadOnlyAutoProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName readonly_auto_property = "readonly_auto_property";
+ public new static readonly global::Godot.StringName ReadOnlyAutoProperty = "ReadOnlyAutoProperty";
/// <summary>
- /// Cached name for the 'readonly_property' property.
+ /// Cached name for the 'ReadOnlyProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName readonly_property = "readonly_property";
+ public new static readonly global::Godot.StringName ReadOnlyProperty = "ReadOnlyProperty";
/// <summary>
- /// Cached name for the 'initonly_auto_property' property.
+ /// Cached name for the 'InitOnlyAutoProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName initonly_auto_property = "initonly_auto_property";
+ public new static readonly global::Godot.StringName InitOnlyAutoProperty = "InitOnlyAutoProperty";
/// <summary>
- /// Cached name for the 'writeonly_property' property.
+ /// Cached name for the 'WriteOnlyProperty' property.
/// </summary>
- public new static readonly global::Godot.StringName writeonly_property = "writeonly_property";
+ public new static readonly global::Godot.StringName WriteOnlyProperty = "WriteOnlyProperty";
/// <summary>
- /// Cached name for the 'readonly_field' field.
+ /// Cached name for the 'ReadOnlyField' field.
/// </summary>
- public new static readonly global::Godot.StringName readonly_field = "readonly_field";
+ public new static readonly global::Godot.StringName ReadOnlyField = "ReadOnlyField";
/// <summary>
- /// Cached name for the 'writeonly_backing_field' field.
+ /// Cached name for the '_writeOnlyBackingField' field.
/// </summary>
- public new static readonly global::Godot.StringName writeonly_backing_field = "writeonly_backing_field";
+ public new static readonly global::Godot.StringName _writeOnlyBackingField = "_writeOnlyBackingField";
}
/// <inheritdoc/>
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool SetGodotClassPropertyValue(in godot_string_name name, in godot_variant value)
{
- if (name == PropertyName.writeonly_property) {
- this.writeonly_property = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
+ if (name == PropertyName.WriteOnlyProperty) {
+ this.WriteOnlyProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
- else if (name == PropertyName.writeonly_backing_field) {
- this.writeonly_backing_field = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
+ else if (name == PropertyName._writeOnlyBackingField) {
+ this._writeOnlyBackingField = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
return base.SetGodotClassPropertyValue(name, value);
@@ -51,24 +51,24 @@ partial class MixedReadOnlyWriteOnly
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override bool GetGodotClassPropertyValue(in godot_string_name name, out godot_variant value)
{
- if (name == PropertyName.readonly_auto_property) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.readonly_auto_property);
+ if (name == PropertyName.ReadOnlyAutoProperty) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyAutoProperty);
return true;
}
- else if (name == PropertyName.readonly_property) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.readonly_property);
+ else if (name == PropertyName.ReadOnlyProperty) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyProperty);
return true;
}
- else if (name == PropertyName.initonly_auto_property) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.initonly_auto_property);
+ else if (name == PropertyName.InitOnlyAutoProperty) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.InitOnlyAutoProperty);
return true;
}
- else if (name == PropertyName.readonly_field) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.readonly_field);
+ else if (name == PropertyName.ReadOnlyField) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyField);
return true;
}
- else if (name == PropertyName.writeonly_backing_field) {
- value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this.writeonly_backing_field);
+ else if (name == PropertyName._writeOnlyBackingField) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this._writeOnlyBackingField);
return true;
}
return base.GetGodotClassPropertyValue(name, out value);
@@ -82,12 +82,12 @@ partial class MixedReadOnlyWriteOnly
internal new static global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo> GetGodotPropertyList()
{
var properties = new global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo>();
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.readonly_field, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.readonly_auto_property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.readonly_property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.initonly_auto_property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.writeonly_backing_field, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
- properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.writeonly_property, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.ReadOnlyField, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.ReadOnlyAutoProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.ReadOnlyProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.InitOnlyAutoProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName._writeOnlyBackingField, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.WriteOnlyProperty, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
return properties;
}
#pragma warning restore CS0109
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/AllReadOnly.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/AllReadOnly.cs
index 94c2bda363..2586db1137 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/AllReadOnly.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/AllReadOnly.cs
@@ -2,8 +2,8 @@ using Godot;
public partial class AllReadOnly : GodotObject
{
- public readonly string readonly_field = "foo";
- public string readonly_auto_property { get; } = "foo";
- public string readonly_property { get => "foo"; }
- public string initonly_auto_property { get; init; }
+ public readonly string ReadOnlyField = "foo";
+ public string ReadOnlyAutoProperty { get; } = "foo";
+ public string ReadOnlyProperty { get => "foo"; }
+ public string InitOnlyAutoProperty { get; init; }
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/AllWriteOnly.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/AllWriteOnly.cs
index 156d6bb6a5..e2ebff4876 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/AllWriteOnly.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/AllWriteOnly.cs
@@ -2,6 +2,6 @@ using Godot;
public partial class AllWriteOnly : GodotObject
{
- bool writeonly_backing_field = false;
- public bool writeonly_property { set => writeonly_backing_field = value; }
+ private bool _writeOnlyBackingField = false;
+ public bool WriteOnlyProperty { set => _writeOnlyBackingField = value; }
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Bar.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Bar.cs
index dfe2217c26..d364e40bf0 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Bar.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Bar.cs
@@ -1,14 +1,14 @@
using Godot;
-partial class Bar : GodotObject
+public partial class Bar : GodotObject
{
}
// Foo in another file
-partial class Foo
+public partial class Foo
{
}
-partial class NotSameNameAsFile : GodotObject
+public partial class NotSameNameAsFile : GodotObject
{
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedFields.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedFields.cs
index 09d654ffcb..0938d10afe 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedFields.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedFields.cs
@@ -4,99 +4,99 @@ using System.Collections.Generic;
public partial class ExportedFields : GodotObject
{
- [Export] private Boolean field_Boolean = true;
- [Export] private Char field_Char = 'f';
- [Export] private SByte field_SByte = 10;
- [Export] private Int16 field_Int16 = 10;
- [Export] private Int32 field_Int32 = 10;
- [Export] private Int64 field_Int64 = 10;
- [Export] private Byte field_Byte = 10;
- [Export] private UInt16 field_UInt16 = 10;
- [Export] private UInt32 field_UInt32 = 10;
- [Export] private UInt64 field_UInt64 = 10;
- [Export] private Single field_Single = 10;
- [Export] private Double field_Double = 10;
- [Export] private String field_String = "foo";
+ [Export] private Boolean _fieldBoolean = true;
+ [Export] private Char _fieldChar = 'f';
+ [Export] private SByte _fieldSByte = 10;
+ [Export] private Int16 _fieldInt16 = 10;
+ [Export] private Int32 _fieldInt32 = 10;
+ [Export] private Int64 _fieldInt64 = 10;
+ [Export] private Byte _fieldByte = 10;
+ [Export] private UInt16 _fieldUInt16 = 10;
+ [Export] private UInt32 _fieldUInt32 = 10;
+ [Export] private UInt64 _fieldUInt64 = 10;
+ [Export] private Single _fieldSingle = 10;
+ [Export] private Double _fieldDouble = 10;
+ [Export] private String _fieldString = "foo";
// Godot structs
- [Export] private Vector2 field_Vector2 = new(10f, 10f);
- [Export] private Vector2I field_Vector2I = Vector2I.Up;
- [Export] private Rect2 field_Rect2 = new(new Vector2(10f, 10f), new Vector2(10f, 10f));
- [Export] private Rect2I field_Rect2I = new(new Vector2I(10, 10), new Vector2I(10, 10));
- [Export] private Transform2D field_Transform2D = Transform2D.Identity;
- [Export] private Vector3 field_Vector3 = new(10f, 10f, 10f);
- [Export] private Vector3I field_Vector3I = Vector3I.Back;
- [Export] private Basis field_Basis = new Basis(Quaternion.Identity);
- [Export] private Quaternion field_Quaternion = new Quaternion(Basis.Identity);
- [Export] private Transform3D field_Transform3D = Transform3D.Identity;
- [Export] private Vector4 field_Vector4 = new(10f, 10f, 10f, 10f);
- [Export] private Vector4I field_Vector4I = Vector4I.One;
- [Export] private Projection field_Projection = Projection.Identity;
- [Export] private Aabb field_Aabb = new Aabb(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
- [Export] private Color field_Color = Colors.Aquamarine;
- [Export] private Plane field_Plane = Plane.PlaneXZ;
- [Export] private Callable field_Callable = new Callable(Engine.GetMainLoop(), "_process");
- [Export] private Signal field_Signal = new Signal(Engine.GetMainLoop(), "property_list_changed");
+ [Export] private Vector2 _fieldVector2 = new(10f, 10f);
+ [Export] private Vector2I _fieldVector2I = Vector2I.Up;
+ [Export] private Rect2 _fieldRect2 = new(new Vector2(10f, 10f), new Vector2(10f, 10f));
+ [Export] private Rect2I _fieldRect2I = new(new Vector2I(10, 10), new Vector2I(10, 10));
+ [Export] private Transform2D _fieldTransform2D = Transform2D.Identity;
+ [Export] private Vector3 _fieldVector3 = new(10f, 10f, 10f);
+ [Export] private Vector3I _fieldVector3I = Vector3I.Back;
+ [Export] private Basis _fieldBasis = new Basis(Quaternion.Identity);
+ [Export] private Quaternion _fieldQuaternion = new Quaternion(Basis.Identity);
+ [Export] private Transform3D _fieldTransform3D = Transform3D.Identity;
+ [Export] private Vector4 _fieldVector4 = new(10f, 10f, 10f, 10f);
+ [Export] private Vector4I _fieldVector4I = Vector4I.One;
+ [Export] private Projection _fieldProjection = Projection.Identity;
+ [Export] private Aabb _fieldAabb = new Aabb(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
+ [Export] private Color _fieldColor = Colors.Aquamarine;
+ [Export] private Plane _fieldPlane = Plane.PlaneXZ;
+ [Export] private Callable _fieldCallable = new Callable(Engine.GetMainLoop(), "_process");
+ [Export] private Signal _fieldSignal = new Signal(Engine.GetMainLoop(), "property_list_changed");
// Enums
- enum MyEnum
+ public enum MyEnum
{
A,
B,
C
}
- [Export] private MyEnum field_Enum = MyEnum.C;
+ [Export] private MyEnum _fieldEnum = MyEnum.C;
[Flags]
- enum MyFlagsEnum
+ public enum MyFlagsEnum
{
A,
B,
C
}
- [Export] private MyFlagsEnum field_FlagsEnum = MyFlagsEnum.C;
+ [Export] private MyFlagsEnum _fieldFlagsEnum = MyFlagsEnum.C;
// Arrays
- [Export] private Byte[] field_ByteArray = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Int32[] field_Int32Array = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Int64[] field_Int64Array = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Single[] field_SingleArray = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
- [Export] private Double[] field_DoubleArray = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
- [Export] private String[] field_StringArray = { "foo", "bar" };
- [Export(PropertyHint.Enum, "A,B,C")] private String[] field_StringArrayEnum = { "foo", "bar" };
- [Export] private Vector2[] field_Vector2Array = { Vector2.Up, Vector2.Down, Vector2.Left, Vector2.Right };
- [Export] private Vector3[] field_Vector3Array = { Vector3.Up, Vector3.Down, Vector3.Left, Vector3.Right };
- [Export] private Color[] field_ColorArray = { Colors.Aqua, Colors.Aquamarine, Colors.Azure, Colors.Beige };
- [Export] private GodotObject[] field_GodotObjectOrDerivedArray = { null };
- [Export] private StringName[] field_StringNameArray = { "foo", "bar" };
- [Export] private NodePath[] field_NodePathArray = { "foo", "bar" };
- [Export] private Rid[] field_RidArray = { default, default, default };
+ [Export] private Byte[] _fieldByteArray = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Int32[] _fieldInt32Array = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Int64[] _fieldInt64Array = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Single[] _fieldSingleArray = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
+ [Export] private Double[] _fieldDoubleArray = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
+ [Export] private String[] _fieldStringArray = { "foo", "bar" };
+ [Export(PropertyHint.Enum, "A,B,C")] private String[] _fieldStringArrayEnum = { "foo", "bar" };
+ [Export] private Vector2[] _fieldVector2Array = { Vector2.Up, Vector2.Down, Vector2.Left, Vector2.Right };
+ [Export] private Vector3[] _fieldVector3Array = { Vector3.Up, Vector3.Down, Vector3.Left, Vector3.Right };
+ [Export] private Color[] _fieldColorArray = { Colors.Aqua, Colors.Aquamarine, Colors.Azure, Colors.Beige };
+ [Export] private GodotObject[] _fieldGodotObjectOrDerivedArray = { null };
+ [Export] private StringName[] _fieldStringNameArray = { "foo", "bar" };
+ [Export] private NodePath[] _fieldNodePathArray = { "foo", "bar" };
+ [Export] private Rid[] _fieldRidArray = { default, default, default };
// Note we use Array and not System.Array. This tests the generated namespace qualification.
- [Export] private Int32[] field_empty_Int32Array = Array.Empty<Int32>();
+ [Export] private Int32[] _fieldEmptyInt32Array = Array.Empty<Int32>();
// Note we use List and not System.Collections.Generic.
- [Export] private int[] field_array_from_list = new List<int>(Array.Empty<int>()).ToArray();
+ [Export] private int[] _fieldArrayFromList = new List<int>(Array.Empty<int>()).ToArray();
// Variant
- [Export] private Variant field_Variant = "foo";
+ [Export] private Variant _fieldVariant = "foo";
// Classes
- [Export] private GodotObject field_GodotObjectOrDerived;
- [Export] private Godot.Texture field_GodotResourceTexture;
- [Export] private StringName field_StringName = new StringName("foo");
- [Export] private NodePath field_NodePath = new NodePath("foo");
- [Export] private Rid field_Rid;
+ [Export] private GodotObject _fieldGodotObjectOrDerived;
+ [Export] private Godot.Texture _fieldGodotResourceTexture;
+ [Export] private StringName _fieldStringName = new StringName("foo");
+ [Export] private NodePath _fieldNodePath = new NodePath("foo");
+ [Export] private Rid _fieldRid;
[Export]
- private Godot.Collections.Dictionary field_GodotDictionary = new() { { "foo", 10 }, { Vector2.Up, Colors.Chocolate } };
+ private Godot.Collections.Dictionary _fieldGodotDictionary = new() { { "foo", 10 }, { Vector2.Up, Colors.Chocolate } };
[Export]
- private Godot.Collections.Array field_GodotArray = new() { "foo", 10, Vector2.Up, Colors.Chocolate };
+ private Godot.Collections.Array _fieldGodotArray = new() { "foo", 10, Vector2.Up, Colors.Chocolate };
[Export]
- private Godot.Collections.Dictionary<string, bool> field_GodotGenericDictionary = new() { { "foo", true }, { "bar", false } };
+ private Godot.Collections.Dictionary<string, bool> _fieldGodotGenericDictionary = new() { { "foo", true }, { "bar", false } };
[Export]
- private Godot.Collections.Array<int> field_GodotGenericArray = new() { 0, 1, 2, 3, 4, 5, 6 };
+ private Godot.Collections.Array<int> _fieldGodotGenericArray = new() { 0, 1, 2, 3, 4, 5, 6 };
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedProperties.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedProperties.cs
index 3783838dae..9ae23066fc 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedProperties.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedProperties.cs
@@ -4,41 +4,41 @@ using System;
public partial class ExportedProperties : GodotObject
{
// Do not generate default value
- private String _notGenerate_Property_String = new string("not generate");
+ private String _notGeneratePropertyString = new string("not generate");
[Export]
- public String NotGenerate_Complex_Lamda_Property
+ public String NotGenerateComplexLamdaProperty
{
- get => _notGenerate_Property_String + Convert.ToInt32("1");
- set => _notGenerate_Property_String = value;
+ get => _notGeneratePropertyString + Convert.ToInt32("1");
+ set => _notGeneratePropertyString = value;
}
[Export]
- public String NotGenerate_Lamda_NoField_Property
+ public String NotGenerateLamdaNoFieldProperty
{
get => new string("not generate");
- set => _notGenerate_Property_String = value;
+ set => _notGeneratePropertyString = value;
}
[Export]
- public String NotGenerate_Complex_Return_Property
+ public String NotGenerateComplexReturnProperty
{
get
{
- return _notGenerate_Property_String + Convert.ToInt32("1");
+ return _notGeneratePropertyString + Convert.ToInt32("1");
}
set
{
- _notGenerate_Property_String = value;
+ _notGeneratePropertyString = value;
}
}
- private int _notGenerate_Property_Int = 1;
+ private int _notGeneratePropertyInt = 1;
[Export]
- public string NotGenerate_Returns_Property
+ public string NotGenerateReturnsProperty
{
get
{
- if (_notGenerate_Property_Int == 1)
+ if (_notGeneratePropertyInt == 1)
{
return "a";
}
@@ -49,138 +49,138 @@ public partial class ExportedProperties : GodotObject
}
set
{
- _notGenerate_Property_Int = value == "a" ? 1 : 2;
+ _notGeneratePropertyInt = value == "a" ? 1 : 2;
}
}
// Full Property
- private String _fullProperty_String = "FullProperty_String";
+ private String _fullPropertyString = "FullPropertyString";
[Export]
- public String FullProperty_String
+ public String FullPropertyString
{
get
{
- return _fullProperty_String;
+ return _fullPropertyString;
}
set
{
- _fullProperty_String = value;
+ _fullPropertyString = value;
}
}
- private String _fullProperty_String_Complex = new string("FullProperty_String_Complex") + Convert.ToInt32("1");
+ private String _fullPropertyStringComplex = new string("FullPropertyString_Complex") + Convert.ToInt32("1");
[Export]
- public String FullProperty_String_Complex
+ public String FullPropertyString_Complex
{
get
{
- return _fullProperty_String_Complex;
+ return _fullPropertyStringComplex;
}
set
{
- _fullProperty_String_Complex = value;
+ _fullPropertyStringComplex = value;
}
}
// Lambda Property
- private String _lamdaProperty_String = "LamdaProperty_String";
+ private String _lamdaPropertyString = "LamdaPropertyString";
[Export]
- public String LamdaProperty_String
+ public String LamdaPropertyString
{
- get => _lamdaProperty_String;
- set => _lamdaProperty_String = value;
+ get => _lamdaPropertyString;
+ set => _lamdaPropertyString = value;
}
// Auto Property
- [Export] private Boolean property_Boolean { get; set; } = true;
- [Export] private Char property_Char { get; set; } = 'f';
- [Export] private SByte property_SByte { get; set; } = 10;
- [Export] private Int16 property_Int16 { get; set; } = 10;
- [Export] private Int32 property_Int32 { get; set; } = 10;
- [Export] private Int64 property_Int64 { get; set; } = 10;
- [Export] private Byte property_Byte { get; set; } = 10;
- [Export] private UInt16 property_UInt16 { get; set; } = 10;
- [Export] private UInt32 property_UInt32 { get; set; } = 10;
- [Export] private UInt64 property_UInt64 { get; set; } = 10;
- [Export] private Single property_Single { get; set; } = 10;
- [Export] private Double property_Double { get; set; } = 10;
- [Export] private String property_String { get; set; } = "foo";
+ [Export] private Boolean PropertyBoolean { get; set; } = true;
+ [Export] private Char PropertyChar { get; set; } = 'f';
+ [Export] private SByte PropertySByte { get; set; } = 10;
+ [Export] private Int16 PropertyInt16 { get; set; } = 10;
+ [Export] private Int32 PropertyInt32 { get; set; } = 10;
+ [Export] private Int64 PropertyInt64 { get; set; } = 10;
+ [Export] private Byte PropertyByte { get; set; } = 10;
+ [Export] private UInt16 PropertyUInt16 { get; set; } = 10;
+ [Export] private UInt32 PropertyUInt32 { get; set; } = 10;
+ [Export] private UInt64 PropertyUInt64 { get; set; } = 10;
+ [Export] private Single PropertySingle { get; set; } = 10;
+ [Export] private Double PropertyDouble { get; set; } = 10;
+ [Export] private String PropertyString { get; set; } = "foo";
// Godot structs
- [Export] private Vector2 property_Vector2 { get; set; } = new(10f, 10f);
- [Export] private Vector2I property_Vector2I { get; set; } = Vector2I.Up;
- [Export] private Rect2 property_Rect2 { get; set; } = new(new Vector2(10f, 10f), new Vector2(10f, 10f));
- [Export] private Rect2I property_Rect2I { get; set; } = new(new Vector2I(10, 10), new Vector2I(10, 10));
- [Export] private Transform2D property_Transform2D { get; set; } = Transform2D.Identity;
- [Export] private Vector3 property_Vector3 { get; set; } = new(10f, 10f, 10f);
- [Export] private Vector3I property_Vector3I { get; set; } = Vector3I.Back;
- [Export] private Basis property_Basis { get; set; } = new Basis(Quaternion.Identity);
- [Export] private Quaternion property_Quaternion { get; set; } = new Quaternion(Basis.Identity);
- [Export] private Transform3D property_Transform3D { get; set; } = Transform3D.Identity;
- [Export] private Vector4 property_Vector4 { get; set; } = new(10f, 10f, 10f, 10f);
- [Export] private Vector4I property_Vector4I { get; set; } = Vector4I.One;
- [Export] private Projection property_Projection { get; set; } = Projection.Identity;
- [Export] private Aabb property_Aabb { get; set; } = new Aabb(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
- [Export] private Color property_Color { get; set; } = Colors.Aquamarine;
- [Export] private Plane property_Plane { get; set; } = Plane.PlaneXZ;
- [Export] private Callable property_Callable { get; set; } = new Callable(Engine.GetMainLoop(), "_process");
- [Export] private Signal property_Signal { get; set; } = new Signal(Engine.GetMainLoop(), "property_list_changed");
+ [Export] private Vector2 PropertyVector2 { get; set; } = new(10f, 10f);
+ [Export] private Vector2I PropertyVector2I { get; set; } = Vector2I.Up;
+ [Export] private Rect2 PropertyRect2 { get; set; } = new(new Vector2(10f, 10f), new Vector2(10f, 10f));
+ [Export] private Rect2I PropertyRect2I { get; set; } = new(new Vector2I(10, 10), new Vector2I(10, 10));
+ [Export] private Transform2D PropertyTransform2D { get; set; } = Transform2D.Identity;
+ [Export] private Vector3 PropertyVector3 { get; set; } = new(10f, 10f, 10f);
+ [Export] private Vector3I PropertyVector3I { get; set; } = Vector3I.Back;
+ [Export] private Basis PropertyBasis { get; set; } = new Basis(Quaternion.Identity);
+ [Export] private Quaternion PropertyQuaternion { get; set; } = new Quaternion(Basis.Identity);
+ [Export] private Transform3D PropertyTransform3D { get; set; } = Transform3D.Identity;
+ [Export] private Vector4 PropertyVector4 { get; set; } = new(10f, 10f, 10f, 10f);
+ [Export] private Vector4I PropertyVector4I { get; set; } = Vector4I.One;
+ [Export] private Projection PropertyProjection { get; set; } = Projection.Identity;
+ [Export] private Aabb PropertyAabb { get; set; } = new Aabb(10f, 10f, 10f, new Vector3(1f, 1f, 1f));
+ [Export] private Color PropertyColor { get; set; } = Colors.Aquamarine;
+ [Export] private Plane PropertyPlane { get; set; } = Plane.PlaneXZ;
+ [Export] private Callable PropertyCallable { get; set; } = new Callable(Engine.GetMainLoop(), "_process");
+ [Export] private Signal PropertySignal { get; set; } = new Signal(Engine.GetMainLoop(), "Propertylist_changed");
// Enums
- enum MyEnum
+ public enum MyEnum
{
A,
B,
C
}
- [Export] private MyEnum property_Enum { get; set; } = MyEnum.C;
+ [Export] private MyEnum PropertyEnum { get; set; } = MyEnum.C;
[Flags]
- enum MyFlagsEnum
+ public enum MyFlagsEnum
{
A,
B,
C
}
- [Export] private MyFlagsEnum property_FlagsEnum { get; set; } = MyFlagsEnum.C;
+ [Export] private MyFlagsEnum PropertyFlagsEnum { get; set; } = MyFlagsEnum.C;
// Arrays
- [Export] private Byte[] property_ByteArray { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Int32[] property_Int32Array { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Int64[] property_Int64Array { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
- [Export] private Single[] property_SingleArray { get; set; } = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
- [Export] private Double[] property_DoubleArray { get; set; } = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
- [Export] private String[] property_StringArray { get; set; } = { "foo", "bar" };
- [Export(PropertyHint.Enum, "A,B,C")] private String[] property_StringArrayEnum { get; set; } = { "foo", "bar" };
- [Export] private Vector2[] property_Vector2Array { get; set; } = { Vector2.Up, Vector2.Down, Vector2.Left, Vector2.Right };
- [Export] private Vector3[] property_Vector3Array { get; set; } = { Vector3.Up, Vector3.Down, Vector3.Left, Vector3.Right };
- [Export] private Color[] property_ColorArray { get; set; } = { Colors.Aqua, Colors.Aquamarine, Colors.Azure, Colors.Beige };
- [Export] private GodotObject[] property_GodotObjectOrDerivedArray { get; set; } = { null };
+ [Export] private Byte[] PropertyByteArray { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Int32[] PropertyInt32Array { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Int64[] PropertyInt64Array { get; set; } = { 0, 1, 2, 3, 4, 5, 6 };
+ [Export] private Single[] PropertySingleArray { get; set; } = { 0f, 1f, 2f, 3f, 4f, 5f, 6f };
+ [Export] private Double[] PropertyDoubleArray { get; set; } = { 0d, 1d, 2d, 3d, 4d, 5d, 6d };
+ [Export] private String[] PropertyStringArray { get; set; } = { "foo", "bar" };
+ [Export(PropertyHint.Enum, "A,B,C")] private String[] PropertyStringArrayEnum { get; set; } = { "foo", "bar" };
+ [Export] private Vector2[] PropertyVector2Array { get; set; } = { Vector2.Up, Vector2.Down, Vector2.Left, Vector2.Right };
+ [Export] private Vector3[] PropertyVector3Array { get; set; } = { Vector3.Up, Vector3.Down, Vector3.Left, Vector3.Right };
+ [Export] private Color[] PropertyColorArray { get; set; } = { Colors.Aqua, Colors.Aquamarine, Colors.Azure, Colors.Beige };
+ [Export] private GodotObject[] PropertyGodotObjectOrDerivedArray { get; set; } = { null };
[Export] private StringName[] field_StringNameArray { get; set; } = { "foo", "bar" };
[Export] private NodePath[] field_NodePathArray { get; set; } = { "foo", "bar" };
[Export] private Rid[] field_RidArray { get; set; } = { default, default, default };
// Variant
- [Export] private Variant property_Variant { get; set; } = "foo";
+ [Export] private Variant PropertyVariant { get; set; } = "foo";
// Classes
- [Export] private GodotObject property_GodotObjectOrDerived { get; set; }
- [Export] private Godot.Texture property_GodotResourceTexture { get; set; }
- [Export] private StringName property_StringName { get; set; } = new StringName("foo");
- [Export] private NodePath property_NodePath { get; set; } = new NodePath("foo");
- [Export] private Rid property_Rid { get; set; }
+ [Export] private GodotObject PropertyGodotObjectOrDerived { get; set; }
+ [Export] private Godot.Texture PropertyGodotResourceTexture { get; set; }
+ [Export] private StringName PropertyStringName { get; set; } = new StringName("foo");
+ [Export] private NodePath PropertyNodePath { get; set; } = new NodePath("foo");
+ [Export] private Rid PropertyRid { get; set; }
[Export]
- private Godot.Collections.Dictionary property_GodotDictionary { get; set; } = new() { { "foo", 10 }, { Vector2.Up, Colors.Chocolate } };
+ private Godot.Collections.Dictionary PropertyGodotDictionary { get; set; } = new() { { "foo", 10 }, { Vector2.Up, Colors.Chocolate } };
[Export]
- private Godot.Collections.Array property_GodotArray { get; set; } = new() { "foo", 10, Vector2.Up, Colors.Chocolate };
+ private Godot.Collections.Array PropertyGodotArray { get; set; } = new() { "foo", 10, Vector2.Up, Colors.Chocolate };
[Export]
- private Godot.Collections.Dictionary<string, bool> property_GodotGenericDictionary { get; set; } = new() { { "foo", true }, { "bar", false } };
+ private Godot.Collections.Dictionary<string, bool> PropertyGodotGenericDictionary { get; set; } = new() { { "foo", true }, { "bar", false } };
[Export]
- private Godot.Collections.Array<int> property_GodotGenericArray { get; set; } = new() { 0, 1, 2, 3, 4, 5, 6 };
+ private Godot.Collections.Array<int> PropertyGodotGenericArray { get; set; } = new() { 0, 1, 2, 3, 4, 5, 6 };
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Foo.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Foo.cs
index 26853553c7..53801990d3 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Foo.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Foo.cs
@@ -1,10 +1,10 @@
using Godot;
-partial class Foo : GodotObject
+public partial class Foo : GodotObject
{
}
// Foo again in the same file
-partial class Foo
+public partial class Foo
{
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.GD0003.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.GD0003.cs
index 15c1e03801..83e9094a25 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.GD0003.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.GD0003.cs
@@ -1,18 +1,18 @@
using Godot;
-partial class Generic<T> : GodotObject
+public partial class Generic<T> : GodotObject
{
private int _field;
}
// Generic again but different generic parameters
-partial class {|GD0003:Generic|}<T, R> : GodotObject
+public partial class {|GD0003:Generic|}<T, R> : GodotObject
{
private int _field;
}
// Generic again but without generic parameters
-partial class {|GD0003:Generic|} : GodotObject
+public partial class {|GD0003:Generic|} : GodotObject
{
private int _field;
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs
index 5a83e21e96..ce8a7fe218 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs
@@ -1,6 +1,6 @@
using Godot;
-partial class Generic<T> : GodotObject
+public partial class Generic<T> : GodotObject
{
private int _field;
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/MixedReadOnlyWriteOnly.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/MixedReadOnlyWriteOnly.cs
index 61a48cefc9..190a3fb256 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/MixedReadOnlyWriteOnly.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/MixedReadOnlyWriteOnly.cs
@@ -2,11 +2,11 @@ using Godot;
public partial class MixedReadOnlyWriteOnly : GodotObject
{
- public readonly string readonly_field = "foo";
- public string readonly_auto_property { get; } = "foo";
- public string readonly_property { get => "foo"; }
- public string initonly_auto_property { get; init; }
+ public readonly string ReadOnlyField = "foo";
+ public string ReadOnlyAutoProperty { get; } = "foo";
+ public string ReadOnlyProperty { get => "foo"; }
+ public string InitOnlyAutoProperty { get; init; }
- bool writeonly_backing_field = false;
- public bool writeonly_property { set => writeonly_backing_field = value; }
+ bool _writeOnlyBackingField = false;
+ public bool WriteOnlyProperty { set => _writeOnlyBackingField = value; }
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/MoreExportedFields.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/MoreExportedFields.cs
index 47063a9cdf..0cf462f799 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/MoreExportedFields.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/MoreExportedFields.cs
@@ -4,5 +4,5 @@ using System;
public partial class ExportedFields : GodotObject
{
// Note we use Array and not System.Array. This tests the generated namespace qualification.
- [Export] private Int64[] field_empty_Int64Array = Array.Empty<Int64>();
+ [Export] private Int64[] _fieldEmptyInt64Array = Array.Empty<Int64>();
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ScriptBoilerplate.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ScriptBoilerplate.cs
index 5506465b92..b431522e7c 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ScriptBoilerplate.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ScriptBoilerplate.cs
@@ -24,7 +24,7 @@ public partial class ScriptBoilerplate : Node
}
}
-partial struct OuterClass
+public partial struct OuterClass
{
public partial class NestedClass : RefCounted
{
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
index 35db0d6f10..9784bd0b78 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
@@ -9,7 +9,7 @@ using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Godot.SourceGenerators
{
- static class ExtensionMethods
+ internal static class ExtensionMethods
{
public static bool TryGetGlobalAnalyzerProperty(
this GeneratorExecutionContext context, string property, out string? value
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/GlobalClassAnalyzer.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/GlobalClassAnalyzer.cs
index 77530ea049..22af25b9c4 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/GlobalClassAnalyzer.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/GlobalClassAnalyzer.cs
@@ -1,9 +1,7 @@
using System.Collections.Immutable;
using System.Linq;
-
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
-using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
namespace Godot.SourceGenerators
@@ -23,10 +21,8 @@ namespace Godot.SourceGenerators
context.RegisterSyntaxNodeAction(AnalyzeNode, SyntaxKind.ClassDeclaration);
}
- private void AnalyzeNode(SyntaxNodeAnalysisContext context)
+ private static void AnalyzeNode(SyntaxNodeAnalysisContext context)
{
- var typeClassDecl = (ClassDeclarationSyntax)context.Node;
-
// Return if not a type symbol or the type is not a global class.
if (context.ContainingSymbol is not INamedTypeSymbol typeSymbol ||
!typeSymbol.GetAttributes().Any(a => a.AttributeClass?.IsGodotGlobalClassAttribute() ?? false))
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs
index f837dcd810..f314f7dada 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs
@@ -171,7 +171,7 @@ namespace Godot.SourceGenerators
if (godotClassMethods.Length > 0)
{
- const string listType = "global::System.Collections.Generic.List<global::Godot.Bridge.MethodInfo>";
+ const string ListType = "global::System.Collections.Generic.List<global::Godot.Bridge.MethodInfo>";
source.Append(" /// <summary>\n")
.Append(" /// Get the method information for all the methods declared in this class.\n")
@@ -182,11 +182,11 @@ namespace Godot.SourceGenerators
source.Append(" [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]\n");
source.Append(" internal new static ")
- .Append(listType)
+ .Append(ListType)
.Append(" GetGodotMethodList()\n {\n");
source.Append(" var methods = new ")
- .Append(listType)
+ .Append(ListType)
.Append("(")
.Append(godotClassMethods.Length)
.Append(");\n");
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs
index ecd208e38e..a0e410e31a 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs
@@ -246,7 +246,7 @@ namespace Godot.SourceGenerators
}
// Generate GetGodotPropertyList
- const string dictionaryType = "global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo>";
+ const string DictionaryType = "global::System.Collections.Generic.List<global::Godot.Bridge.PropertyInfo>";
source.Append(" /// <summary>\n")
.Append(" /// Get the property information for all the properties declared in this class.\n")
@@ -257,11 +257,11 @@ namespace Godot.SourceGenerators
source.Append(" [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]\n");
source.Append(" internal new static ")
- .Append(dictionaryType)
+ .Append(DictionaryType)
.Append(" GetGodotPropertyList()\n {\n");
source.Append(" var properties = new ")
- .Append(dictionaryType)
+ .Append(DictionaryType)
.Append("();\n");
// To retain the definition order (and display categories correctly), we want to
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs
index 0ec0a0827c..d13a828875 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs
@@ -351,7 +351,7 @@ namespace Godot.SourceGenerators
{
source.Append("#pragma warning disable CS0109 // Disable warning about redundant 'new' keyword\n");
- const string dictionaryType =
+ const string DictionaryType =
"global::System.Collections.Generic.Dictionary<global::Godot.StringName, global::Godot.Variant>";
source.Append("#if TOOLS\n");
@@ -366,11 +366,11 @@ namespace Godot.SourceGenerators
source.Append(" [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]\n");
source.Append(" internal new static ");
- source.Append(dictionaryType);
+ source.Append(DictionaryType);
source.Append(" GetGodotPropertyDefaultValues()\n {\n");
source.Append(" var values = new ");
- source.Append(dictionaryType);
+ source.Append(DictionaryType);
source.Append("(");
source.Append(exportedMembers.Count);
source.Append(");\n");
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs
index ff8422ea09..107bd93faa 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs
@@ -225,7 +225,7 @@ namespace Godot.SourceGenerators
if (godotSignalDelegates.Count > 0)
{
- const string listType = "global::System.Collections.Generic.List<global::Godot.Bridge.MethodInfo>";
+ const string ListType = "global::System.Collections.Generic.List<global::Godot.Bridge.MethodInfo>";
source.Append(" /// <summary>\n")
.Append(" /// Get the signal information for all the signals declared in this class.\n")
@@ -236,11 +236,11 @@ namespace Godot.SourceGenerators
source.Append(" [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]\n");
source.Append(" internal new static ")
- .Append(listType)
+ .Append(ListType)
.Append(" GetGodotSignalList()\n {\n");
source.Append(" var signals = new ")
- .Append(listType)
+ .Append(ListType)
.Append("(")
.Append(godotSignalDelegates.Count)
.Append(");\n");
diff --git a/modules/mono/editor/GodotTools/GodotTools.OpenVisualStudio/Program.cs b/modules/mono/editor/GodotTools/GodotTools.OpenVisualStudio/Program.cs
index 3072ca2857..5bf07f626b 100644
--- a/modules/mono/editor/GodotTools/GodotTools.OpenVisualStudio/Program.cs
+++ b/modules/mono/editor/GodotTools/GodotTools.OpenVisualStudio/Program.cs
@@ -210,7 +210,7 @@ namespace GodotTools.OpenVisualStudio
return null;
}
- static string NormalizePath(string path)
+ private static string NormalizePath(string path)
{
return new Uri(Path.GetFullPath(path)).LocalPath
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar)
diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs
index 90c443ebb8..175bb78051 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs
@@ -1,3 +1,6 @@
+#pragma warning disable IDE1006 // Naming rule violation
+// ReSharper disable InconsistentNaming
+
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -8,7 +11,6 @@ using GodotTools.IdeMessaging.Requests;
namespace GodotTools.Internals
{
- [SuppressMessage("ReSharper", "InconsistentNaming")]
[GenerateUnmanagedCallbacks(typeof(InternalUnmanagedCallbacks))]
internal static partial class Internal
{
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index c2e907c00c..0a9162bd28 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -1538,7 +1538,7 @@ void BindingsGenerator::_generate_global_constants(StringBuilder &p_output) {
p_output.append("namespace " BINDINGS_NAMESPACE ";\n\n");
- p_output.append("public static partial class " BINDINGS_GLOBAL_SCOPE_CLASS "\n{");
+ p_output.append("public static partial class " BINDINGS_GLOBAL_SCOPE_CLASS "\n" OPEN_BLOCK);
for (const ConstantInterface &iconstant : global_constants) {
if (iconstant.const_doc && iconstant.const_doc->description.size()) {
@@ -1589,50 +1589,48 @@ void BindingsGenerator::_generate_global_constants(StringBuilder &p_output) {
_log("Declaring global enum '%s' inside struct '%s'\n", enum_proxy_name.utf8().get_data(), enum_class_name.utf8().get_data());
- p_output.append("\npublic partial struct ");
- p_output.append(enum_class_name);
- p_output.append("\n" OPEN_BLOCK);
+ p_output << "\npublic partial struct " << enum_class_name << "\n" OPEN_BLOCK;
}
+ const String maybe_indent = !enum_in_static_class ? "" : INDENT1;
+
if (ienum.is_flags) {
- p_output.append("\n[System.Flags]");
+ p_output << "\n"
+ << maybe_indent << "[System.Flags]";
}
- p_output.append("\npublic enum ");
- p_output.append(enum_proxy_name);
- p_output.append(" : long");
- p_output.append("\n" OPEN_BLOCK);
+ p_output << "\n"
+ << maybe_indent << "public enum " << enum_proxy_name << " : long"
+ << "\n"
+ << maybe_indent << OPEN_BLOCK;
- const ConstantInterface &last = ienum.constants.back()->get();
for (const ConstantInterface &iconstant : ienum.constants) {
if (iconstant.const_doc && iconstant.const_doc->description.size()) {
String xml_summary = bbcode_to_xml(fix_doc_description(iconstant.const_doc->description), nullptr);
Vector<String> summary_lines = xml_summary.length() ? xml_summary.split("\n") : Vector<String>();
if (summary_lines.size()) {
- p_output.append(INDENT1 "/// <summary>\n");
+ p_output << maybe_indent << INDENT1 "/// <summary>\n";
for (int i = 0; i < summary_lines.size(); i++) {
- p_output.append(INDENT1 "/// ");
- p_output.append(summary_lines[i]);
- p_output.append("\n");
+ p_output << maybe_indent << INDENT1 "/// " << summary_lines[i] << "\n";
}
- p_output.append(INDENT1 "/// </summary>\n");
+ p_output << maybe_indent << INDENT1 "/// </summary>\n";
}
}
- p_output.append(INDENT1);
- p_output.append(iconstant.proxy_name);
- p_output.append(" = ");
- p_output.append(itos(iconstant.value));
- p_output.append(&iconstant != &last ? ",\n" : "\n");
+ p_output << maybe_indent << INDENT1
+ << iconstant.proxy_name
+ << " = "
+ << itos(iconstant.value)
+ << ",\n";
}
- p_output.append(CLOSE_BLOCK);
+ p_output << maybe_indent << CLOSE_BLOCK;
if (enum_in_static_class) {
- p_output.append(CLOSE_BLOCK);
+ p_output << CLOSE_BLOCK;
}
}
}
@@ -2162,7 +2160,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
output << MEMBER_BEGIN "public " << itype.proxy_name << "() : this("
<< (itype.memory_own ? "true" : "false") << ")\n" OPEN_BLOCK_L1
<< INDENT2 "unsafe\n" INDENT2 OPEN_BLOCK
- << INDENT3 "_ConstructAndInitialize(" CS_STATIC_FIELD_NATIVE_CTOR ", "
+ << INDENT3 "ConstructAndInitialize(" CS_STATIC_FIELD_NATIVE_CTOR ", "
<< BINDINGS_NATIVE_NAME_FIELD ", CachedType, refCounted: "
<< (itype.is_ref_counted ? "true" : "false") << ");\n"
<< CLOSE_BLOCK_L2 CLOSE_BLOCK_L1;
@@ -2171,7 +2169,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
output << MEMBER_BEGIN "internal " << itype.proxy_name << "() : this("
<< (itype.memory_own ? "true" : "false") << ")\n" OPEN_BLOCK_L1
<< INDENT2 "unsafe\n" INDENT2 OPEN_BLOCK
- << INDENT3 "_ConstructAndInitialize(null, "
+ << INDENT3 "ConstructAndInitialize(null, "
<< BINDINGS_NATIVE_NAME_FIELD ", CachedType, refCounted: "
<< (itype.is_ref_counted ? "true" : "false") << ");\n"
<< CLOSE_BLOCK_L2 CLOSE_BLOCK_L1;
@@ -2180,7 +2178,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
// Add.. em.. trick constructor. Sort of.
output.append(MEMBER_BEGIN "internal ");
output.append(itype.proxy_name);
- output.append("(bool " CS_PARAM_MEMORYOWN ") : base(" CS_PARAM_MEMORYOWN ") {}\n");
+ output.append("(bool " CS_PARAM_MEMORYOWN ") : base(" CS_PARAM_MEMORYOWN ") { }\n");
}
}
@@ -2241,6 +2239,9 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
<< INDENT1 "/// <param name=\"args\">Arguments to use with the invoked method.</param>\n"
<< INDENT1 "/// <param name=\"ret\">Value returned by the invoked method.</param>\n";
+ // Avoid raising diagnostics because of calls to obsolete methods.
+ output << "#pragma warning disable CS0618 // Member is obsolete\n";
+
output << INDENT1 "protected internal " << (is_derived_type ? "override" : "virtual")
<< " bool " CS_METHOD_INVOKE_GODOT_CLASS_METHOD "(in godot_string_name method, "
<< "NativeVariantPtrArgs args, out godot_variant ret)\n"
@@ -2319,6 +2320,8 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
output << INDENT1 "}\n";
+ output << "#pragma warning restore CS0618\n";
+
// Generate HasGodotClassMethod
output << MEMBER_BEGIN "/// <summary>\n"
@@ -2969,7 +2972,7 @@ Error BindingsGenerator::_generate_cs_signal(const BindingsGenerator::TypeInterf
ERR_FAIL_NULL_V(arg_type, ERR_BUG); // Argument type not found
if (idx != 0) {
- p_output << ",";
+ p_output << ", ";
}
p_output << sformat(arg_type->cs_variant_to_managed,
diff --git a/modules/mono/glue/GodotSharp/.editorconfig b/modules/mono/glue/GodotSharp/.editorconfig
index 987e6c543b..0d9a88ecb8 100644
--- a/modules/mono/glue/GodotSharp/.editorconfig
+++ b/modules/mono/glue/GodotSharp/.editorconfig
@@ -1,18 +1,37 @@
+# This file should only contain severity override to diagnostics, in order to make generated and
+# interop code compilation readable. We want to limit the scope of suppression as much as possible.
+
[**/Generated/**.cs]
+# IDE1006: Naming rule violation
+dotnet_diagnostic.IDE1006.severity = none
# CA1062: Validate parameter is non-null before using it
# Useful for generated code, as it disables nullable
dotnet_diagnostic.CA1062.severity = error
# CA1069: Enums should not have duplicate values
dotnet_diagnostic.CA1069.severity = none
+# CA1707: Identifiers should not contain underscores
+dotnet_diagnostic.CA1707.severity = none
# CA1708: Identifiers should differ by more than case
dotnet_diagnostic.CA1708.severity = none
+# CA1711: Identifiers should not have incorrect suffix
+# Disable warning for suffixes like EventHandler, Flags, Enum, etc.
+dotnet_diagnostic.CA1711.severity = none
# CA1716: Identifiers should not match keywords
# This is suppressed, because it will report `@event` as well as `event`
dotnet_diagnostic.CA1716.severity = none
+# CA1720: Identifiers should not contain type names
+dotnet_diagnostic.CA1720.severity = none
# CS1591: Missing XML comment for publicly visible type or member
dotnet_diagnostic.CS1591.severity = none
# CS1573: Parameter has no matching param tag in the XML comment
dotnet_diagnostic.CS1573.severity = none
+# TODO: Temporary change to not pollute the warnings, but this denotes with ou doc generation
+# CS1734: XML comment on '' has a paramref tag for '', but there is no parameter by that name
+dotnet_diagnostic.CS1734.severity = none
+
+[GodotSharp/Core/NativeInterop/**.cs]
+# CA1720: Identifiers should not contain type names
+dotnet_diagnostic.CA1720.severity = none
[GodotSharp/Core/**.cs]
# CS1591: Missing XML comment for publicly visible type or member
diff --git a/modules/mono/glue/GodotSharp/Godot.SourceGenerators.Internal/UnmanagedCallbacksGenerator.cs b/modules/mono/glue/GodotSharp/Godot.SourceGenerators.Internal/UnmanagedCallbacksGenerator.cs
index 750e11777d..f3f6759e1d 100644
--- a/modules/mono/glue/GodotSharp/Godot.SourceGenerators.Internal/UnmanagedCallbacksGenerator.cs
+++ b/modules/mono/glue/GodotSharp/Godot.SourceGenerators.Internal/UnmanagedCallbacksGenerator.cs
@@ -387,7 +387,7 @@ using Godot.NativeInterop;
}
private static bool IsGodotInteropStruct(ITypeSymbol type) =>
- GodotInteropStructs.Contains(type.FullQualifiedNameOmitGlobal());
+ _godotInteropStructs.Contains(type.FullQualifiedNameOmitGlobal());
private static bool IsByRefParameter(IParameterSymbol parameter) =>
parameter.RefKind is RefKind.In or RefKind.Out or RefKind.Ref;
@@ -448,7 +448,7 @@ using Godot.NativeInterop;
source.Append(";\n");
}
- private static readonly string[] GodotInteropStructs =
+ private static readonly string[] _godotInteropStructs =
{
"Godot.NativeInterop.godot_ref",
"Godot.NativeInterop.godot_variant_call_error",
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Compat.cs b/modules/mono/glue/GodotSharp/GodotSharp/Compat.cs
index daaf4730fd..4e80afc4a5 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Compat.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Compat.cs
@@ -8,6 +8,8 @@ using System.ComponentModel;
namespace Godot;
#pragma warning disable CS1734 // XML comment on 'X' has a paramref tag for 'Y', but there is no parameter by that name.
+// TODO: This is currently disabled because of https://github.com/dotnet/roslyn/issues/52904
+#pragma warning disable IDE0040 // Add accessibility modifiers.
partial class AnimationNode
{
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs
index fa74d5e101..9b5aec7031 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Array.cs
@@ -151,7 +151,6 @@ namespace Godot.Collections
// from derived types (e.g.: Node[]). Implicit conversion from Derived[] to Base[] are
// fine as long as the array is not mutated. However, Span does this type checking at
// instantiation, so it's not possible to use it even when not mutating anything.
- // ReSharper disable once RedundantNameQualifier
/// <summary>
/// Constructs a new <see cref="Array"/> from the given ReadOnlySpan's elements.
/// </summary>
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RpcAttribute.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RpcAttribute.cs
index 6a73d6f70c..c53e964156 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RpcAttribute.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/RpcAttribute.cs
@@ -19,7 +19,7 @@ namespace Godot
/// <summary>
/// If the method will also be called locally; otherwise, it is only called remotely.
/// </summary>
- public bool CallLocal { get; init; } = false;
+ public bool CallLocal { get; init; }
/// <summary>
/// Transfer mode for the annotated method.
@@ -29,7 +29,7 @@ namespace Godot
/// <summary>
/// Transfer channel for the annotated mode.
/// </summary>
- public int TransferChannel { get; init; } = 0;
+ public int TransferChannel { get; init; }
/// <summary>
/// Constructs a <see cref="RpcAttribute"/> instance.
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/AlcReloadCfg.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/AlcReloadCfg.cs
index ac2e2fae3c..af1f4860cd 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/AlcReloadCfg.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/AlcReloadCfg.cs
@@ -2,7 +2,7 @@ namespace Godot.Bridge;
public static class AlcReloadCfg
{
- private static bool _configured = false;
+ private static bool _configured;
public static void Configure(bool alcReloadEnabled)
{
@@ -14,5 +14,5 @@ public static class AlcReloadCfg
IsAlcReloadingEnabled = alcReloadEnabled;
}
- internal static bool IsAlcReloadingEnabled = false;
+ internal static bool IsAlcReloadingEnabled;
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs
index 0f271d6547..1b23276bbd 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs
@@ -30,7 +30,8 @@ namespace Godot.Bridge
foreach (var type in typesInAlc.Keys)
{
if (_scriptTypeBiMap.RemoveByScriptType(type, out IntPtr scriptPtr) &&
- (!_pathTypeBiMap.TryGetScriptPath(type, out string? scriptPath) || scriptPath.StartsWith("csharp://")))
+ (!_pathTypeBiMap.TryGetScriptPath(type, out string? scriptPath) ||
+ scriptPath.StartsWith("csharp://", StringComparison.Ordinal)))
{
// For scripts without a path, we need to keep the class qualified name for reloading
_scriptDataForReload.TryAdd(scriptPtr,
@@ -584,7 +585,7 @@ namespace Godot.Bridge
// (every Resource must have a unique path). So we create a unique "virtual" path
// for each type.
- if (!scriptPath.StartsWith("res://"))
+ if (!scriptPath.StartsWith("res://", StringComparison.Ordinal))
{
throw new ArgumentException("Script path must start with 'res://'.", nameof(scriptPath));
}
@@ -597,7 +598,7 @@ namespace Godot.Bridge
{
// This path is slower, but it's only executed for the first instantiation of the type
- if (scriptType.IsConstructedGenericType && !scriptPath.StartsWith("csharp://"))
+ if (scriptType.IsConstructedGenericType && !scriptPath.StartsWith("csharp://", StringComparison.Ordinal))
{
// If the script type is generic it can't be loaded using the real script path.
// Construct a virtual path unique to this constructed generic type and add it
@@ -700,7 +701,6 @@ namespace Godot.Bridge
return godot_bool.False;
}
- // ReSharper disable once RedundantNameQualifier
if (!typeof(GodotObject).IsAssignableFrom(scriptType))
{
// The class no longer inherits GodotObject, can't reload
@@ -1007,8 +1007,9 @@ namespace Godot.Bridge
return (List<MethodInfo>?)getGodotMethodListMethod.Invoke(null, null);
}
+#pragma warning disable IDE1006 // Naming rule violation
// ReSharper disable once InconsistentNaming
- [SuppressMessage("ReSharper", "NotAccessedField.Local")]
+ // ReSharper disable once NotAccessedField.Local
[StructLayout(LayoutKind.Sequential)]
private ref struct godotsharp_property_info
{
@@ -1025,6 +1026,7 @@ namespace Godot.Bridge
HintString.Dispose();
}
}
+#pragma warning restore IDE1006
[UnmanagedCallersOnly]
internal static unsafe void GetPropertyInfoList(IntPtr scriptPtr,
@@ -1063,9 +1065,9 @@ namespace Godot.Bridge
int length = properties.Count;
// There's no recursion here, so it's ok to go with a big enough number for most cases
- // stackMaxSize = stackMaxLength * sizeof(godotsharp_property_info)
- const int stackMaxLength = 32;
- bool useStack = length < stackMaxLength;
+ // StackMaxSize = StackMaxLength * sizeof(godotsharp_property_info)
+ const int StackMaxLength = 32;
+ bool useStack = length < StackMaxLength;
godotsharp_property_info* interopProperties;
@@ -1073,7 +1075,7 @@ namespace Godot.Bridge
{
// Weird limitation, hence the need for aux:
// "In the case of pointer types, you can use a stackalloc expression only in a local variable declaration to initialize the variable."
- var aux = stackalloc godotsharp_property_info[stackMaxLength];
+ var aux = stackalloc godotsharp_property_info[StackMaxLength];
interopProperties = aux;
}
else
@@ -1124,8 +1126,9 @@ namespace Godot.Bridge
}
}
+#pragma warning disable IDE1006 // Naming rule violation
// ReSharper disable once InconsistentNaming
- [SuppressMessage("ReSharper", "NotAccessedField.Local")]
+ // ReSharper disable once NotAccessedField.Local
[StructLayout(LayoutKind.Sequential)]
private ref struct godotsharp_property_def_val_pair
{
@@ -1133,6 +1136,7 @@ namespace Godot.Bridge
public godot_string_name Name; // Not owned
public godot_variant Value; // Not owned
}
+#pragma warning restore IDE1006
private delegate bool InvokeGodotClassStaticMethodDelegate(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret);
@@ -1252,9 +1256,9 @@ namespace Godot.Bridge
int length = defaultValues.Count;
// There's no recursion here, so it's ok to go with a big enough number for most cases
- // stackMaxSize = stackMaxLength * sizeof(godotsharp_property_def_val_pair)
- const int stackMaxLength = 32;
- bool useStack = length < stackMaxLength;
+ // StackMaxSize = StackMaxLength * sizeof(godotsharp_property_def_val_pair)
+ const int StackMaxLength = 32;
+ bool useStack = length < StackMaxLength;
godotsharp_property_def_val_pair* interopDefaultValues;
@@ -1262,7 +1266,7 @@ namespace Godot.Bridge
{
// Weird limitation, hence the need for aux:
// "In the case of pointer types, you can use a stackalloc expression only in a local variable declaration to initialize the variable."
- var aux = stackalloc godotsharp_property_def_val_pair[stackMaxLength];
+ var aux = stackalloc godotsharp_property_def_val_pair[StackMaxLength];
interopDefaultValues = aux;
}
else
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
index c29a0f2bd8..72a3fe3ed0 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
@@ -38,7 +38,9 @@ namespace Godot
public float B;
/// <summary>
- /// The color's alpha (transparency) component, typically on the range of 0 to 1.
+ /// The color's alpha component, typically on the range of 0 to 1.
+ /// A value of 0 means that the color is fully transparent.
+ /// A value of 1 means that the color is fully opaque.
/// </summary>
public float A;
@@ -534,7 +536,11 @@ namespace Godot
/// <param name="r">The color's red component, typically on the range of 0 to 1.</param>
/// <param name="g">The color's green component, typically on the range of 0 to 1.</param>
/// <param name="b">The color's blue component, typically on the range of 0 to 1.</param>
- /// <param name="a">The color's alpha (transparency) value, typically on the range of 0 to 1. Default: 1.</param>
+ /// <param name="a">
+ /// The color's alpha value, typically on the range of 0 to 1.
+ /// A value of 0 means that the color is fully transparent.
+ /// A value of 1 means that the color is fully opaque.
+ /// </param>
public Color(float r, float g, float b, float a = 1.0f)
{
R = r;
@@ -547,7 +553,11 @@ namespace Godot
/// Constructs a <see cref="Color"/> from an existing color and an alpha value.
/// </summary>
/// <param name="c">The color to construct from. Only its RGB values are used.</param>
- /// <param name="a">The color's alpha (transparency) value, typically on the range of 0 to 1. Default: 1.</param>
+ /// <param name="a">
+ /// The color's alpha value, typically on the range of 0 to 1.
+ /// A value of 0 means that the color is fully transparent.
+ /// A value of 1 means that the color is fully opaque.
+ /// </param>
public Color(Color c, float a = 1.0f)
{
R = c.R;
@@ -784,7 +794,7 @@ namespace Godot
name = name.Replace(".", string.Empty, StringComparison.Ordinal);
name = name.ToUpperInvariant();
- return Colors.namedColors.TryGetValue(name, out color);
+ return Colors.NamedColors.TryGetValue(name, out color);
}
/// <summary>
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Colors.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Colors.cs
index 44b1c2554c..5cb16fc385 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Colors.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Colors.cs
@@ -9,7 +9,7 @@ namespace Godot
public static class Colors
{
// Color names and values are derived from core/math/color_names.inc
- internal static readonly Dictionary<string, Color> namedColors = new Dictionary<string, Color> {
+ internal static readonly Dictionary<string, Color> NamedColors = new Dictionary<string, Color> {
{ "ALICEBLUE", Colors.AliceBlue },
{ "ANTIQUEWHITE", Colors.AntiqueWhite },
{ "AQUA", Colors.Aqua },
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/CustomGCHandle.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/CustomGCHandle.cs
index 42f19ace1a..28a4e1bc76 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/CustomGCHandle.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/CustomGCHandle.cs
@@ -26,7 +26,6 @@ public static class CustomGCHandle
[MethodImpl(MethodImplOptions.NoInlining)]
public static bool IsAlcBeingUnloaded(AssemblyLoadContext alc) => _alcsBeingUnloaded.TryGetValue(alc, out _);
- // ReSharper disable once RedundantNameQualifier
private static ConcurrentDictionary<
AssemblyLoadContext,
ConcurrentDictionary<GCHandle, object>
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/DebuggingUtils.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/DebuggingUtils.cs
index 57b292793a..0d96a9a5c1 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/DebuggingUtils.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/DebuggingUtils.cs
@@ -62,8 +62,9 @@ namespace Godot
Trace.Listeners.Add(new GodotTraceListener());
}
- [StructLayout(LayoutKind.Sequential)]
+#pragma warning disable IDE1006 // Naming rule violation
// ReSharper disable once InconsistentNaming
+ [StructLayout(LayoutKind.Sequential)]
internal ref struct godot_stack_info
{
public godot_string File;
@@ -71,8 +72,8 @@ namespace Godot
public int Line;
}
- [StructLayout(LayoutKind.Sequential)]
// ReSharper disable once InconsistentNaming
+ [StructLayout(LayoutKind.Sequential)]
internal ref struct godot_stack_info_vector
{
private IntPtr _writeProxy;
@@ -101,6 +102,7 @@ namespace Godot
_ptr = null;
}
}
+#pragma warning restore IDE1006
internal static unsafe StackFrame? GetCurrentStackFrame(int skipFrames = 0)
{
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs
index fc6e7a3ebe..c680142638 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs
@@ -141,7 +141,6 @@ namespace Godot
return true;
}
}
- // ReSharper disable once RedundantNameQualifier
case GodotObject godotObject:
{
using (var stream = new MemoryStream())
@@ -414,7 +413,6 @@ namespace Godot
case TargetKind.GodotObject:
{
ulong objectId = reader.ReadUInt64();
- // ReSharper disable once RedundantNameQualifier
GodotObject? godotObject = GodotObject.InstanceFromId(objectId);
if (godotObject == null)
return false;
@@ -495,7 +493,7 @@ namespace Godot
string methodName = reader.ReadString();
- int flags = reader.ReadInt32();
+ BindingFlags flags = (BindingFlags)reader.ReadInt32();
bool hasReturn = reader.ReadBoolean();
Type? returnType = hasReturn ? DeserializeType(reader) : typeof(void);
@@ -511,7 +509,11 @@ namespace Godot
parameterTypes[i] = parameterType;
}
- methodInfo = declaringType.GetMethod(methodName, (BindingFlags)flags, null, parameterTypes, null);
+#pragma warning disable REFL045 // These flags are insufficient to match any members
+ // TODO: Suppressing invalid warning, remove when issue is fixed
+ // https://github.com/DotNetAnalyzers/ReflectionAnalyzers/issues/209
+ methodInfo = declaringType.GetMethod(methodName, flags, null, parameterTypes, null);
+#pragma warning restore REFL045
return methodInfo != null && methodInfo.ReturnType == returnType;
}
@@ -588,7 +590,6 @@ namespace Godot
internal static class RuntimeTypeConversionHelper
{
- [SuppressMessage("ReSharper", "RedundantNameQualifier")]
public static godot_variant ConvertToVariant(object? obj)
{
if (obj == null)
@@ -713,10 +714,8 @@ namespace Godot
private delegate object? ConvertToSystemObjectFunc(in godot_variant managed);
- [SuppressMessage("ReSharper", "RedundantNameQualifier")]
- // ReSharper disable once RedundantNameQualifier
private static readonly System.Collections.Generic.Dictionary<Type, ConvertToSystemObjectFunc>
- ToSystemObjectFuncByType = new()
+ _toSystemObjectFuncByType = new()
{
[typeof(bool)] = (in godot_variant variant) => VariantUtils.ConvertTo<bool>(variant),
[typeof(char)] = (in godot_variant variant) => VariantUtils.ConvertTo<char>(variant),
@@ -771,10 +770,9 @@ namespace Godot
[typeof(Variant)] = (in godot_variant variant) => VariantUtils.ConvertTo<Variant>(variant),
};
- [SuppressMessage("ReSharper", "RedundantNameQualifier")]
public static object? ConvertToObjectOfType(in godot_variant variant, Type type)
{
- if (ToSystemObjectFuncByType.TryGetValue(type, out var func))
+ if (_toSystemObjectFuncByType.TryGetValue(type, out var func))
return func(variant);
if (typeof(GodotObject).IsAssignableFrom(type))
@@ -838,8 +836,7 @@ namespace Godot
if (genericTypeDef == typeof(Godot.Collections.Dictionary<,>))
{
- var ctor = type.GetConstructor(BindingFlags.Default,
- new[] { typeof(Godot.Collections.Dictionary) });
+ var ctor = type.GetConstructor(new[] { typeof(Godot.Collections.Dictionary) });
if (ctor == null)
throw new InvalidOperationException("Dictionary constructor not found");
@@ -852,8 +849,7 @@ namespace Godot
if (genericTypeDef == typeof(Godot.Collections.Array<>))
{
- var ctor = type.GetConstructor(BindingFlags.Default,
- new[] { typeof(Godot.Collections.Array) });
+ var ctor = type.GetConstructor(new[] { typeof(Godot.Collections.Array) });
if (ctor == null)
throw new InvalidOperationException("Array constructor not found");
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/DisposablesTracker.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/DisposablesTracker.cs
index 53292e10cf..0ae3e1e130 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/DisposablesTracker.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/DisposablesTracker.cs
@@ -59,7 +59,6 @@ namespace Godot
GD.Print("Unloading: Finished disposing tracked instances.");
}
- // ReSharper disable once RedundantNameQualifier
private static ConcurrentDictionary<WeakReference<GodotObject>, byte> GodotObjectInstances { get; } =
new();
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotObject.base.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotObject.base.cs
index 84b2a04276..0be9cdc953 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotObject.base.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/GodotObject.base.cs
@@ -10,8 +10,8 @@ namespace Godot
{
public partial class GodotObject : IDisposable
{
- private bool _disposed = false;
- private static readonly Type CachedType = typeof(GodotObject);
+ private bool _disposed;
+ private static readonly Type _cachedType = typeof(GodotObject);
internal IntPtr NativePtr;
private bool _memoryOwn;
@@ -25,11 +25,11 @@ namespace Godot
{
unsafe
{
- _ConstructAndInitialize(NativeCtor, NativeName, CachedType, refCounted: false);
+ ConstructAndInitialize(NativeCtor, NativeName, _cachedType, refCounted: false);
}
}
- internal unsafe void _ConstructAndInitialize(
+ internal unsafe void ConstructAndInitialize(
delegate* unmanaged<IntPtr> nativeCtor,
StringName nativeName,
Type cachedType,
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs
index 09269508b7..16d4616fcd 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs
@@ -36,11 +36,11 @@ namespace Godot
public const real_t NaN = real_t.NaN;
// 0.0174532924f and 0.0174532925199433
- private const float _degToRadConstF = (float)0.0174532925199432957692369077M;
- private const double _degToRadConstD = (double)0.0174532925199432957692369077M;
+ private const float DegToRadConstF = (float)0.0174532925199432957692369077M;
+ private const double DegToRadConstD = (double)0.0174532925199432957692369077M;
// 57.29578f and 57.2957795130823
- private const float _radToDegConstF = (float)57.295779513082320876798154814M;
- private const double _radToDegConstD = (double)57.295779513082320876798154814M;
+ private const float RadToDegConstF = (float)57.295779513082320876798154814M;
+ private const double RadToDegConstD = (double)57.295779513082320876798154814M;
/// <summary>
/// Returns the absolute value of <paramref name="s"/> (i.e. positive value).
@@ -760,7 +760,7 @@ namespace Godot
/// <returns>The same angle expressed in radians.</returns>
public static float DegToRad(float deg)
{
- return deg * _degToRadConstF;
+ return deg * DegToRadConstF;
}
/// <summary>
@@ -770,7 +770,7 @@ namespace Godot
/// <returns>The same angle expressed in radians.</returns>
public static double DegToRad(double deg)
{
- return deg * _degToRadConstD;
+ return deg * DegToRadConstD;
}
/// <summary>
@@ -957,10 +957,10 @@ namespace Godot
return true;
}
// Then check for approximate equality.
- float tolerance = _epsilonF * Math.Abs(a);
- if (tolerance < _epsilonF)
+ float tolerance = EpsilonF * Math.Abs(a);
+ if (tolerance < EpsilonF)
{
- tolerance = _epsilonF;
+ tolerance = EpsilonF;
}
return Math.Abs(a - b) < tolerance;
}
@@ -981,10 +981,10 @@ namespace Godot
return true;
}
// Then check for approximate equality.
- double tolerance = _epsilonD * Math.Abs(a);
- if (tolerance < _epsilonD)
+ double tolerance = EpsilonD * Math.Abs(a);
+ if (tolerance < EpsilonD)
{
- tolerance = _epsilonD;
+ tolerance = EpsilonD;
}
return Math.Abs(a - b) < tolerance;
}
@@ -1069,7 +1069,7 @@ namespace Godot
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsZeroApprox(float s)
{
- return Math.Abs(s) < _epsilonF;
+ return Math.Abs(s) < EpsilonF;
}
/// <summary>
@@ -1084,7 +1084,7 @@ namespace Godot
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsZeroApprox(double s)
{
- return Math.Abs(s) < _epsilonD;
+ return Math.Abs(s) < EpsilonD;
}
/// <summary>
@@ -1412,7 +1412,7 @@ namespace Godot
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float RadToDeg(float rad)
{
- return rad * _radToDegConstF;
+ return rad * RadToDegConstF;
}
/// <summary>
@@ -1423,7 +1423,7 @@ namespace Godot
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static double RadToDeg(double rad)
{
- return rad * _radToDegConstD;
+ return rad * RadToDegConstD;
}
/// <summary>
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs
index cc2d61f58d..9020602cb4 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs
@@ -21,8 +21,8 @@ namespace Godot
public const real_t Sqrt2 = (real_t)1.4142135623730950488016887242M; // 1.4142136f and 1.414213562373095
// Epsilon size should depend on the precision used.
- private const float _epsilonF = 1e-06f;
- private const double _epsilonD = 1e-14;
+ private const float EpsilonF = 1e-06f;
+ private const double EpsilonD = 1e-14;
/// <summary>
/// A very small number used for float comparison with error tolerance.
@@ -31,7 +31,7 @@ namespace Godot
#if REAL_T_IS_DOUBLE
public const real_t Epsilon = _epsilonD;
#else
- public const real_t Epsilon = _epsilonF;
+ public const real_t Epsilon = EpsilonF;
#endif
/// <summary>
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs
index a8642a916c..a019dd3513 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs
@@ -1,3 +1,7 @@
+#pragma warning disable CA1707 // Identifiers should not contain underscores
+#pragma warning disable IDE1006 // Naming rule violation
+// ReSharper disable InconsistentNaming
+
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -24,7 +28,6 @@ namespace Godot.NativeInterop
}
// Apparently a struct with a byte is not blittable? It crashes when calling a UnmanagedCallersOnly function ptr.
- // ReSharper disable once InconsistentNaming
public enum godot_bool : byte
{
True = 1,
@@ -32,7 +35,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_ref
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -62,7 +64,6 @@ namespace Godot.NativeInterop
}
}
- [SuppressMessage("ReSharper", "InconsistentNaming")]
public enum godot_variant_call_error_error
{
GODOT_CALL_ERROR_CALL_OK = 0,
@@ -75,7 +76,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_variant_call_error
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -106,7 +106,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_csharp_type_info
{
private godot_string _className;
@@ -161,7 +160,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential, Pack = 8)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_variant
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -176,7 +174,6 @@ namespace Godot.NativeInterop
private godot_variant_data _data;
[StructLayout(LayoutKind.Explicit)]
- // ReSharper disable once InconsistentNaming
private unsafe ref struct godot_variant_data
{
[FieldOffset(0)] public godot_bool _bool;
@@ -212,7 +209,6 @@ namespace Godot.NativeInterop
[FieldOffset(0)] public godot_array _m_array;
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public struct godot_variant_obj_data
{
public ulong id;
@@ -220,7 +216,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public struct godot_variant_data_mem
{
#pragma warning disable 169
@@ -480,7 +475,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Explicit)]
- // ReSharper disable once InconsistentNaming
internal struct movable
{
// Variant.Type is generated as an enum of type long, so we can't use for the field as it must only take 32-bits.
@@ -502,7 +496,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_string
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -534,7 +527,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_string_name
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -590,7 +582,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
internal struct movable
{
private IntPtr _data;
@@ -607,7 +598,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_node_path
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -638,7 +628,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
internal struct movable
{
private IntPtr _data;
@@ -655,7 +644,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Explicit)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_signal
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -698,7 +686,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Explicit)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_callable
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -736,7 +723,6 @@ namespace Godot.NativeInterop
// Don't pass a C# default constructed `godot_array` to native code, unless it's going to
// be re-assigned a new value (the copy constructor checks if `_p` is null so that's fine).
[StructLayout(LayoutKind.Explicit)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_array
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -817,7 +803,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
internal struct movable
{
private unsafe ArrayPrivate* _p;
@@ -838,7 +823,6 @@ namespace Godot.NativeInterop
// Don't pass a C# default constructed `godot_dictionary` to native code, unless it's going to
// be re-assigned a new value (the copy constructor checks if `_p` is null so that's fine).
[StructLayout(LayoutKind.Explicit)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_dictionary
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -886,7 +870,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
internal struct movable
{
private unsafe DictionaryPrivate* _p;
@@ -903,7 +886,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_packed_byte_array
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -935,7 +917,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_packed_int32_array
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -967,7 +948,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_packed_int64_array
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -999,7 +979,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_packed_float32_array
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -1031,7 +1010,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_packed_float64_array
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -1063,7 +1041,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_packed_string_array
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -1095,7 +1072,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_packed_vector2_array
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -1127,7 +1103,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_packed_vector3_array
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -1159,7 +1134,6 @@ namespace Godot.NativeInterop
}
[StructLayout(LayoutKind.Sequential)]
- // ReSharper disable once InconsistentNaming
public ref struct godot_packed_color_array
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -1190,7 +1164,6 @@ namespace Godot.NativeInterop
}
}
- [SuppressMessage("ReSharper", "InconsistentNaming")]
public enum godot_error_handler_type
{
ERR_HANDLER_ERROR = 0,
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs
index 0cc89d78af..9f7fa53e24 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CA1707 // Identifiers should not contain underscores
+
using System;
using System.Runtime.InteropServices;
using Godot.Collections;
@@ -213,13 +215,13 @@ namespace Godot.NativeInterop
if (p_string.Buffer == IntPtr.Zero)
return string.Empty;
- const int sizeOfChar32 = 4;
+ const int SizeOfChar32 = 4;
byte* bytes = (byte*)p_string.Buffer;
int size = p_string.Size;
if (size == 0)
return string.Empty;
size -= 1; // zero at the end
- int sizeInBytes = size * sizeOfChar32;
+ int sizeInBytes = size * SizeOfChar32;
return System.Text.Encoding.UTF32.GetString(bytes, sizeInBytes);
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs
index d181bf2c0f..fef21fae46 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs
@@ -1,9 +1,11 @@
+#pragma warning disable CA1707 // Identifiers should not contain underscores
+#pragma warning disable IDE1006 // Naming rule violation
+// ReSharper disable InconsistentNaming
+
using System;
-using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using Godot.SourceGenerators.Internal;
-// ReSharper disable InconsistentNaming
namespace Godot.NativeInterop
{
@@ -16,7 +18,7 @@ namespace Godot.NativeInterop
[GenerateUnmanagedCallbacks(typeof(UnmanagedCallbacks))]
public static unsafe partial class NativeFuncs
{
- private static bool initialized = false;
+ private static bool initialized;
// ReSharper disable once ParameterOnlyUsedForPreconditionCheck.Global
public static void Initialize(IntPtr unmanagedCallbacks, int unmanagedCallbacksSize)
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.extended.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.extended.cs
index 44ec16dca9..9f237e4d00 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.extended.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.extended.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CA1707 // Identifiers should not contain underscores
+#pragma warning disable IDE1006 // Naming rule violation
// ReSharper disable InconsistentNaming
namespace Godot.NativeInterop
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.cs
index e6bcd9393d..464b517428 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.cs
@@ -1,8 +1,11 @@
+#pragma warning disable CA1707 // Identifiers should not contain underscores
+#pragma warning disable IDE1006 // Naming rule violation
+// ReSharper disable InconsistentNaming
+
using System;
using System.Runtime.CompilerServices;
using Godot.Collections;
-// ReSharper disable InconsistentNaming
#nullable enable
@@ -240,7 +243,6 @@ namespace Godot.NativeInterop
public static godot_variant CreateFromSystemArrayOfRid(Span<Rid> from)
=> CreateFromArray(new Collections.Array(from));
- // ReSharper disable once RedundantNameQualifier
public static godot_variant CreateFromSystemArrayOfGodotObject(GodotObject[]? from)
{
if (from == null)
@@ -306,7 +308,6 @@ namespace Godot.NativeInterop
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- // ReSharper disable once RedundantNameQualifier
public static godot_variant CreateFromGodotObject(GodotObject? from)
=> from != null ? CreateFromGodotObjectPtr(GodotObject.GetPtr(from)) : default;
@@ -459,7 +460,6 @@ namespace Godot.NativeInterop
=> p_var.Type == Variant.Type.Object ? p_var.Object : IntPtr.Zero;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- // ReSharper disable once RedundantNameQualifier
public static GodotObject ConvertToGodotObject(in godot_variant p_var)
=> InteropUtils.UnmanagedGetManaged(ConvertToGodotObjectPtr(p_var));
@@ -615,7 +615,6 @@ namespace Godot.NativeInterop
}
public static T[] ConvertToSystemArrayOfGodotObject<T>(in godot_variant p_var)
- // ReSharper disable once RedundantNameQualifier
where T : GodotObject
{
using var godotArray = NativeFuncs.godotsharp_variant_as_array(p_var);
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs
index 12b0a47079..d8f7214c2f 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs
@@ -1,5 +1,4 @@
using System;
-using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace Godot.NativeInterop;
@@ -25,7 +24,6 @@ public partial class VariantUtils
// ReSharper disable once StaticMemberInGenericType
internal static unsafe delegate*<in godot_variant, T> FromVariantCb;
- [SuppressMessage("ReSharper", "RedundantNameQualifier")]
static GenericConversion()
{
RuntimeHelpers.RunClassConstructor(typeof(T).TypeHandle);
@@ -33,7 +31,6 @@ public partial class VariantUtils
}
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
- [SuppressMessage("ReSharper", "RedundantNameQualifier")]
public static godot_variant CreateFrom<[MustBeVariant] T>(in T from)
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -224,7 +221,6 @@ public partial class VariantUtils
}
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
- [SuppressMessage("ReSharper", "RedundantNameQualifier")]
public static T ConvertTo<[MustBeVariant] T>(in godot_variant variant)
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs
index 2aac23d799..c0889fb0e8 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs
@@ -251,10 +251,10 @@ namespace Godot
/// <param name="right">The right clipping distance.</param>
/// <param name="bottom">The bottom clipping distance.</param>
/// <param name="top">The top clipping distance.</param>
- /// <param name="near">The near clipping distance.</param>
- /// <param name="far">The far clipping distance.</param>
+ /// <param name="depthNear">The near clipping distance.</param>
+ /// <param name="depthFar">The far clipping distance.</param>
/// <returns>The created projection.</returns>
- public static Projection CreateFrustum(real_t left, real_t right, real_t bottom, real_t top, real_t depth_near, real_t depth_far)
+ public static Projection CreateFrustum(real_t left, real_t right, real_t bottom, real_t top, real_t depthNear, real_t depthFar)
{
if (right <= left)
{
@@ -264,18 +264,18 @@ namespace Godot
{
throw new ArgumentException("top is less or equal to bottom.");
}
- if (depth_far <= depth_near)
+ if (depthFar <= depthNear)
{
throw new ArgumentException("far is less or equal to near.");
}
- real_t x = 2 * depth_near / (right - left);
- real_t y = 2 * depth_near / (top - bottom);
+ real_t x = 2 * depthNear / (right - left);
+ real_t y = 2 * depthNear / (top - bottom);
real_t a = (right + left) / (right - left);
real_t b = (top + bottom) / (top - bottom);
- real_t c = -(depth_far + depth_near) / (depth_far - depth_near);
- real_t d = -2 * depth_far * depth_near / (depth_far - depth_near);
+ real_t c = -(depthFar + depthNear) / (depthFar - depthNear);
+ real_t d = -2 * depthFar * depthNear / (depthFar - depthNear);
return new Projection(
new Vector4(x, 0, 0, 0),
@@ -293,17 +293,17 @@ namespace Godot
/// <param name="size">The frustum size.</param>
/// <param name="aspect">The aspect ratio.</param>
/// <param name="offset">The offset to apply.</param>
- /// <param name="near">The near clipping distance.</param>
- /// <param name="far">The far clipping distance.</param>
+ /// <param name="depthNear">The near clipping distance.</param>
+ /// <param name="depthFar">The far clipping distance.</param>
/// <param name="flipFov">If the field of view is flipped over the projection's diagonal.</param>
/// <returns>The created projection.</returns>
- public static Projection CreateFrustumAspect(real_t size, real_t aspect, Vector2 offset, real_t depth_near, real_t depth_far, bool flipFov)
+ public static Projection CreateFrustumAspect(real_t size, real_t aspect, Vector2 offset, real_t depthNear, real_t depthFar, bool flipFov)
{
if (!flipFov)
{
size *= aspect;
}
- return CreateFrustum(-size / 2 + offset.X, +size / 2 + offset.X, -size / aspect / 2 + offset.Y, +size / aspect / 2 + offset.Y, depth_near, depth_far);
+ return CreateFrustum(-size / 2 + offset.X, +size / 2 + offset.X, -size / aspect / 2 + offset.Y, +size / aspect / 2 + offset.Y, depthNear, depthFar);
}
/// <summary>
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
index f249bac69c..9cd5498fa8 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
@@ -1836,8 +1836,8 @@ namespace Godot
return Uri.EscapeDataString(instance);
}
- private const string _uniqueNodePrefix = "%";
- private static readonly string[] _invalidNodeNameCharacters = { ".", ":", "@", "/", "\"", _uniqueNodePrefix };
+ private const string UniqueNodePrefix = "%";
+ private static readonly string[] _invalidNodeNameCharacters = { ".", ":", "@", "/", "\"", UniqueNodePrefix };
/// <summary>
/// Removes any characters from the string that are prohibited in
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs
index 9aad965ad0..036a26328a 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Variant.cs
@@ -1,5 +1,4 @@
using System;
-using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using Godot.NativeInterop;
@@ -7,7 +6,6 @@ namespace Godot;
#nullable enable
-[SuppressMessage("ReSharper", "RedundantNameQualifier")]
public partial struct Variant : IDisposable
{
internal godot_variant.movable NativeVar;
diff --git a/modules/mono/glue/GodotSharp/GodotSharpEditor/Compat.cs b/modules/mono/glue/GodotSharp/GodotSharpEditor/Compat.cs
index 7a3bb0df7e..d1289ee6ba 100644
--- a/modules/mono/glue/GodotSharp/GodotSharpEditor/Compat.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharpEditor/Compat.cs
@@ -7,6 +7,9 @@ using System.ComponentModel;
namespace Godot;
+// TODO: This is currently disabled because of https://github.com/dotnet/roslyn/issues/52904
+#pragma warning disable IDE0040 // Add accessibility modifiers.
+
partial class EditorUndoRedoManager
{
/// <inheritdoc cref="CreateAction(string, UndoRedo.MergeMode, GodotObject, bool)"/>
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm
index d8e546f571..b2014f2849 100644
--- a/platform/macos/display_server_macos.mm
+++ b/platform/macos/display_server_macos.mm
@@ -4905,7 +4905,7 @@ DisplayServerMacOS::~DisplayServerMacOS() {
}
// Destroy all status indicators.
- for (HashMap<IndicatorID, IndicatorData>::Iterator E = indicators.begin(); E;) {
+ for (HashMap<IndicatorID, IndicatorData>::Iterator E = indicators.begin(); E; ++E) {
[[NSStatusBar systemStatusBar] removeStatusItem:E->value.item];
}
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index 6f3f6189e5..4bb6d2f3f5 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -5539,7 +5539,7 @@ DisplayServerWindows::~DisplayServerWindows() {
cursors_cache.clear();
// Destroy all status indicators.
- for (HashMap<IndicatorID, IndicatorData>::Iterator E = indicators.begin(); E;) {
+ for (HashMap<IndicatorID, IndicatorData>::Iterator E = indicators.begin(); E; ++E) {
NOTIFYICONDATAW ndat;
ZeroMemory(&ndat, sizeof(NOTIFYICONDATAW));
ndat.cbSize = sizeof(NOTIFYICONDATAW);
diff --git a/scene/3d/physics/ray_cast_3d.cpp b/scene/3d/physics/ray_cast_3d.cpp
index dc50ecccc0..0cb722a77e 100644
--- a/scene/3d/physics/ray_cast_3d.cpp
+++ b/scene/3d/physics/ray_cast_3d.cpp
@@ -41,7 +41,7 @@ void RayCast3D::set_target_position(const Vector3 &p_point) {
if (is_inside_tree()) {
_update_debug_shape_vertices();
}
- } else if (debug_shape) {
+ } else if (debug_instance.is_valid()) {
_update_debug_shape();
}
}
@@ -186,11 +186,17 @@ void RayCast3D::_notification(int p_what) {
set_physics_process_internal(false);
}
- if (debug_shape) {
+ if (debug_instance.is_valid()) {
_clear_debug_shape();
}
} break;
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ if (is_inside_tree() && debug_instance.is_valid()) {
+ RenderingServer::get_singleton()->instance_set_visible(debug_instance, is_visible_in_tree());
+ }
+ } break;
+
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
if (!enabled) {
break;
@@ -200,6 +206,9 @@ void RayCast3D::_notification(int p_what) {
_update_raycast_state();
if (prev_collision_state != collided && get_tree()->is_debugging_collisions_hint()) {
_update_debug_shape_material(true);
+ if (is_inside_tree() && debug_instance.is_valid()) {
+ RenderingServer::get_singleton()->instance_set_transform(debug_instance, get_global_transform());
+ }
}
} break;
}
@@ -416,7 +425,7 @@ void RayCast3D::set_debug_shape_thickness(const int p_debug_shape_thickness) {
if (is_inside_tree()) {
_update_debug_shape_vertices();
}
- } else if (debug_shape) {
+ } else if (debug_instance.is_valid()) {
_update_debug_shape();
}
}
@@ -448,13 +457,13 @@ const Color &RayCast3D::get_debug_shape_custom_color() const {
void RayCast3D::_create_debug_shape() {
_update_debug_shape_material();
- Ref<ArrayMesh> mesh = memnew(ArrayMesh);
-
- MeshInstance3D *mi = memnew(MeshInstance3D);
- mi->set_mesh(mesh);
+ if (!debug_instance.is_valid()) {
+ debug_instance = RenderingServer::get_singleton()->instance_create();
+ }
- add_child(mi);
- debug_shape = mi;
+ if (debug_mesh.is_null()) {
+ debug_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
+ }
}
void RayCast3D::_update_debug_shape_material(bool p_check_collision) {
@@ -494,19 +503,17 @@ void RayCast3D::_update_debug_shape() {
return;
}
- if (!debug_shape) {
+ if (!debug_instance.is_valid()) {
_create_debug_shape();
}
- MeshInstance3D *mi = static_cast<MeshInstance3D *>(debug_shape);
- Ref<ArrayMesh> mesh = mi->get_mesh();
- if (!mesh.is_valid()) {
+ if (!debug_instance.is_valid() || debug_mesh.is_null()) {
return;
}
_update_debug_shape_vertices();
- mesh->clear_surfaces();
+ debug_mesh->clear_surfaces();
Array a;
a.resize(Mesh::ARRAY_MAX);
@@ -516,32 +523,36 @@ void RayCast3D::_update_debug_shape() {
if (!debug_line_vertices.is_empty()) {
a[Mesh::ARRAY_VERTEX] = debug_line_vertices;
- mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, a, Array(), Dictionary(), flags);
- mesh->surface_set_material(surface_count, debug_material);
+ debug_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, a, Array(), Dictionary(), flags);
+ debug_mesh->surface_set_material(surface_count, debug_material);
++surface_count;
}
if (!debug_shape_vertices.is_empty()) {
a[Mesh::ARRAY_VERTEX] = debug_shape_vertices;
- mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLE_STRIP, a, Array(), Dictionary(), flags);
- mesh->surface_set_material(surface_count, debug_material);
+ debug_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLE_STRIP, a, Array(), Dictionary(), flags);
+ debug_mesh->surface_set_material(surface_count, debug_material);
++surface_count;
}
+
+ RenderingServer::get_singleton()->instance_set_base(debug_instance, debug_mesh->get_rid());
+ if (is_inside_tree()) {
+ RenderingServer::get_singleton()->instance_set_scenario(debug_instance, get_world_3d()->get_scenario());
+ RenderingServer::get_singleton()->instance_set_visible(debug_instance, is_visible_in_tree());
+ RenderingServer::get_singleton()->instance_set_transform(debug_instance, get_global_transform());
+ }
}
void RayCast3D::_clear_debug_shape() {
- if (!debug_shape) {
- return;
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
+ if (debug_instance.is_valid()) {
+ RenderingServer::get_singleton()->free(debug_instance);
+ debug_instance = RID();
}
-
- MeshInstance3D *mi = static_cast<MeshInstance3D *>(debug_shape);
- if (mi->is_inside_tree()) {
- mi->queue_free();
- } else {
- memdelete(mi);
+ if (debug_mesh.is_valid()) {
+ RenderingServer::get_singleton()->free(debug_mesh->get_rid());
+ debug_mesh = Ref<ArrayMesh>();
}
-
- debug_shape = nullptr;
}
RayCast3D::RayCast3D() {
diff --git a/scene/3d/physics/ray_cast_3d.h b/scene/3d/physics/ray_cast_3d.h
index 7b7f698114..40f2223602 100644
--- a/scene/3d/physics/ray_cast_3d.h
+++ b/scene/3d/physics/ray_cast_3d.h
@@ -53,7 +53,6 @@ class RayCast3D : public Node3D {
uint32_t collision_mask = 1;
bool exclude_parent_body = true;
- Node *debug_shape = nullptr;
Ref<Material> debug_material;
Color debug_shape_custom_color = Color(0.0, 0.0, 0.0);
int debug_shape_thickness = 2;
@@ -72,6 +71,9 @@ class RayCast3D : public Node3D {
bool hit_from_inside = false;
bool hit_back_faces = true;
+ RID debug_instance;
+ Ref<ArrayMesh> debug_mesh;
+
protected:
void _notification(int p_what);
void _update_raycast_state();
diff --git a/scene/3d/physics/shape_cast_3d.cpp b/scene/3d/physics/shape_cast_3d.cpp
index 5e6302cb81..ada238c7f2 100644
--- a/scene/3d/physics/shape_cast_3d.cpp
+++ b/scene/3d/physics/shape_cast_3d.cpp
@@ -64,11 +64,17 @@ void ShapeCast3D::_notification(int p_what) {
set_physics_process_internal(false);
}
- if (debug_shape) {
+ if (debug_instance.is_valid()) {
_clear_debug_shape();
}
} break;
+ case NOTIFICATION_VISIBILITY_CHANGED: {
+ if (is_inside_tree() && debug_instance.is_valid()) {
+ RenderingServer::get_singleton()->instance_set_visible(debug_instance, is_visible_in_tree());
+ }
+ } break;
+
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
if (!enabled) {
break;
@@ -86,6 +92,9 @@ void ShapeCast3D::_notification(int p_what) {
if (prev_collision_state == collided && !collided) {
_update_debug_shape();
}
+ if (is_inside_tree() && debug_instance.is_valid()) {
+ RenderingServer::get_singleton()->instance_set_transform(debug_instance, get_global_transform());
+ }
}
} break;
}
@@ -217,7 +226,7 @@ void ShapeCast3D::set_target_position(const Vector3 &p_point) {
if (is_inside_tree()) {
_update_debug_shape_vertices();
}
- } else if (debug_shape) {
+ } else if (debug_instance.is_valid()) {
_update_debug_shape();
}
}
@@ -532,13 +541,13 @@ const Color &ShapeCast3D::get_debug_shape_custom_color() const {
void ShapeCast3D::_create_debug_shape() {
_update_debug_shape_material();
- Ref<ArrayMesh> mesh = memnew(ArrayMesh);
-
- MeshInstance3D *mi = memnew(MeshInstance3D);
- mi->set_mesh(mesh);
+ if (!debug_instance.is_valid()) {
+ debug_instance = RenderingServer::get_singleton()->instance_create();
+ }
- add_child(mi);
- debug_shape = mi;
+ if (debug_mesh.is_null()) {
+ debug_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
+ }
}
void ShapeCast3D::_update_debug_shape_material(bool p_check_collision) {
@@ -578,7 +587,7 @@ void ShapeCast3D::_update_debug_shape() {
return;
}
- if (!debug_shape) {
+ if (!debug_instance.is_valid()) {
_create_debug_shape();
}
@@ -588,13 +597,11 @@ void ShapeCast3D::_update_debug_shape() {
return;
}
- MeshInstance3D *mi = static_cast<MeshInstance3D *>(debug_shape);
- Ref<ArrayMesh> mesh = mi->get_mesh();
- if (!mesh.is_valid()) {
+ if (!debug_instance.is_valid() || debug_mesh.is_null()) {
return;
}
- mesh->clear_surfaces();
+ debug_mesh->clear_surfaces();
Array a;
a.resize(Mesh::ARRAY_MAX);
@@ -604,30 +611,34 @@ void ShapeCast3D::_update_debug_shape() {
if (!debug_shape_vertices.is_empty()) {
a[Mesh::ARRAY_VERTEX] = debug_shape_vertices;
- mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, a, Array(), Dictionary(), flags);
- mesh->surface_set_material(surface_count, debug_material);
+ debug_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, a, Array(), Dictionary(), flags);
+ debug_mesh->surface_set_material(surface_count, debug_material);
++surface_count;
}
if (!debug_line_vertices.is_empty()) {
a[Mesh::ARRAY_VERTEX] = debug_line_vertices;
- mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, a, Array(), Dictionary(), flags);
- mesh->surface_set_material(surface_count, debug_material);
+ debug_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, a, Array(), Dictionary(), flags);
+ debug_mesh->surface_set_material(surface_count, debug_material);
++surface_count;
}
+
+ RenderingServer::get_singleton()->instance_set_base(debug_instance, debug_mesh->get_rid());
+ if (is_inside_tree()) {
+ RenderingServer::get_singleton()->instance_set_scenario(debug_instance, get_world_3d()->get_scenario());
+ RenderingServer::get_singleton()->instance_set_visible(debug_instance, is_visible_in_tree());
+ RenderingServer::get_singleton()->instance_set_transform(debug_instance, get_global_transform());
+ }
}
void ShapeCast3D::_clear_debug_shape() {
- if (!debug_shape) {
- return;
+ ERR_FAIL_NULL(RenderingServer::get_singleton());
+ if (debug_instance.is_valid()) {
+ RenderingServer::get_singleton()->free(debug_instance);
+ debug_instance = RID();
}
-
- MeshInstance3D *mi = static_cast<MeshInstance3D *>(debug_shape);
- if (mi->is_inside_tree()) {
- mi->queue_free();
- } else {
- memdelete(mi);
+ if (debug_mesh.is_valid()) {
+ RenderingServer::get_singleton()->free(debug_mesh->get_rid());
+ debug_mesh = Ref<ArrayMesh>();
}
-
- debug_shape = nullptr;
}
diff --git a/scene/3d/physics/shape_cast_3d.h b/scene/3d/physics/shape_cast_3d.h
index 9052db9046..19b73e3f72 100644
--- a/scene/3d/physics/shape_cast_3d.h
+++ b/scene/3d/physics/shape_cast_3d.h
@@ -55,7 +55,6 @@ class ShapeCast3D : public Node3D {
bool collide_with_areas = false;
bool collide_with_bodies = true;
- Node *debug_shape = nullptr;
Ref<Material> debug_material;
Color debug_shape_custom_color = Color(0.0, 0.0, 0.0);
Vector<Vector3> debug_shape_vertices;
@@ -76,6 +75,9 @@ class ShapeCast3D : public Node3D {
Array _get_collision_result() const;
+ RID debug_instance;
+ Ref<ArrayMesh> debug_mesh;
+
protected:
void _notification(int p_what);
void _update_shapecast_state();
diff --git a/scene/3d/xr_body_modifier_3d.cpp b/scene/3d/xr_body_modifier_3d.cpp
new file mode 100644
index 0000000000..3414ce13ae
--- /dev/null
+++ b/scene/3d/xr_body_modifier_3d.cpp
@@ -0,0 +1,415 @@
+/**************************************************************************/
+/* xr_body_modifier_3d.cpp */
+/**************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/**************************************************************************/
+/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
+/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/**************************************************************************/
+
+#include "xr_body_modifier_3d.h"
+
+#include "scene/3d/skeleton_3d.h"
+#include "servers/xr/xr_pose.h"
+#include "servers/xr_server.h"
+
+void XRBodyModifier3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_body_tracker", "tracker_name"), &XRBodyModifier3D::set_body_tracker);
+ ClassDB::bind_method(D_METHOD("get_body_tracker"), &XRBodyModifier3D::get_body_tracker);
+
+ ClassDB::bind_method(D_METHOD("set_target", "target"), &XRBodyModifier3D::set_target);
+ ClassDB::bind_method(D_METHOD("get_target"), &XRBodyModifier3D::get_target);
+
+ ClassDB::bind_method(D_METHOD("set_body_update", "body_update"), &XRBodyModifier3D::set_body_update);
+ ClassDB::bind_method(D_METHOD("get_body_update"), &XRBodyModifier3D::get_body_update);
+
+ ClassDB::bind_method(D_METHOD("set_bone_update", "bone_update"), &XRBodyModifier3D::set_bone_update);
+ ClassDB::bind_method(D_METHOD("get_bone_update"), &XRBodyModifier3D::get_bone_update);
+
+ ClassDB::bind_method(D_METHOD("set_show_when_tracked", "show"), &XRBodyModifier3D::set_show_when_tracked);
+ ClassDB::bind_method(D_METHOD("get_show_when_tracked"), &XRBodyModifier3D::get_show_when_tracked);
+
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "body_tracker", PROPERTY_HINT_ENUM_SUGGESTION, "/user/body"), "set_body_tracker", "get_body_tracker");
+ ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "target", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "Skeleton3D"), "set_target", "get_target");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "body_update", PROPERTY_HINT_FLAGS, "Upper Body,Lower Body,Hands"), "set_body_update", "get_body_update");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "bone_update", PROPERTY_HINT_ENUM, "Full,Rotation Only"), "set_bone_update", "get_bone_update");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_when_tracked"), "set_show_when_tracked", "get_show_when_tracked");
+
+ BIND_BITFIELD_FLAG(BODY_UPDATE_UPPER_BODY);
+ BIND_BITFIELD_FLAG(BODY_UPDATE_LOWER_BODY);
+ BIND_BITFIELD_FLAG(BODY_UPDATE_HANDS);
+
+ BIND_ENUM_CONSTANT(BONE_UPDATE_FULL);
+ BIND_ENUM_CONSTANT(BONE_UPDATE_ROTATION_ONLY);
+ BIND_ENUM_CONSTANT(BONE_UPDATE_MAX);
+}
+
+void XRBodyModifier3D::set_body_tracker(const StringName &p_tracker_name) {
+ tracker_name = p_tracker_name;
+}
+
+StringName XRBodyModifier3D::get_body_tracker() const {
+ return tracker_name;
+}
+
+void XRBodyModifier3D::set_target(const NodePath &p_target) {
+ target = p_target;
+
+ if (is_inside_tree()) {
+ _get_joint_data();
+ }
+}
+
+NodePath XRBodyModifier3D::get_target() const {
+ return target;
+}
+
+void XRBodyModifier3D::set_body_update(BitField<BodyUpdate> p_body_update) {
+ body_update = p_body_update;
+}
+
+BitField<XRBodyModifier3D::BodyUpdate> XRBodyModifier3D::get_body_update() const {
+ return body_update;
+}
+
+void XRBodyModifier3D::set_bone_update(BoneUpdate p_bone_update) {
+ ERR_FAIL_INDEX(p_bone_update, BONE_UPDATE_MAX);
+ bone_update = p_bone_update;
+}
+
+XRBodyModifier3D::BoneUpdate XRBodyModifier3D::get_bone_update() const {
+ return bone_update;
+}
+
+void XRBodyModifier3D::set_show_when_tracked(bool p_show_when_tracked) {
+ show_when_tracked = p_show_when_tracked;
+}
+
+bool XRBodyModifier3D::get_show_when_tracked() const {
+ return show_when_tracked;
+}
+
+Skeleton3D *XRBodyModifier3D::get_skeleton() {
+ if (!has_node(target)) {
+ return nullptr;
+ }
+
+ Node *node = get_node(target);
+ if (!node) {
+ return nullptr;
+ }
+
+ Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(node);
+ return skeleton;
+}
+
+void XRBodyModifier3D::_get_joint_data() {
+ // Table of Godot Humanoid bone names.
+ static const String bone_names[XRBodyTracker::JOINT_MAX] = {
+ "Root", // XRBodyTracker::JOINT_ROOT
+
+ // Upper Body Joints.
+ "Hips", // XRBodyTracker::JOINT_HIPS
+ "Spine", // XRBodyTracker::JOINT_SPINE
+ "Chest", // XRBodyTracker::JOINT_CHEST
+ "UpperChest", // XRBodyTracker::JOINT_UPPER_CHEST
+ "Neck", // XRBodyTracker::JOINT_NECK"
+ "Head", // XRBodyTracker::JOINT_HEAD"
+ "HeadTip", // XRBodyTracker::JOINT_HEAD_TIP"
+ "LeftShoulder", // XRBodyTracker::JOINT_LEFT_SHOULDER"
+ "LeftUpperArm", // XRBodyTracker::JOINT_LEFT_UPPER_ARM"
+ "LeftLowerArm", // XRBodyTracker::JOINT_LEFT_LOWER_ARM"
+ "RightShoulder", // XRBodyTracker::JOINT_RIGHT_SHOULDER"
+ "RightUpperArm", // XRBodyTracker::JOINT_RIGHT_UPPER_ARM"
+ "RightLowerArm", // XRBodyTracker::JOINT_RIGHT_LOWER_ARM"
+
+ // Lower Body Joints.
+ "LeftUpperLeg", // XRBodyTracker::JOINT_LEFT_UPPER_LEG
+ "LeftLowerLeg", // XRBodyTracker::JOINT_LEFT_LOWER_LEG
+ "LeftFoot", // XRBodyTracker::JOINT_LEFT_FOOT
+ "LeftToes", // XRBodyTracker::JOINT_LEFT_TOES
+ "RightUpperLeg", // XRBodyTracker::JOINT_RIGHT_UPPER_LEG
+ "RightLowerLeg", // XRBodyTracker::JOINT_RIGHT_LOWER_LEG
+ "RightFoot", // XRBodyTracker::JOINT_RIGHT_FOOT
+ "RightToes", // XRBodyTracker::JOINT_RIGHT_TOES
+
+ // Left Hand Joints.
+ "LeftHand", // XRBodyTracker::JOINT_LEFT_HAND
+ "LeftPalm", // XRBodyTracker::JOINT_LEFT_PALM
+ "LeftWrist", // XRBodyTracker::JOINT_LEFT_WRIST
+ "LeftThumbMetacarpal", // XRBodyTracker::JOINT_LEFT_THUMB_METACARPAL
+ "LeftThumbProximal", // XRBodyTracker::JOINT_LEFT_THUMB_PHALANX_PROXIMAL
+ "LeftThumbDistal", // XRBodyTracker::JOINT_LEFT_THUMB_PHALANX_DISTAL
+ "LeftThumbTip", // XRBodyTracker::JOINT_LEFT_THUMB_TIP
+ "LeftIndexMetacarpal", // XRBodyTracker::JOINT_LEFT_INDEX_FINGER_METACARPAL
+ "LeftIndexProximal", // XRBodyTracker::JOINT_LEFT_INDEX_FINGER_PHALANX_PROXIMAL
+ "LeftIndexIntermediate", // XRBodyTracker::JOINT_LEFT_INDEX_FINGER_PHALANX_INTERMEDIATE
+ "LeftIndexDistal", // XRBodyTracker::JOINT_LEFT_INDEX_FINGER_PHALANX_DISTAL
+ "LeftIndexTip", // XRBodyTracker::JOINT_LEFT_INDEX_FINGER_TIP
+ "LeftMiddleMetacarpal", // XRBodyTracker::JOINT_LEFT_MIDDLE_FINGER_METACARPAL
+ "LeftMiddleProximal", // XRBodyTracker::JOINT_LEFT_MIDDLE_FINGER_PHALANX_PROXIMAL
+ "LeftMiddleIntermediate", // XRBodyTracker::JOINT_LEFT_MIDDLE_FINGER_PHALANX_INTERMEDIATE
+ "LeftMiddleDistal", // XRBodyTracker::JOINT_LEFT_MIDDLE_FINGER_PHALANX_DISTAL
+ "LeftMiddleTip", // XRBodyTracker::JOINT_LEFT_MIDDLE_FINGER_TIP
+ "LeftRingMetacarpal", // XRBodyTracker::JOINT_LEFT_RING_FINGER_METACARPAL
+ "LeftRingProximal", // XRBodyTracker::JOINT_LEFT_RING_FINGER_PHALANX_PROXIMAL
+ "LeftRingIntermediate", // XRBodyTracker::JOINT_LEFT_RING_FINGER_PHALANX_INTERMEDIATE
+ "LeftRingDistal", // XRBodyTracker::JOINT_LEFT_RING_FINGER_PHALANX_DISTAL
+ "LeftRingTip", // XRBodyTracker::JOINT_LEFT_RING_FINGER_TIP
+ "LeftLittleMetacarpal", // XRBodyTracker::JOINT_LEFT_PINKY_FINGER_METACARPAL
+ "LeftLittleProximal", // XRBodyTracker::JOINT_LEFT_PINKY_FINGER_PHALANX_PROXIMAL
+ "LeftLittleIntermediate", // XRBodyTracker::JOINT_LEFT_PINKY_FINGER_PHALANX_INTERMEDIATE
+ "LeftLittleDistal", // XRBodyTracker::JOINT_LEFT_PINKY_FINGER_PHALANX_DISTAL
+ "LeftLittleTip", // XRBodyTracker::JOINT_LEFT_PINKY_FINGER_TIP
+
+ // Right Hand Joints.
+ "RightHand", // XRBodyTracker::JOINT_RIGHT_HAND
+ "RightPalm", // XRBodyTracker::JOINT_RIGHT_PALM
+ "RightWrist", // XRBodyTracker::JOINT_RIGHT_WRIST
+ "RightThumbMetacarpal", // XRBodyTracker::JOINT_RIGHT_THUMB_METACARPAL
+ "RightThumbProximal", // XRBodyTracker::JOINT_RIGHT_THUMB_PHALANX_PROXIMAL
+ "RightThumbDistal", // XRBodyTracker::JOINT_RIGHT_THUMB_PHALANX_DISTAL
+ "RightThumbTip", // XRBodyTracker::JOINT_RIGHT_THUMB_TIP
+ "RightIndexMetacarpal", // XRBodyTracker::JOINT_RIGHT_INDEX_FINGER_METACARPAL
+ "RightIndexProximal", // XRBodyTracker::JOINT_RIGHT_INDEX_FINGER_PHALANX_PROXIMAL
+ "RightIndexIntermediate", // XRBodyTracker::JOINT_RIGHT_INDEX_FINGER_PHALANX_INTERMEDIATE
+ "RightIndexDistal", // XRBodyTracker::JOINT_RIGHT_INDEX_FINGER_PHALANX_DISTAL
+ "RightIndexTip", // XRBodyTracker::JOINT_RIGHT_INDEX_FINGER_TIP
+ "RightMiddleMetacarpal", // XRBodyTracker::JOINT_RIGHT_MIDDLE_FINGER_METACARPAL
+ "RightMiddleProximal", // XRBodyTracker::JOINT_RIGHT_MIDDLE_FINGER_PHALANX_PROXIMAL
+ "RightMiddleIntermediate", // XRBodyTracker::JOINT_RIGHT_MIDDLE_FINGER_PHALANX_INTERMEDIATE
+ "RightMiddleDistal", // XRBodyTracker::JOINT_RIGHT_MIDDLE_FINGER_PHALANX_DISTAL
+ "RightMiddleTip", // XRBodyTracker::JOINT_RIGHT_MIDDLE_FINGER_TIP
+ "RightRingMetacarpal", // XRBodyTracker::JOINT_RIGHT_RING_FINGER_METACARPAL
+ "RightRingProximal", // XRBodyTracker::JOINT_RIGHT_RING_FINGER_PHALANX_PROXIMAL
+ "RightRingIntermediate", // XRBodyTracker::JOINT_RIGHT_RING_FINGER_PHALANX_INTERMEDIATE
+ "RightRingDistal", // XRBodyTracker::JOINT_RIGHT_RING_FINGER_PHALANX_DISTAL
+ "RightRingTip", // XRBodyTracker::JOINT_RIGHT_RING_FINGER_TIP
+ "RightLittleMetacarpal", // XRBodyTracker::JOINT_RIGHT_PINKY_FINGER_METACARPAL
+ "RightLittleProximal", // XRBodyTracker::JOINT_RIGHT_PINKY_FINGER_PHALANX_PROXIMAL
+ "RightLittleIntermediate", // XRBodyTracker::JOINT_RIGHT_PINKY_FINGER_PHALANX_INTERMEDIATE
+ "RightLittleDistal", // XRBodyTracker::JOINT_RIGHT_PINKY_FINGER_PHALANX_DISTAL
+ "RightLittleTip", // XRBodyTracker::JOINT_RIGHT_PINKY_FINGER_TIP
+ };
+
+ // reset JIC.
+ for (int i = 0; i < XRBodyTracker::JOINT_MAX; i++) {
+ joints[i].bone = -1;
+ joints[i].parent_joint = -1;
+ }
+
+ Skeleton3D *skeleton = get_skeleton();
+ if (!skeleton) {
+ return;
+ }
+
+ // Find the skeleton-bones associated with each joint.
+ int bones[XRBodyTracker::JOINT_MAX];
+ for (int i = 0; i < XRBodyTracker::JOINT_MAX; i++) {
+ // Skip upper body joints if not enabled.
+ if (!body_update.has_flag(BODY_UPDATE_UPPER_BODY) && i >= XRBodyTracker::JOINT_HIPS && i <= XRBodyTracker::JOINT_RIGHT_LOWER_ARM) {
+ bones[i] = -1;
+ continue;
+ }
+
+ // Skip lower body joints if not enabled.
+ if (!body_update.has_flag(BODY_UPDATE_LOWER_BODY) && i >= XRBodyTracker::JOINT_LEFT_UPPER_LEG && i <= XRBodyTracker::JOINT_RIGHT_TOES) {
+ bones[i] = -1;
+ continue;
+ }
+
+ // Skip hand joints if not enabled.
+ if (!body_update.has_flag(BODY_UPDATE_HANDS) && i >= XRBodyTracker::JOINT_LEFT_HAND && i <= XRBodyTracker::JOINT_RIGHT_PINKY_FINGER_TIP) {
+ bones[i] = -1;
+ continue;
+ }
+
+ // Find the skeleton bone.
+ bones[i] = skeleton->find_bone(bone_names[i]);
+ if (bones[i] == -1) {
+ WARN_PRINT(vformat("Couldn't obtain bone for %s", bone_names[i]));
+ }
+ }
+
+ // If the root bone is not found then use the skeleton root bone.
+ if (bones[XRBodyTracker::JOINT_ROOT] == -1) {
+ bones[XRBodyTracker::JOINT_ROOT] = 0;
+ }
+
+ // Assemble the joint relationship to the available skeleton bones.
+ for (int i = 0; i < XRBodyTracker::JOINT_MAX; i++) {
+ // Get the skeleton bone (skip if not found).
+ const int bone = bones[i];
+ if (bone == -1) {
+ continue;
+ }
+
+ // Find the parent skeleton-bone.
+ const int parent_bone = skeleton->get_bone_parent(bone);
+ if (parent_bone == -1) {
+ // If no parent skeleton-bone exists then drive this relative to the root joint.
+ joints[i].bone = bone;
+ joints[i].parent_joint = XRBodyTracker::JOINT_ROOT;
+ continue;
+ }
+
+ // Find the joint associated with the parent skeleton-bone.
+ for (int j = 0; j < XRBodyTracker::JOINT_MAX; ++j) {
+ if (bones[j] == parent_bone) {
+ // If a parent joint is found then drive this bone relative to it.
+ joints[i].bone = bone;
+ joints[i].parent_joint = j;
+ break;
+ }
+ }
+ }
+}
+
+void XRBodyModifier3D::_update_skeleton() {
+ Skeleton3D *skeleton = get_skeleton();
+ if (!skeleton) {
+ return;
+ }
+
+ XRServer *xr_server = XRServer::get_singleton();
+ if (!xr_server) {
+ return;
+ }
+
+ Ref<XRBodyTracker> tracker = xr_server->get_body_tracker(tracker_name);
+ if (tracker.is_null()) {
+ return;
+ }
+
+ // Handle no tracking data.
+ if (!tracker->get_has_tracking_data()) {
+ // If tracking-state determines visibility then hide the node.
+ if (show_when_tracked) {
+ set_visible(false);
+ }
+ return;
+ }
+
+ // Read the relevant tracking data.
+ bool has_valid_data[XRBodyTracker::JOINT_MAX];
+ Transform3D transforms[XRBodyTracker::JOINT_MAX];
+ Transform3D inv_transforms[XRBodyTracker::JOINT_MAX];
+ const float ws = xr_server->get_world_scale();
+ for (int joint = 0; joint < XRBodyTracker::JOINT_MAX; joint++) {
+ BitField<XRBodyTracker::JointFlags> flags = tracker->get_joint_flags(static_cast<XRBodyTracker::Joint>(joint));
+ has_valid_data[joint] = flags.has_flag(XRBodyTracker::JOINT_FLAG_ORIENTATION_VALID) && flags.has_flag(XRBodyTracker::JOINT_FLAG_POSITION_VALID);
+
+ if (has_valid_data[joint]) {
+ transforms[joint] = tracker->get_joint_transform(static_cast<XRBodyTracker::Joint>(joint));
+ transforms[joint].origin *= ws;
+ inv_transforms[joint] = transforms[joint].inverse();
+ }
+ }
+
+ // Handle root joint not tracked.
+ if (!has_valid_data[XRBodyTracker::JOINT_ROOT]) {
+ // If tracking-state determines visibility then hide the node.
+ if (show_when_tracked) {
+ set_visible(false);
+ }
+ return;
+ }
+
+ // Apply the joint information to the skeleton.
+ for (int joint = 0; joint < XRBodyTracker::JOINT_MAX; joint++) {
+ // Skip if no valid joint data
+ if (!has_valid_data[joint]) {
+ continue;
+ }
+
+ // Get the skeleton bone (skip if none).
+ const int bone = joints[joint].bone;
+ if (bone == -1) {
+ continue;
+ }
+
+ // Calculate the relative relationship to the parent bone joint.
+ const int parent_joint = joints[joint].parent_joint;
+ const Transform3D relative_transform = inv_transforms[parent_joint] * transforms[joint];
+
+ // Update the bone position if enabled by update mode.
+ if (bone_update == BONE_UPDATE_FULL) {
+ skeleton->set_bone_pose_position(joints[joint].bone, relative_transform.origin);
+ }
+
+ // Always update the bone rotation.
+ skeleton->set_bone_pose_rotation(joints[joint].bone, Quaternion(relative_transform.basis));
+ }
+
+ // Transform to the skeleton pose.
+ set_transform(transforms[XRBodyTracker::JOINT_ROOT]);
+
+ // If tracking-state determines visibility then show the node.
+ if (show_when_tracked) {
+ set_visible(true);
+ }
+}
+
+void XRBodyModifier3D::_tracker_changed(const StringName &p_tracker_name, const Ref<XRBodyTracker> &p_tracker) {
+ if (tracker_name == p_tracker_name) {
+ _get_joint_data();
+ }
+}
+
+void XRBodyModifier3D::_notification(int p_what) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
+ XRServer *xr_server = XRServer::get_singleton();
+ if (xr_server) {
+ xr_server->connect("body_tracker_added", callable_mp(this, &XRBodyModifier3D::_tracker_changed));
+ xr_server->connect("body_tracker_updated", callable_mp(this, &XRBodyModifier3D::_tracker_changed));
+ xr_server->connect("body_tracker_removed", callable_mp(this, &XRBodyModifier3D::_tracker_changed).bind(Ref<XRBodyTracker>()));
+ }
+
+ _get_joint_data();
+
+ set_process_internal(true);
+ } break;
+ case NOTIFICATION_EXIT_TREE: {
+ XRServer *xr_server = XRServer::get_singleton();
+ if (xr_server) {
+ xr_server->disconnect("body_tracker_added", callable_mp(this, &XRBodyModifier3D::_tracker_changed));
+ xr_server->disconnect("body_tracker_updated", callable_mp(this, &XRBodyModifier3D::_tracker_changed));
+ xr_server->disconnect("body_tracker_removed", callable_mp(this, &XRBodyModifier3D::_tracker_changed).bind(Ref<XRBodyTracker>()));
+ }
+
+ set_process_internal(false);
+
+ for (int i = 0; i < XRBodyTracker::JOINT_MAX; i++) {
+ joints[i].bone = -1;
+ joints[i].parent_joint = -1;
+ }
+ } break;
+ case NOTIFICATION_INTERNAL_PROCESS: {
+ _update_skeleton();
+ } break;
+ default: {
+ } break;
+ }
+}
diff --git a/scene/3d/xr_body_modifier_3d.h b/scene/3d/xr_body_modifier_3d.h
new file mode 100644
index 0000000000..89ac69b6b0
--- /dev/null
+++ b/scene/3d/xr_body_modifier_3d.h
@@ -0,0 +1,102 @@
+/**************************************************************************/
+/* xr_body_modifier_3d.h */
+/**************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/**************************************************************************/
+/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
+/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/**************************************************************************/
+
+#ifndef XR_BODY_MODIFIER_3D_H
+#define XR_BODY_MODIFIER_3D_H
+
+#include "scene/3d/node_3d.h"
+#include "servers/xr/xr_body_tracker.h"
+
+class Skeleton3D;
+
+/**
+ The XRBodyModifier3D node drives a body skeleton using body tracking
+ data from an XRBodyTracker instance.
+ */
+
+class XRBodyModifier3D : public Node3D {
+ GDCLASS(XRBodyModifier3D, Node3D);
+
+public:
+ enum BodyUpdate {
+ BODY_UPDATE_UPPER_BODY = 1,
+ BODY_UPDATE_LOWER_BODY = 2,
+ BODY_UPDATE_HANDS = 4,
+ };
+
+ enum BoneUpdate {
+ BONE_UPDATE_FULL,
+ BONE_UPDATE_ROTATION_ONLY,
+ BONE_UPDATE_MAX
+ };
+
+ void set_body_tracker(const StringName &p_tracker_name);
+ StringName get_body_tracker() const;
+
+ void set_target(const NodePath &p_target);
+ NodePath get_target() const;
+
+ void set_body_update(BitField<BodyUpdate> p_body_update);
+ BitField<BodyUpdate> get_body_update() const;
+
+ void set_bone_update(BoneUpdate p_bone_update);
+ BoneUpdate get_bone_update() const;
+
+ void set_show_when_tracked(bool p_show_when_tracked);
+ bool get_show_when_tracked() const;
+
+ void _notification(int p_what);
+
+protected:
+ static void _bind_methods();
+
+private:
+ struct JointData {
+ int bone = -1;
+ int parent_joint = -1;
+ };
+
+ StringName tracker_name = "/user/body";
+ NodePath target;
+ BitField<BodyUpdate> body_update = BODY_UPDATE_UPPER_BODY | BODY_UPDATE_LOWER_BODY | BODY_UPDATE_HANDS;
+ BoneUpdate bone_update = BONE_UPDATE_FULL;
+ bool show_when_tracked = true;
+ JointData joints[XRBodyTracker::JOINT_MAX];
+
+ Skeleton3D *get_skeleton();
+ void _get_joint_data();
+ void _update_skeleton();
+ void _tracker_changed(const StringName &p_tracker_name, const Ref<XRBodyTracker> &p_tracker);
+};
+
+VARIANT_BITFIELD_CAST(XRBodyModifier3D::BodyUpdate)
+VARIANT_ENUM_CAST(XRBodyModifier3D::BoneUpdate)
+
+#endif // XR_BODY_MODIFIER_3D_H
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 73cbfceea4..b8af4c3f79 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -1824,14 +1824,14 @@ void CodeEdit::create_code_region() {
}
int to_line = get_selection_to_line(caret_idx);
set_line(to_line, get_line(to_line) + "\n" + code_region_end_string);
- insert_line_at(from_line, code_region_start_string + " " + RTR("New Code Region"));
+ insert_line_at(from_line, code_region_start_string + " " + atr(ETR("New Code Region")));
fold_line(from_line);
}
// Select name of the first region to allow quick edit.
remove_secondary_carets();
set_caret_line(first_region_start);
- int tag_length = code_region_start_string.length() + RTR("New Code Region").length() + 1;
+ int tag_length = code_region_start_string.length() + atr(ETR("New Code Region")).length() + 1;
set_caret_column(tag_length);
select(first_region_start, code_region_start_string.length() + 1, first_region_start, tag_length);
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index cdb091cb32..ee2122f269 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -54,6 +54,22 @@ void ColorPicker::_notification(int p_what) {
_update_color();
} break;
+ case NOTIFICATION_TRANSLATION_CHANGED: {
+ List<BaseButton *> buttons;
+ preset_group->get_buttons(&buttons);
+ for (List<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) {
+ Color preset_color = ((ColorPresetButton *)E->get())->get_preset_color();
+ E->get()->set_tooltip_text(vformat(atr(ETR("Color: #%s\nLMB: Apply color\nRMB: Remove preset")), preset_color.to_html(preset_color.a < 1)));
+ }
+
+ buttons.clear();
+ recent_preset_group->get_buttons(&buttons);
+ for (List<BaseButton *>::Element *E = buttons.front(); E; E = E->next()) {
+ Color preset_color = ((ColorPresetButton *)E->get())->get_preset_color();
+ E->get()->set_tooltip_text(vformat(atr(ETR("Color: #%s\nLMB: Apply color")), preset_color.to_html(preset_color.a < 1)));
+ }
+ } break;
+
case NOTIFICATION_THEME_CHANGED: {
btn_pick->set_icon(theme_cache.screen_picker);
_update_drop_down_arrow(btn_preset->is_pressed(), btn_preset);
@@ -689,7 +705,7 @@ void ColorPicker::_text_type_toggled() {
text_type->set_icon(nullptr);
c_text->set_editable(true);
- c_text->set_tooltip_text(RTR("Enter a hex code (\"#ff0000\") or named color (\"red\")."));
+ c_text->set_tooltip_text(ETR("Enter a hex code (\"#ff0000\") or named color (\"red\")."));
}
_update_color();
}
@@ -735,7 +751,7 @@ inline int ColorPicker::_get_preset_size() {
void ColorPicker::_add_preset_button(int p_size, const Color &p_color) {
ColorPresetButton *btn_preset_new = memnew(ColorPresetButton(p_color, p_size));
- btn_preset_new->set_tooltip_text(vformat(RTR("Color: #%s\nLMB: Apply color\nRMB: Remove preset"), p_color.to_html(p_color.a < 1)));
+ btn_preset_new->set_tooltip_text(vformat(atr(ETR("Color: #%s\nLMB: Apply color\nRMB: Remove preset")), p_color.to_html(p_color.a < 1)));
SET_DRAG_FORWARDING_GCDU(btn_preset_new, ColorPicker);
btn_preset_new->set_button_group(preset_group);
preset_container->add_child(btn_preset_new);
@@ -745,7 +761,7 @@ void ColorPicker::_add_preset_button(int p_size, const Color &p_color) {
void ColorPicker::_add_recent_preset_button(int p_size, const Color &p_color) {
ColorPresetButton *btn_preset_new = memnew(ColorPresetButton(p_color, p_size));
- btn_preset_new->set_tooltip_text(vformat(RTR("Color: #%s\nLMB: Apply color"), p_color.to_html(p_color.a < 1)));
+ btn_preset_new->set_tooltip_text(vformat(atr(ETR("Color: #%s\nLMB: Apply color")), p_color.to_html(p_color.a < 1)));
btn_preset_new->set_button_group(recent_preset_group);
recent_preset_hbc->add_child(btn_preset_new);
recent_preset_hbc->move_child(btn_preset_new, 0);
@@ -1807,11 +1823,11 @@ ColorPicker::ColorPicker() {
btn_pick = memnew(Button);
sample_hbc->add_child(btn_pick);
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_SCREEN_CAPTURE)) {
- btn_pick->set_tooltip_text(RTR("Pick a color from the screen."));
+ btn_pick->set_tooltip_text(ETR("Pick a color from the screen."));
btn_pick->connect(SNAME("pressed"), callable_mp(this, &ColorPicker::_pick_button_pressed));
} else {
// On unsupported platforms, use a legacy method for color picking.
- btn_pick->set_tooltip_text(RTR("Pick a color from the application window."));
+ btn_pick->set_tooltip_text(ETR("Pick a color from the application window."));
btn_pick->connect(SNAME("pressed"), callable_mp(this, &ColorPicker::_pick_button_pressed_legacy));
}
@@ -1825,7 +1841,7 @@ ColorPicker::ColorPicker() {
btn_shape->set_flat(false);
sample_hbc->add_child(btn_shape);
btn_shape->set_toggle_mode(true);
- btn_shape->set_tooltip_text(RTR("Select a picker shape."));
+ btn_shape->set_tooltip_text(ETR("Select a picker shape."));
current_shape = SHAPE_HSV_RECTANGLE;
@@ -1864,7 +1880,7 @@ ColorPicker::ColorPicker() {
btn_mode->set_flat(false);
mode_hbc->add_child(btn_mode);
btn_mode->set_toggle_mode(true);
- btn_mode->set_tooltip_text(RTR("Select a picker mode."));
+ btn_mode->set_tooltip_text(ETR("Select a picker mode."));
current_mode = MODE_RGB;
@@ -1918,8 +1934,8 @@ ColorPicker::ColorPicker() {
hex_hbc->add_child(c_text);
c_text->set_h_size_flags(SIZE_EXPAND_FILL);
c_text->set_select_all_on_focus(true);
- c_text->set_tooltip_text(RTR("Enter a hex code (\"#ff0000\") or named color (\"red\")."));
- c_text->set_placeholder(RTR("Hex code or named color"));
+ c_text->set_tooltip_text(ETR("Enter a hex code (\"#ff0000\") or named color (\"red\")."));
+ c_text->set_placeholder(ETR("Hex code or named color"));
c_text->connect("text_submitted", callable_mp(this, &ColorPicker::_html_submitted));
c_text->connect("text_changed", callable_mp(this, &ColorPicker::_text_changed));
c_text->connect("focus_exited", callable_mp(this, &ColorPicker::_html_focus_exit));
@@ -1997,7 +2013,7 @@ ColorPicker::ColorPicker() {
btn_add_preset = memnew(Button);
btn_add_preset->set_icon_alignment(HORIZONTAL_ALIGNMENT_CENTER);
- btn_add_preset->set_tooltip_text(RTR("Add current color as a preset."));
+ btn_add_preset->set_tooltip_text(ETR("Add current color as a preset."));
btn_add_preset->connect("pressed", callable_mp(this, &ColorPicker::_add_preset_pressed));
preset_container->add_child(btn_add_preset);
}
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 178af01a3e..abed3cf594 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -302,7 +302,7 @@ void FileDialog::update_dir() {
if (drives->is_visible()) {
if (dir_access->get_current_dir().is_network_share_path()) {
_update_drives(false);
- drives->add_item(RTR("Network"));
+ drives->add_item(ETR("Network"));
drives->set_item_disabled(-1, true);
drives->select(drives->get_item_count() - 1);
} else {
@@ -459,7 +459,7 @@ void FileDialog::_action_pressed() {
}
if (dir_access->file_exists(f)) {
- confirm_save->set_text(vformat(RTR("File \"%s\" already exists.\nDo you want to overwrite it?"), f));
+ confirm_save->set_text(vformat(atr(ETR("File \"%s\" already exists.\nDo you want to overwrite it?")), f));
confirm_save->popup_centered(Size2(250, 80));
} else {
emit_signal(SNAME("file_selected"), f);
@@ -539,10 +539,10 @@ void FileDialog::deselect_all() {
switch (mode) {
case FILE_MODE_OPEN_FILE:
case FILE_MODE_OPEN_FILES:
- set_ok_button_text(RTR("Open"));
+ set_ok_button_text(ETR("Open"));
break;
case FILE_MODE_OPEN_DIR:
- set_ok_button_text(RTR("Select Current Folder"));
+ set_ok_button_text(ETR("Select Current Folder"));
break;
case FILE_MODE_OPEN_ANY:
case FILE_MODE_SAVE_FILE:
@@ -566,7 +566,7 @@ void FileDialog::_tree_selected() {
if (!d["dir"]) {
file->set_text(d["name"]);
} else if (mode == FILE_MODE_OPEN_DIR) {
- set_ok_button_text(RTR("Select This Folder"));
+ set_ok_button_text(ETR("Select This Folder"));
}
get_ok_button()->set_disabled(_is_open_should_be_disabled());
@@ -621,7 +621,7 @@ void FileDialog::update_file_list() {
if (dir_access->is_readable(dir_access->get_current_dir().utf8().get_data())) {
message->hide();
} else {
- message->set_text(RTR("You don't have permission to access contents of this folder."));
+ message->set_text(ETR("You don't have permission to access contents of this folder."));
message->show();
}
@@ -771,7 +771,7 @@ void FileDialog::update_filters() {
all_filters += ", ...";
}
- filter->add_item(RTR("All Recognized") + " (" + all_filters + ")");
+ filter->add_item(atr(ETR("All Recognized")) + " (" + all_filters + ")");
}
for (int i = 0; i < filters.size(); i++) {
String flt = filters[i].get_slice(";", 0).strip_edges();
@@ -783,7 +783,7 @@ void FileDialog::update_filters() {
}
}
- filter->add_item(RTR("All Files") + " (*)");
+ filter->add_item(atr(ETR("All Files")) + " (*)");
}
void FileDialog::clear_filters() {
@@ -896,37 +896,37 @@ void FileDialog::set_file_mode(FileMode p_mode) {
mode = p_mode;
switch (mode) {
case FILE_MODE_OPEN_FILE:
- set_ok_button_text(RTR("Open"));
+ set_ok_button_text(ETR("Open"));
if (mode_overrides_title) {
- set_title(TTRC("Open a File"));
+ set_title(ETR("Open a File"));
}
makedir->hide();
break;
case FILE_MODE_OPEN_FILES:
- set_ok_button_text(RTR("Open"));
+ set_ok_button_text(ETR("Open"));
if (mode_overrides_title) {
- set_title(TTRC("Open File(s)"));
+ set_title(ETR("Open File(s)"));
}
makedir->hide();
break;
case FILE_MODE_OPEN_DIR:
- set_ok_button_text(RTR("Select Current Folder"));
+ set_ok_button_text(ETR("Select Current Folder"));
if (mode_overrides_title) {
- set_title(TTRC("Open a Directory"));
+ set_title(ETR("Open a Directory"));
}
makedir->show();
break;
case FILE_MODE_OPEN_ANY:
- set_ok_button_text(RTR("Open"));
+ set_ok_button_text(ETR("Open"));
if (mode_overrides_title) {
- set_title(TTRC("Open a File or Directory"));
+ set_title(ETR("Open a File or Directory"));
}
makedir->show();
break;
case FILE_MODE_SAVE_FILE:
- set_ok_button_text(RTR("Save"));
+ set_ok_button_text(ETR("Save"));
if (mode_overrides_title) {
- set_title(TTRC("Save a File"));
+ set_title(ETR("Save a File"));
}
makedir->show();
break;
@@ -1389,13 +1389,13 @@ FileDialog::FileDialog() {
dir_prev = memnew(Button);
dir_prev->set_theme_type_variation("FlatButton");
- dir_prev->set_tooltip_text(RTR("Go to previous folder."));
+ dir_prev->set_tooltip_text(ETR("Go to previous folder."));
dir_next = memnew(Button);
dir_next->set_theme_type_variation("FlatButton");
- dir_next->set_tooltip_text(RTR("Go to next folder."));
+ dir_next->set_tooltip_text(ETR("Go to next folder."));
dir_up = memnew(Button);
dir_up->set_theme_type_variation("FlatButton");
- dir_up->set_tooltip_text(RTR("Go to parent folder."));
+ dir_up->set_tooltip_text(ETR("Go to parent folder."));
hbc->add_child(dir_prev);
hbc->add_child(dir_next);
hbc->add_child(dir_up);
@@ -1403,7 +1403,7 @@ FileDialog::FileDialog() {
dir_next->connect("pressed", callable_mp(this, &FileDialog::_go_forward));
dir_up->connect("pressed", callable_mp(this, &FileDialog::_go_up));
- hbc->add_child(memnew(Label(RTR("Path:"))));
+ hbc->add_child(memnew(Label(ETR("Path:"))));
drives_container = memnew(HBoxContainer);
hbc->add_child(drives_container);
@@ -1419,7 +1419,7 @@ FileDialog::FileDialog() {
refresh = memnew(Button);
refresh->set_theme_type_variation("FlatButton");
- refresh->set_tooltip_text(RTR("Refresh files."));
+ refresh->set_tooltip_text(ETR("Refresh files."));
refresh->connect("pressed", callable_mp(this, &FileDialog::update_file_list));
hbc->add_child(refresh);
@@ -1427,7 +1427,7 @@ FileDialog::FileDialog() {
show_hidden->set_theme_type_variation("FlatButton");
show_hidden->set_toggle_mode(true);
show_hidden->set_pressed(is_showing_hidden_files());
- show_hidden->set_tooltip_text(RTR("Toggle the visibility of hidden files."));
+ show_hidden->set_tooltip_text(ETR("Toggle the visibility of hidden files."));
show_hidden->connect("toggled", callable_mp(this, &FileDialog::set_show_hidden_files));
hbc->add_child(show_hidden);
@@ -1436,14 +1436,14 @@ FileDialog::FileDialog() {
makedir = memnew(Button);
makedir->set_theme_type_variation("FlatButton");
- makedir->set_tooltip_text(RTR("Create a new folder."));
+ makedir->set_tooltip_text(ETR("Create a new folder."));
makedir->connect("pressed", callable_mp(this, &FileDialog::_make_dir));
hbc->add_child(makedir);
vbox->add_child(hbc);
tree = memnew(Tree);
tree->set_hide_root(true);
- vbox->add_margin_child(RTR("Directories & Files:"), tree, true);
+ vbox->add_margin_child(ETR("Directories & Files:"), tree, true);
message = memnew(Label);
message->hide();
@@ -1453,7 +1453,7 @@ FileDialog::FileDialog() {
tree->add_child(message);
file_box = memnew(HBoxContainer);
- file_box->add_child(memnew(Label(RTR("File:"))));
+ file_box->add_child(memnew(Label(ETR("File:"))));
file = memnew(LineEdit);
file->set_structured_text_bidi_override(TextServer::STRUCTURED_TEXT_FILE);
file->set_stretch_ratio(4);
@@ -1489,22 +1489,22 @@ FileDialog::FileDialog() {
confirm_save->connect("confirmed", callable_mp(this, &FileDialog::_save_confirm_pressed));
makedialog = memnew(ConfirmationDialog);
- makedialog->set_title(RTR("Create Folder"));
+ makedialog->set_title(ETR("Create Folder"));
VBoxContainer *makevb = memnew(VBoxContainer);
makedialog->add_child(makevb);
makedirname = memnew(LineEdit);
makedirname->set_structured_text_bidi_override(TextServer::STRUCTURED_TEXT_FILE);
- makevb->add_margin_child(RTR("Name:"), makedirname);
+ makevb->add_margin_child(ETR("Name:"), makedirname);
add_child(makedialog, false, INTERNAL_MODE_FRONT);
makedialog->register_text_enter(makedirname);
makedialog->connect("confirmed", callable_mp(this, &FileDialog::_make_dir_confirm));
mkdirerr = memnew(AcceptDialog);
- mkdirerr->set_text(RTR("Could not create folder."));
+ mkdirerr->set_text(ETR("Could not create folder."));
add_child(mkdirerr, false, INTERNAL_MODE_FRONT);
exterr = memnew(AcceptDialog);
- exterr->set_text(RTR("Invalid extension, or empty filename."));
+ exterr->set_text(ETR("Invalid extension, or empty filename."));
add_child(exterr, false, INTERNAL_MODE_FRONT);
update_filters();
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index b7118d595f..056872a4fe 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -2435,7 +2435,7 @@ GraphEdit::GraphEdit() {
zoom_minus_button = memnew(Button);
zoom_minus_button->set_theme_type_variation("FlatButton");
zoom_minus_button->set_visible(show_zoom_buttons);
- zoom_minus_button->set_tooltip_text(RTR("Zoom Out"));
+ zoom_minus_button->set_tooltip_text(ETR("Zoom Out"));
zoom_minus_button->set_focus_mode(FOCUS_NONE);
menu_hbox->add_child(zoom_minus_button);
zoom_minus_button->connect("pressed", callable_mp(this, &GraphEdit::_zoom_minus));
@@ -2443,7 +2443,7 @@ GraphEdit::GraphEdit() {
zoom_reset_button = memnew(Button);
zoom_reset_button->set_theme_type_variation("FlatButton");
zoom_reset_button->set_visible(show_zoom_buttons);
- zoom_reset_button->set_tooltip_text(RTR("Zoom Reset"));
+ zoom_reset_button->set_tooltip_text(ETR("Zoom Reset"));
zoom_reset_button->set_focus_mode(FOCUS_NONE);
menu_hbox->add_child(zoom_reset_button);
zoom_reset_button->connect("pressed", callable_mp(this, &GraphEdit::_zoom_reset));
@@ -2451,7 +2451,7 @@ GraphEdit::GraphEdit() {
zoom_plus_button = memnew(Button);
zoom_plus_button->set_theme_type_variation("FlatButton");
zoom_plus_button->set_visible(show_zoom_buttons);
- zoom_plus_button->set_tooltip_text(RTR("Zoom In"));
+ zoom_plus_button->set_tooltip_text(ETR("Zoom In"));
zoom_plus_button->set_focus_mode(FOCUS_NONE);
menu_hbox->add_child(zoom_plus_button);
zoom_plus_button->connect("pressed", callable_mp(this, &GraphEdit::_zoom_plus));
@@ -2463,7 +2463,7 @@ GraphEdit::GraphEdit() {
toggle_grid_button->set_visible(show_grid_buttons);
toggle_grid_button->set_toggle_mode(true);
toggle_grid_button->set_pressed(true);
- toggle_grid_button->set_tooltip_text(RTR("Toggle the visual grid."));
+ toggle_grid_button->set_tooltip_text(ETR("Toggle the visual grid."));
toggle_grid_button->set_focus_mode(FOCUS_NONE);
menu_hbox->add_child(toggle_grid_button);
toggle_grid_button->connect("pressed", callable_mp(this, &GraphEdit::_show_grid_toggled));
@@ -2472,7 +2472,7 @@ GraphEdit::GraphEdit() {
toggle_snapping_button->set_theme_type_variation("FlatButton");
toggle_snapping_button->set_visible(show_grid_buttons);
toggle_snapping_button->set_toggle_mode(true);
- toggle_snapping_button->set_tooltip_text(RTR("Toggle snapping to the grid."));
+ toggle_snapping_button->set_tooltip_text(ETR("Toggle snapping to the grid."));
toggle_snapping_button->set_pressed(snapping_enabled);
toggle_snapping_button->set_focus_mode(FOCUS_NONE);
menu_hbox->add_child(toggle_snapping_button);
@@ -2484,7 +2484,7 @@ GraphEdit::GraphEdit() {
snapping_distance_spinbox->set_max(GRID_MAX_SNAPPING_DISTANCE);
snapping_distance_spinbox->set_step(1);
snapping_distance_spinbox->set_value(snapping_distance);
- snapping_distance_spinbox->set_tooltip_text(RTR("Change the snapping distance."));
+ snapping_distance_spinbox->set_tooltip_text(ETR("Change the snapping distance."));
menu_hbox->add_child(snapping_distance_spinbox);
snapping_distance_spinbox->connect("value_changed", callable_mp(this, &GraphEdit::_snapping_distance_changed));
@@ -2494,7 +2494,7 @@ GraphEdit::GraphEdit() {
minimap_button->set_theme_type_variation("FlatButton");
minimap_button->set_visible(show_minimap_button);
minimap_button->set_toggle_mode(true);
- minimap_button->set_tooltip_text(RTR("Toggle the graph minimap."));
+ minimap_button->set_tooltip_text(ETR("Toggle the graph minimap."));
minimap_button->set_pressed(show_grid);
minimap_button->set_focus_mode(FOCUS_NONE);
menu_hbox->add_child(minimap_button);
@@ -2506,7 +2506,7 @@ GraphEdit::GraphEdit() {
arrange_button->connect("pressed", callable_mp(this, &GraphEdit::arrange_nodes));
arrange_button->set_focus_mode(FOCUS_NONE);
menu_hbox->add_child(arrange_button);
- arrange_button->set_tooltip_text(RTR("Automatically arrange selected nodes."));
+ arrange_button->set_tooltip_text(ETR("Automatically arrange selected nodes."));
// Minimap.
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 75474c060e..aa6d52cc36 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -2406,45 +2406,45 @@ void LineEdit::_generate_context_menu() {
add_child(menu, false, INTERNAL_MODE_FRONT);
menu_dir = memnew(PopupMenu);
- menu_dir->add_radio_check_item(RTR("Same as Layout Direction"), MENU_DIR_INHERITED);
- menu_dir->add_radio_check_item(RTR("Auto-Detect Direction"), MENU_DIR_AUTO);
- menu_dir->add_radio_check_item(RTR("Left-to-Right"), MENU_DIR_LTR);
- menu_dir->add_radio_check_item(RTR("Right-to-Left"), MENU_DIR_RTL);
+ menu_dir->add_radio_check_item(ETR("Same as Layout Direction"), MENU_DIR_INHERITED);
+ menu_dir->add_radio_check_item(ETR("Auto-Detect Direction"), MENU_DIR_AUTO);
+ menu_dir->add_radio_check_item(ETR("Left-to-Right"), MENU_DIR_LTR);
+ menu_dir->add_radio_check_item(ETR("Right-to-Left"), MENU_DIR_RTL);
menu_ctl = memnew(PopupMenu);
- menu_ctl->add_item(RTR("Left-to-Right Mark (LRM)"), MENU_INSERT_LRM);
- menu_ctl->add_item(RTR("Right-to-Left Mark (RLM)"), MENU_INSERT_RLM);
- menu_ctl->add_item(RTR("Start of Left-to-Right Embedding (LRE)"), MENU_INSERT_LRE);
- menu_ctl->add_item(RTR("Start of Right-to-Left Embedding (RLE)"), MENU_INSERT_RLE);
- menu_ctl->add_item(RTR("Start of Left-to-Right Override (LRO)"), MENU_INSERT_LRO);
- menu_ctl->add_item(RTR("Start of Right-to-Left Override (RLO)"), MENU_INSERT_RLO);
- menu_ctl->add_item(RTR("Pop Direction Formatting (PDF)"), MENU_INSERT_PDF);
+ menu_ctl->add_item(ETR("Left-to-Right Mark (LRM)"), MENU_INSERT_LRM);
+ menu_ctl->add_item(ETR("Right-to-Left Mark (RLM)"), MENU_INSERT_RLM);
+ menu_ctl->add_item(ETR("Start of Left-to-Right Embedding (LRE)"), MENU_INSERT_LRE);
+ menu_ctl->add_item(ETR("Start of Right-to-Left Embedding (RLE)"), MENU_INSERT_RLE);
+ menu_ctl->add_item(ETR("Start of Left-to-Right Override (LRO)"), MENU_INSERT_LRO);
+ menu_ctl->add_item(ETR("Start of Right-to-Left Override (RLO)"), MENU_INSERT_RLO);
+ menu_ctl->add_item(ETR("Pop Direction Formatting (PDF)"), MENU_INSERT_PDF);
menu_ctl->add_separator();
- menu_ctl->add_item(RTR("Arabic Letter Mark (ALM)"), MENU_INSERT_ALM);
- menu_ctl->add_item(RTR("Left-to-Right Isolate (LRI)"), MENU_INSERT_LRI);
- menu_ctl->add_item(RTR("Right-to-Left Isolate (RLI)"), MENU_INSERT_RLI);
- menu_ctl->add_item(RTR("First Strong Isolate (FSI)"), MENU_INSERT_FSI);
- menu_ctl->add_item(RTR("Pop Direction Isolate (PDI)"), MENU_INSERT_PDI);
+ menu_ctl->add_item(ETR("Arabic Letter Mark (ALM)"), MENU_INSERT_ALM);
+ menu_ctl->add_item(ETR("Left-to-Right Isolate (LRI)"), MENU_INSERT_LRI);
+ menu_ctl->add_item(ETR("Right-to-Left Isolate (RLI)"), MENU_INSERT_RLI);
+ menu_ctl->add_item(ETR("First Strong Isolate (FSI)"), MENU_INSERT_FSI);
+ menu_ctl->add_item(ETR("Pop Direction Isolate (PDI)"), MENU_INSERT_PDI);
menu_ctl->add_separator();
- menu_ctl->add_item(RTR("Zero-Width Joiner (ZWJ)"), MENU_INSERT_ZWJ);
- menu_ctl->add_item(RTR("Zero-Width Non-Joiner (ZWNJ)"), MENU_INSERT_ZWNJ);
- menu_ctl->add_item(RTR("Word Joiner (WJ)"), MENU_INSERT_WJ);
- menu_ctl->add_item(RTR("Soft Hyphen (SHY)"), MENU_INSERT_SHY);
-
- menu->add_item(RTR("Cut"), MENU_CUT);
- menu->add_item(RTR("Copy"), MENU_COPY);
- menu->add_item(RTR("Paste"), MENU_PASTE);
+ menu_ctl->add_item(ETR("Zero-Width Joiner (ZWJ)"), MENU_INSERT_ZWJ);
+ menu_ctl->add_item(ETR("Zero-Width Non-Joiner (ZWNJ)"), MENU_INSERT_ZWNJ);
+ menu_ctl->add_item(ETR("Word Joiner (WJ)"), MENU_INSERT_WJ);
+ menu_ctl->add_item(ETR("Soft Hyphen (SHY)"), MENU_INSERT_SHY);
+
+ menu->add_item(ETR("Cut"), MENU_CUT);
+ menu->add_item(ETR("Copy"), MENU_COPY);
+ menu->add_item(ETR("Paste"), MENU_PASTE);
menu->add_separator();
- menu->add_item(RTR("Select All"), MENU_SELECT_ALL);
- menu->add_item(RTR("Clear"), MENU_CLEAR);
+ menu->add_item(ETR("Select All"), MENU_SELECT_ALL);
+ menu->add_item(ETR("Clear"), MENU_CLEAR);
menu->add_separator();
- menu->add_item(RTR("Undo"), MENU_UNDO);
- menu->add_item(RTR("Redo"), MENU_REDO);
+ menu->add_item(ETR("Undo"), MENU_UNDO);
+ menu->add_item(ETR("Redo"), MENU_REDO);
menu->add_separator();
- menu->add_submenu_node_item(RTR("Text Writing Direction"), menu_dir, MENU_SUBMENU_TEXT_DIR);
+ menu->add_submenu_node_item(ETR("Text Writing Direction"), menu_dir, MENU_SUBMENU_TEXT_DIR);
menu->add_separator();
- menu->add_check_item(RTR("Display Control Characters"), MENU_DISPLAY_UCC);
- menu->add_submenu_node_item(RTR("Insert Control Character"), menu_ctl, MENU_SUBMENU_INSERT_UCC);
+ menu->add_check_item(ETR("Display Control Characters"), MENU_DISPLAY_UCC);
+ menu->add_submenu_node_item(ETR("Insert Control Character"), menu_ctl, MENU_SUBMENU_INSERT_UCC);
menu->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
menu_dir->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 4f25fed335..1b88caef15 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -6270,8 +6270,8 @@ void RichTextLabel::_generate_context_menu() {
add_child(menu, false, INTERNAL_MODE_FRONT);
menu->connect("id_pressed", callable_mp(this, &RichTextLabel::menu_option));
- menu->add_item(RTR("Copy"), MENU_COPY);
- menu->add_item(RTR("Select All"), MENU_SELECT_ALL);
+ menu->add_item(ETR("Copy"), MENU_COPY);
+ menu->add_item(ETR("Select All"), MENU_SELECT_ALL);
}
void RichTextLabel::_update_context_menu() {
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index d482495ca0..70acaf7adf 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -83,6 +83,7 @@ void SpinBox::_text_submitted(const String &p_string) {
err = expr->parse(text);
if (err != OK) {
+ _update_text();
return;
}
}
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 79a5f2b557..c2716c9ef6 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -6873,45 +6873,45 @@ void TextEdit::_generate_context_menu() {
add_child(menu, false, INTERNAL_MODE_FRONT);
menu_dir = memnew(PopupMenu);
- menu_dir->add_radio_check_item(RTR("Same as Layout Direction"), MENU_DIR_INHERITED);
- menu_dir->add_radio_check_item(RTR("Auto-Detect Direction"), MENU_DIR_AUTO);
- menu_dir->add_radio_check_item(RTR("Left-to-Right"), MENU_DIR_LTR);
- menu_dir->add_radio_check_item(RTR("Right-to-Left"), MENU_DIR_RTL);
+ menu_dir->add_radio_check_item(ETR("Same as Layout Direction"), MENU_DIR_INHERITED);
+ menu_dir->add_radio_check_item(ETR("Auto-Detect Direction"), MENU_DIR_AUTO);
+ menu_dir->add_radio_check_item(ETR("Left-to-Right"), MENU_DIR_LTR);
+ menu_dir->add_radio_check_item(ETR("Right-to-Left"), MENU_DIR_RTL);
menu_ctl = memnew(PopupMenu);
- menu_ctl->add_item(RTR("Left-to-Right Mark (LRM)"), MENU_INSERT_LRM);
- menu_ctl->add_item(RTR("Right-to-Left Mark (RLM)"), MENU_INSERT_RLM);
- menu_ctl->add_item(RTR("Start of Left-to-Right Embedding (LRE)"), MENU_INSERT_LRE);
- menu_ctl->add_item(RTR("Start of Right-to-Left Embedding (RLE)"), MENU_INSERT_RLE);
- menu_ctl->add_item(RTR("Start of Left-to-Right Override (LRO)"), MENU_INSERT_LRO);
- menu_ctl->add_item(RTR("Start of Right-to-Left Override (RLO)"), MENU_INSERT_RLO);
- menu_ctl->add_item(RTR("Pop Direction Formatting (PDF)"), MENU_INSERT_PDF);
+ menu_ctl->add_item(ETR("Left-to-Right Mark (LRM)"), MENU_INSERT_LRM);
+ menu_ctl->add_item(ETR("Right-to-Left Mark (RLM)"), MENU_INSERT_RLM);
+ menu_ctl->add_item(ETR("Start of Left-to-Right Embedding (LRE)"), MENU_INSERT_LRE);
+ menu_ctl->add_item(ETR("Start of Right-to-Left Embedding (RLE)"), MENU_INSERT_RLE);
+ menu_ctl->add_item(ETR("Start of Left-to-Right Override (LRO)"), MENU_INSERT_LRO);
+ menu_ctl->add_item(ETR("Start of Right-to-Left Override (RLO)"), MENU_INSERT_RLO);
+ menu_ctl->add_item(ETR("Pop Direction Formatting (PDF)"), MENU_INSERT_PDF);
menu_ctl->add_separator();
- menu_ctl->add_item(RTR("Arabic Letter Mark (ALM)"), MENU_INSERT_ALM);
- menu_ctl->add_item(RTR("Left-to-Right Isolate (LRI)"), MENU_INSERT_LRI);
- menu_ctl->add_item(RTR("Right-to-Left Isolate (RLI)"), MENU_INSERT_RLI);
- menu_ctl->add_item(RTR("First Strong Isolate (FSI)"), MENU_INSERT_FSI);
- menu_ctl->add_item(RTR("Pop Direction Isolate (PDI)"), MENU_INSERT_PDI);
+ menu_ctl->add_item(ETR("Arabic Letter Mark (ALM)"), MENU_INSERT_ALM);
+ menu_ctl->add_item(ETR("Left-to-Right Isolate (LRI)"), MENU_INSERT_LRI);
+ menu_ctl->add_item(ETR("Right-to-Left Isolate (RLI)"), MENU_INSERT_RLI);
+ menu_ctl->add_item(ETR("First Strong Isolate (FSI)"), MENU_INSERT_FSI);
+ menu_ctl->add_item(ETR("Pop Direction Isolate (PDI)"), MENU_INSERT_PDI);
menu_ctl->add_separator();
- menu_ctl->add_item(RTR("Zero-Width Joiner (ZWJ)"), MENU_INSERT_ZWJ);
- menu_ctl->add_item(RTR("Zero-Width Non-Joiner (ZWNJ)"), MENU_INSERT_ZWNJ);
- menu_ctl->add_item(RTR("Word Joiner (WJ)"), MENU_INSERT_WJ);
- menu_ctl->add_item(RTR("Soft Hyphen (SHY)"), MENU_INSERT_SHY);
-
- menu->add_item(RTR("Cut"), MENU_CUT);
- menu->add_item(RTR("Copy"), MENU_COPY);
- menu->add_item(RTR("Paste"), MENU_PASTE);
+ menu_ctl->add_item(ETR("Zero-Width Joiner (ZWJ)"), MENU_INSERT_ZWJ);
+ menu_ctl->add_item(ETR("Zero-Width Non-Joiner (ZWNJ)"), MENU_INSERT_ZWNJ);
+ menu_ctl->add_item(ETR("Word Joiner (WJ)"), MENU_INSERT_WJ);
+ menu_ctl->add_item(ETR("Soft Hyphen (SHY)"), MENU_INSERT_SHY);
+
+ menu->add_item(ETR("Cut"), MENU_CUT);
+ menu->add_item(ETR("Copy"), MENU_COPY);
+ menu->add_item(ETR("Paste"), MENU_PASTE);
menu->add_separator();
- menu->add_item(RTR("Select All"), MENU_SELECT_ALL);
- menu->add_item(RTR("Clear"), MENU_CLEAR);
+ menu->add_item(ETR("Select All"), MENU_SELECT_ALL);
+ menu->add_item(ETR("Clear"), MENU_CLEAR);
menu->add_separator();
- menu->add_item(RTR("Undo"), MENU_UNDO);
- menu->add_item(RTR("Redo"), MENU_REDO);
+ menu->add_item(ETR("Undo"), MENU_UNDO);
+ menu->add_item(ETR("Redo"), MENU_REDO);
menu->add_separator();
- menu->add_submenu_node_item(RTR("Text Writing Direction"), menu_dir, MENU_SUBMENU_TEXT_DIR);
+ menu->add_submenu_node_item(ETR("Text Writing Direction"), menu_dir, MENU_SUBMENU_TEXT_DIR);
menu->add_separator();
- menu->add_check_item(RTR("Display Control Characters"), MENU_DISPLAY_UCC);
- menu->add_submenu_node_item(RTR("Insert Control Character"), menu_ctl, MENU_SUBMENU_INSERT_UCC);
+ menu->add_check_item(ETR("Display Control Characters"), MENU_DISPLAY_UCC);
+ menu->add_submenu_node_item(ETR("Insert Control Character"), menu_ctl, MENU_SUBMENU_INSERT_UCC);
menu->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
menu_dir->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index bf456cd048..0c841dabbe 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -120,6 +120,10 @@ void TreeItem::_change_tree(Tree *p_tree) {
}
if (tree->selected_item == this) {
+ for (int i = 0; i < tree->selected_item->cells.size(); i++) {
+ tree->selected_item->cells.write[i].selected = false;
+ }
+
tree->selected_item = nullptr;
}
@@ -1945,7 +1949,7 @@ void Tree::update_item_cell(TreeItem *p_item, int p_col) {
int option = (int)p_item->cells[p_col].val;
- valtext = RTR("(Other)");
+ valtext = atr(ETR("(Other)"));
Vector<String> strings = p_item->cells[p_col].text.split(",");
for (int j = 0; j < strings.size(); j++) {
int value = j;
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 67f8a97212..9fe4fc88b9 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2958,17 +2958,24 @@ void Node::replace_by(Node *p_node, bool p_keep_groups) {
remove_child(child);
if (!child->is_owned_by_parent()) {
// add the custom children to the p_node
+ Node *child_owner = child->get_owner() == this ? p_node : child->get_owner();
+ child->set_owner(nullptr);
p_node->add_child(child);
+ child->set_owner(child_owner);
}
}
p_node->set_owner(owner);
for (Node *E : owned) {
- E->set_owner(p_node);
+ if (E->data.owner != p_node) {
+ E->set_owner(p_node);
+ }
}
for (Node *E : owned_by_owner) {
- E->set_owner(owner);
+ if (E->data.owner != owner) {
+ E->set_owner(owner);
+ }
}
p_node->set_scene_file_path(get_scene_file_path());
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 1dcf9acda3..f596114d99 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1447,7 +1447,7 @@ String Viewport::_gui_get_tooltip(Control *p_control, const Vector2 &p_pos, Cont
String tooltip;
while (p_control) {
- tooltip = p_control->get_tooltip(pos);
+ tooltip = p_control->atr(p_control->get_tooltip(pos));
// Temporary solution for PopupMenus.
PopupMenu *menu = Object::cast_to<PopupMenu>(this);
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index f1c94f53da..9f741db7da 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -279,6 +279,7 @@
#include "scene/3d/visible_on_screen_notifier_3d.h"
#include "scene/3d/voxel_gi.h"
#include "scene/3d/world_environment.h"
+#include "scene/3d/xr_body_modifier_3d.h"
#include "scene/3d/xr_face_modifier_3d.h"
#include "scene/3d/xr_hand_modifier_3d.h"
#include "scene/3d/xr_nodes.h"
@@ -541,6 +542,7 @@ void register_scene_types() {
GDREGISTER_CLASS(XRController3D);
GDREGISTER_CLASS(XRAnchor3D);
GDREGISTER_CLASS(XROrigin3D);
+ GDREGISTER_CLASS(XRBodyModifier3D);
GDREGISTER_CLASS(XRHandModifier3D);
GDREGISTER_CLASS(XRFaceModifier3D);
GDREGISTER_CLASS(MeshInstance3D);
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index a59ac9b56d..a5759dc117 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -348,35 +348,16 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
//handle resources that are local to scene by duplicating them if needed
Ref<Resource> res = value;
if (res.is_valid()) {
- if (res->is_local_to_scene()) {
- if (n.instance >= 0) { // For the root node of a sub-scene, treat it as part of the sub-scene.
- value = get_remap_resource(res, resources_local_to_sub_scene, node->get(snames[nprops[j].name]), node);
- } else {
- HashMap<Ref<Resource>, Ref<Resource>>::Iterator E = resources_local_to_scene.find(res);
- Node *base = i == 0 ? node : ret_nodes[0];
- if (E) {
- value = E->value;
- } else {
- if (p_edit_state == GEN_EDIT_STATE_MAIN) {
- //for the main scene, use the resource as is
- res->configure_for_local_scene(base, resources_local_to_scene);
- resources_local_to_scene[res] = res;
- } else {
- //for instances, a copy must be made
- Ref<Resource> local_dupe = res->duplicate_for_local_scene(base, resources_local_to_scene);
- resources_local_to_scene[res] = local_dupe;
- value = local_dupe;
- }
- }
- }
- //must make a copy, because this res is local to scene
- }
+ value = make_local_resource(value, n, resources_local_to_sub_scene, node, snames[nprops[j].name], resources_local_to_scene, i, ret_nodes, p_edit_state);
}
}
if (value.get_type() == Variant::ARRAY) {
Array set_array = value;
+ value = setup_resources_in_array(set_array, n, resources_local_to_sub_scene, node, snames[nprops[j].name], resources_local_to_scene, i, ret_nodes, p_edit_state);
+
bool is_get_valid = false;
Variant get_value = node->get(snames[nprops[j].name], &is_get_valid);
+
if (is_get_valid && get_value.get_type() == Variant::ARRAY) {
Array get_array = get_value;
if (!set_array.is_same_typed(get_array)) {
@@ -384,8 +365,26 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
}
}
}
- if (p_edit_state == GEN_EDIT_STATE_INSTANCE && value.get_type() != Variant::OBJECT) {
- value = value.duplicate(true); // Duplicate arrays and dictionaries for the editor
+ if (value.get_type() == Variant::DICTIONARY) {
+ Dictionary dictionary = value;
+ const Array keys = dictionary.keys();
+ const Array values = dictionary.values();
+
+ if (has_local_resource(values) || has_local_resource(keys)) {
+ Array duplicated_keys = keys.duplicate(true);
+ Array duplicated_values = values.duplicate(true);
+
+ duplicated_keys = setup_resources_in_array(duplicated_keys, n, resources_local_to_sub_scene, node, snames[nprops[j].name], resources_local_to_scene, i, ret_nodes, p_edit_state);
+ duplicated_values = setup_resources_in_array(duplicated_values, n, resources_local_to_sub_scene, node, snames[nprops[j].name], resources_local_to_scene, i, ret_nodes, p_edit_state);
+
+ dictionary.clear();
+
+ for (int dictionary_index = 0; dictionary_index < keys.size(); dictionary_index++) {
+ dictionary[duplicated_keys[dictionary_index]] = duplicated_values[dictionary_index];
+ }
+
+ value = dictionary;
+ }
}
bool set_valid = true;
@@ -400,6 +399,9 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
if (set_valid) {
node->set(snames[nprops[j].name], value, &valid);
}
+ if (p_edit_state == GEN_EDIT_STATE_INSTANCE && value.get_type() != Variant::OBJECT) {
+ value = value.duplicate(true); // Duplicate arrays and dictionaries for the editor.
+ }
}
}
if (!missing_resource_properties.is_empty()) {
@@ -587,6 +589,50 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
return ret_nodes[0];
}
+Variant SceneState::make_local_resource(Variant &p_value, const SceneState::NodeData &p_node_data, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_sub_scene, Node *p_node, const StringName p_sname, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_scene, int p_i, Node **p_ret_nodes, SceneState::GenEditState p_edit_state) const {
+ Ref<Resource> res = p_value;
+ if (res.is_null() || !res->is_local_to_scene()) {
+ return p_value;
+ }
+
+ if (p_node_data.instance >= 0) { // For the root node of a sub-scene, treat it as part of the sub-scene.
+ return get_remap_resource(res, p_resources_local_to_sub_scene, p_node->get(p_sname), p_node);
+ } else {
+ HashMap<Ref<Resource>, Ref<Resource>>::Iterator E = p_resources_local_to_scene.find(res);
+ Node *base = p_i == 0 ? p_node : p_ret_nodes[0];
+ if (E) {
+ return E->value;
+ } else if (p_edit_state == GEN_EDIT_STATE_MAIN) { // For the main scene, use the resource as is
+ res->configure_for_local_scene(base, p_resources_local_to_scene);
+ p_resources_local_to_scene[res] = res;
+ return res;
+ } else { // For instances, a copy must be made.
+ Ref<Resource> local_dupe = res->duplicate_for_local_scene(base, p_resources_local_to_scene);
+ p_resources_local_to_scene[res] = local_dupe;
+ return local_dupe;
+ }
+ }
+}
+
+Array SceneState::setup_resources_in_array(Array &p_array_to_scan, const SceneState::NodeData &p_n, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_sub_scene, Node *p_node, const StringName p_sname, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_scene, int p_i, Node **p_ret_nodes, SceneState::GenEditState p_edit_state) const {
+ for (int i = 0; i < p_array_to_scan.size(); i++) {
+ if (p_array_to_scan[i].get_type() == Variant::OBJECT) {
+ p_array_to_scan[i] = make_local_resource(p_array_to_scan[i], p_n, p_resources_local_to_sub_scene, p_node, p_sname, p_resources_local_to_scene, p_i, p_ret_nodes, p_edit_state);
+ }
+ }
+ return p_array_to_scan;
+}
+
+bool SceneState::has_local_resource(const Array &p_array) const {
+ for (int i = 0; i < p_array.size(); i++) {
+ Ref<Resource> res = p_array[i];
+ if (res.is_valid() && res->is_local_to_scene()) {
+ return true;
+ }
+ }
+ return false;
+}
+
static int _nm_get_string(const String &p_string, HashMap<StringName, int> &name_map) {
if (name_map.has(p_string)) {
return name_map[p_string];
@@ -751,8 +797,18 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Has
if (!pinned_props.has(name)) {
bool is_valid_default = false;
Variant default_value = PropertyUtils::get_property_default_value(p_node, name, &is_valid_default, &states_stack, true);
+
if (is_valid_default && !PropertyUtils::is_property_value_different(value, default_value)) {
- continue;
+ if (value.get_type() == Variant::ARRAY && has_local_resource(value)) {
+ // Save anyway
+ } else if (value.get_type() == Variant::DICTIONARY) {
+ Dictionary dictionary = value;
+ if (!has_local_resource(dictionary.values()) && !has_local_resource(dictionary.keys())) {
+ continue;
+ }
+ } else {
+ continue;
+ }
}
}
diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h
index e6cbc3e16b..2c8196f5e3 100644
--- a/scene/resources/packed_scene.h
+++ b/scene/resources/packed_scene.h
@@ -157,6 +157,10 @@ public:
bool can_instantiate() const;
Node *instantiate(GenEditState p_edit_state) const;
+ Array setup_resources_in_array(Array &array_to_scan, const SceneState::NodeData &n, HashMap<Ref<Resource>, Ref<Resource>> &resources_local_to_sub_scene, Node *node, const StringName sname, HashMap<Ref<Resource>, Ref<Resource>> &resources_local_to_scene, int i, Node **ret_nodes, SceneState::GenEditState p_edit_state) const;
+ Variant make_local_resource(Variant &value, const SceneState::NodeData &p_node_data, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_sub_scene, Node *p_node, const StringName p_sname, HashMap<Ref<Resource>, Ref<Resource>> &p_resources_local_to_scene, int p_i, Node **p_ret_nodes, SceneState::GenEditState p_edit_state) const;
+ bool has_local_resource(const Array &p_array) const;
+
Ref<SceneState> get_base_scene_state() const;
void update_instance_resource(String p_path, Ref<PackedScene> p_packed_scene);
diff --git a/scene/theme/default_theme.cpp b/scene/theme/default_theme.cpp
index 634b32c9f6..ba0f29cd16 100644
--- a/scene/theme/default_theme.cpp
+++ b/scene/theme/default_theme.cpp
@@ -174,7 +174,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_focus_color", "Button", control_font_focus_color);
theme->set_color("font_hover_pressed_color", "Button", control_font_pressed_color);
theme->set_color("font_disabled_color", "Button", control_font_disabled_color);
- theme->set_color("font_outline_color", "Button", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "Button", Color(0, 0, 0));
theme->set_color("icon_normal_color", "Button", Color(1, 1, 1, 1));
theme->set_color("icon_pressed_color", "Button", Color(1, 1, 1, 1));
@@ -202,7 +202,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_focus_color", "MenuBar", control_font_focus_color);
theme->set_color("font_hover_pressed_color", "MenuBar", control_font_pressed_color);
theme->set_color("font_disabled_color", "MenuBar", control_font_disabled_color);
- theme->set_color("font_outline_color", "MenuBar", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "MenuBar", Color(0, 0, 0));
theme->set_constant("h_separation", "MenuBar", Math::round(4 * scale));
@@ -217,7 +217,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_pressed_color", "LinkButton", control_font_pressed_color);
theme->set_color("font_hover_color", "LinkButton", control_font_hover_color);
theme->set_color("font_focus_color", "LinkButton", control_font_focus_color);
- theme->set_color("font_outline_color", "LinkButton", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "LinkButton", Color(0, 0, 0));
theme->set_constant("outline_size", "LinkButton", 0);
theme->set_constant("underline_spacing", "LinkButton", Math::round(2 * scale));
@@ -256,7 +256,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_hover_pressed_color", "OptionButton", control_font_pressed_color);
theme->set_color("font_focus_color", "OptionButton", control_font_focus_color);
theme->set_color("font_disabled_color", "OptionButton", control_font_disabled_color);
- theme->set_color("font_outline_color", "OptionButton", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "OptionButton", Color(0, 0, 0));
theme->set_constant("h_separation", "OptionButton", Math::round(4 * scale));
theme->set_constant("arrow_margin", "OptionButton", Math::round(4 * scale));
@@ -279,7 +279,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_hover_color", "MenuButton", control_font_hover_color);
theme->set_color("font_focus_color", "MenuButton", control_font_focus_color);
theme->set_color("font_disabled_color", "MenuButton", Color(1, 1, 1, 0.3));
- theme->set_color("font_outline_color", "MenuButton", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "MenuButton", Color(0, 0, 0));
theme->set_constant("h_separation", "MenuButton", Math::round(4 * scale));
theme->set_constant("outline_size", "MenuButton", 0);
@@ -316,7 +316,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_hover_pressed_color", "CheckBox", control_font_pressed_color);
theme->set_color("font_focus_color", "CheckBox", control_font_focus_color);
theme->set_color("font_disabled_color", "CheckBox", control_font_disabled_color);
- theme->set_color("font_outline_color", "CheckBox", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "CheckBox", Color(0, 0, 0));
theme->set_constant("h_separation", "CheckBox", Math::round(4 * scale));
theme->set_constant("check_v_offset", "CheckBox", 0);
@@ -353,7 +353,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_hover_pressed_color", "CheckButton", control_font_pressed_color);
theme->set_color("font_focus_color", "CheckButton", control_font_focus_color);
theme->set_color("font_disabled_color", "CheckButton", control_font_disabled_color);
- theme->set_color("font_outline_color", "CheckButton", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "CheckButton", Color(0, 0, 0));
theme->set_constant("h_separation", "CheckButton", Math::round(4 * scale));
theme->set_constant("check_v_offset", "CheckButton", 0);
@@ -389,7 +389,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_color", "Label", Color(1, 1, 1));
theme->set_color("font_shadow_color", "Label", Color(0, 0, 0, 0));
- theme->set_color("font_outline_color", "Label", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "Label", Color(0, 0, 0));
theme->set_constant("shadow_offset_x", "Label", Math::round(1 * scale));
theme->set_constant("shadow_offset_y", "Label", Math::round(1 * scale));
@@ -429,7 +429,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_selected_color", "LineEdit", control_font_pressed_color);
theme->set_color("font_uneditable_color", "LineEdit", control_font_disabled_color);
theme->set_color("font_placeholder_color", "LineEdit", control_font_placeholder_color);
- theme->set_color("font_outline_color", "LineEdit", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "LineEdit", Color(0, 0, 0));
theme->set_color("caret_color", "LineEdit", control_font_hover_color);
theme->set_color("selection_color", "LineEdit", control_selection_color);
theme->set_color("clear_button_color", "LineEdit", control_font_color);
@@ -450,7 +450,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "ProgressBar", -1);
theme->set_color("font_color", "ProgressBar", control_font_hover_color);
- theme->set_color("font_outline_color", "ProgressBar", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "ProgressBar", Color(0, 0, 0));
theme->set_constant("outline_size", "ProgressBar", 0);
@@ -471,7 +471,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_selected_color", "TextEdit", Color(0, 0, 0, 0));
theme->set_color("font_readonly_color", "TextEdit", control_font_disabled_color);
theme->set_color("font_placeholder_color", "TextEdit", control_font_placeholder_color);
- theme->set_color("font_outline_color", "TextEdit", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "TextEdit", Color(0, 0, 0));
theme->set_color("selection_color", "TextEdit", control_selection_color);
theme->set_color("current_line_color", "TextEdit", Color(0.25, 0.25, 0.26, 0.8));
theme->set_color("caret_color", "TextEdit", control_font_color);
@@ -515,7 +515,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_selected_color", "CodeEdit", Color(0, 0, 0, 0));
theme->set_color("font_readonly_color", "CodeEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
theme->set_color("font_placeholder_color", "CodeEdit", control_font_placeholder_color);
- theme->set_color("font_outline_color", "CodeEdit", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "CodeEdit", Color(0, 0, 0));
theme->set_color("selection_color", "CodeEdit", control_selection_color);
theme->set_color("bookmark_color", "CodeEdit", Color(0.5, 0.64, 1, 0.8));
theme->set_color("breakpoint_color", "CodeEdit", Color(0.9, 0.29, 0.3));
@@ -626,7 +626,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("title_font", "Window", Ref<Font>());
theme->set_font_size("title_font_size", "Window", -1);
theme->set_color("title_color", "Window", control_font_color);
- theme->set_color("title_outline_modulate", "Window", Color(1, 1, 1));
+ theme->set_color("title_outline_modulate", "Window", Color(0, 0, 0));
theme->set_constant("title_outline_size", "Window", 0);
theme->set_constant("title_height", "Window", 36 * scale);
theme->set_constant("resize_margin", "Window", Math::round(4 * scale));
@@ -706,8 +706,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_disabled_color", "PopupMenu", Color(0.4, 0.4, 0.4, 0.8));
theme->set_color("font_hover_color", "PopupMenu", control_font_color);
theme->set_color("font_separator_color", "PopupMenu", control_font_color);
- theme->set_color("font_outline_color", "PopupMenu", Color(1, 1, 1));
- theme->set_color("font_separator_outline_color", "PopupMenu", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "PopupMenu", Color(0, 0, 0));
+ theme->set_color("font_separator_outline_color", "PopupMenu", Color(0, 0, 0));
theme->set_constant("indent", "PopupMenu", Math::round(10 * scale));
theme->set_constant("h_separation", "PopupMenu", Math::round(4 * scale));
@@ -750,7 +750,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "GraphNodeTitleLabel", -1);
theme->set_color("font_color", "GraphNodeTitleLabel", control_font_color);
theme->set_color("font_shadow_color", "GraphNodeTitleLabel", Color(0, 0, 0, 0));
- theme->set_color("font_outline_color", "GraphNodeTitleLabel", control_font_color);
+ theme->set_color("font_outline_color", "GraphNodeTitleLabel", Color(0, 0, 0));
theme->set_constant("shadow_offset_x", "GraphNodeTitleLabel", Math::round(1 * scale));
theme->set_constant("shadow_offset_y", "GraphNodeTitleLabel", Math::round(1 * scale));
theme->set_constant("outline_size", "GraphNodeTitleLabel", 0);
@@ -794,7 +794,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_color", "Tree", control_font_low_color);
theme->set_color("font_selected_color", "Tree", control_font_pressed_color);
theme->set_color("font_disabled_color", "Tree", control_font_disabled_color);
- theme->set_color("font_outline_color", "Tree", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "Tree", Color(0, 0, 0));
theme->set_color("guide_color", "Tree", Color(0.7, 0.7, 0.7, 0.25));
theme->set_color("drop_position_color", "Tree", Color(1, 1, 1));
theme->set_color("relationship_line_color", "Tree", Color(0.27, 0.27, 0.27));
@@ -842,7 +842,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_color", "ItemList", control_font_lower_color);
theme->set_color("font_hovered_color", "ItemList", control_font_hover_color);
theme->set_color("font_selected_color", "ItemList", control_font_pressed_color);
- theme->set_color("font_outline_color", "ItemList", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "ItemList", Color(0, 0, 0));
theme->set_color("guide_color", "ItemList", Color(0.7, 0.7, 0.7, 0.25));
theme->set_stylebox("hovered", "ItemList", make_flat_stylebox(Color(1, 1, 1, 0.07)));
theme->set_stylebox("selected", "ItemList", make_flat_stylebox(style_selected_color));
@@ -891,7 +891,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_hovered_color", "TabContainer", control_font_hover_color);
theme->set_color("font_unselected_color", "TabContainer", control_font_low_color);
theme->set_color("font_disabled_color", "TabContainer", control_font_disabled_color);
- theme->set_color("font_outline_color", "TabContainer", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "TabContainer", Color(0, 0, 0));
theme->set_color("drop_mark_color", "TabContainer", Color(1, 1, 1));
theme->set_constant("side_margin", "TabContainer", Math::round(8 * scale));
@@ -923,7 +923,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_hovered_color", "TabBar", control_font_hover_color);
theme->set_color("font_unselected_color", "TabBar", control_font_low_color);
theme->set_color("font_disabled_color", "TabBar", control_font_disabled_color);
- theme->set_color("font_outline_color", "TabBar", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "TabBar", Color(0, 0, 0));
theme->set_color("drop_mark_color", "TabBar", Color(1, 1, 1));
theme->set_constant("h_separation", "TabBar", Math::round(4 * scale));
@@ -1035,7 +1035,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_hover_color", "ColorPickerButton", Color(1, 1, 1, 1));
theme->set_color("font_focus_color", "ColorPickerButton", Color(1, 1, 1, 1));
theme->set_color("font_disabled_color", "ColorPickerButton", Color(0.9, 0.9, 0.9, 0.3));
- theme->set_color("font_outline_color", "ColorPickerButton", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "ColorPickerButton", Color(0, 0, 0));
theme->set_constant("h_separation", "ColorPickerButton", Math::round(4 * scale));
theme->set_constant("outline_size", "ColorPickerButton", 0);
@@ -1063,7 +1063,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_color", "TooltipLabel", control_font_color);
theme->set_color("font_shadow_color", "TooltipLabel", Color(0, 0, 0, 0));
- theme->set_color("font_outline_color", "TooltipLabel", Color(0, 0, 0, 0));
+ theme->set_color("font_outline_color", "TooltipLabel", Color(0, 0, 0));
theme->set_constant("shadow_offset_x", "TooltipLabel", 1);
theme->set_constant("shadow_offset_y", "TooltipLabel", 1);
@@ -1091,7 +1091,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("font_shadow_color", "RichTextLabel", Color(0, 0, 0, 0));
- theme->set_color("font_outline_color", "RichTextLabel", Color(1, 1, 1));
+ theme->set_color("font_outline_color", "RichTextLabel", Color(0, 0, 0));
theme->set_constant("shadow_offset_x", "RichTextLabel", Math::round(1 * scale));
theme->set_constant("shadow_offset_y", "RichTextLabel", Math::round(1 * scale));
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp
index 380500769c..ee2a65ad91 100644
--- a/servers/register_server_types.cpp
+++ b/servers/register_server_types.cpp
@@ -76,6 +76,7 @@
#include "text/text_server_dummy.h"
#include "text/text_server_extension.h"
#include "text_server.h"
+#include "xr/xr_body_tracker.h"
#include "xr/xr_face_tracker.h"
#include "xr/xr_hand_tracker.h"
#include "xr/xr_interface.h"
@@ -173,6 +174,7 @@ void register_server_types() {
GDREGISTER_ABSTRACT_CLASS(RenderingDevice);
+ GDREGISTER_CLASS(XRBodyTracker);
GDREGISTER_ABSTRACT_CLASS(XRInterface);
GDREGISTER_CLASS(XRHandTracker);
GDREGISTER_CLASS(XRInterfaceExtension); // can't register this as virtual because we need a creation function for our extensions.
diff --git a/servers/xr/xr_body_tracker.cpp b/servers/xr/xr_body_tracker.cpp
new file mode 100644
index 0000000000..cd58c14348
--- /dev/null
+++ b/servers/xr/xr_body_tracker.cpp
@@ -0,0 +1,171 @@
+/**************************************************************************/
+/* xr_body_tracker.cpp */
+/**************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/**************************************************************************/
+/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
+/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/**************************************************************************/
+
+#include "xr_body_tracker.h"
+
+void XRBodyTracker::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_has_tracking_data", "has_data"), &XRBodyTracker::set_has_tracking_data);
+ ClassDB::bind_method(D_METHOD("get_has_tracking_data"), &XRBodyTracker::get_has_tracking_data);
+
+ ClassDB::bind_method(D_METHOD("set_body_flags", "flags"), &XRBodyTracker::set_body_flags);
+ ClassDB::bind_method(D_METHOD("get_body_flags"), &XRBodyTracker::get_body_flags);
+
+ ClassDB::bind_method(D_METHOD("set_joint_flags", "joint", "flags"), &XRBodyTracker::set_joint_flags);
+ ClassDB::bind_method(D_METHOD("get_joint_flags", "joint"), &XRBodyTracker::get_joint_flags);
+
+ ClassDB::bind_method(D_METHOD("set_joint_transform", "joint", "transform"), &XRBodyTracker::set_joint_transform);
+ ClassDB::bind_method(D_METHOD("get_joint_transform", "joint"), &XRBodyTracker::get_joint_transform);
+
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "has_tracking_data", PROPERTY_HINT_NONE), "set_has_tracking_data", "get_has_tracking_data");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "body_flags", PROPERTY_HINT_FLAGS, "Upper Body,Lower Body,Hands"), "set_body_flags", "get_body_flags");
+
+ BIND_BITFIELD_FLAG(BODY_FLAG_UPPER_BODY_SUPPORTED);
+ BIND_BITFIELD_FLAG(BODY_FLAG_LOWER_BODY_SUPPORTED);
+ BIND_BITFIELD_FLAG(BODY_FLAG_HANDS_SUPPORTED);
+
+ BIND_ENUM_CONSTANT(JOINT_ROOT);
+ BIND_ENUM_CONSTANT(JOINT_HIPS);
+ BIND_ENUM_CONSTANT(JOINT_SPINE);
+ BIND_ENUM_CONSTANT(JOINT_CHEST);
+ BIND_ENUM_CONSTANT(JOINT_UPPER_CHEST);
+ BIND_ENUM_CONSTANT(JOINT_NECK);
+ BIND_ENUM_CONSTANT(JOINT_HEAD);
+ BIND_ENUM_CONSTANT(JOINT_HEAD_TIP);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_SHOULDER);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_UPPER_ARM);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_LOWER_ARM);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_SHOULDER);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_UPPER_ARM);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_LOWER_ARM);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_UPPER_LEG);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_LOWER_LEG);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_FOOT);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_TOES);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_UPPER_LEG);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_LOWER_LEG);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_FOOT);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_TOES);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_HAND);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_PALM);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_WRIST);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_THUMB_METACARPAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_THUMB_PHALANX_PROXIMAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_THUMB_PHALANX_DISTAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_THUMB_TIP);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_INDEX_FINGER_METACARPAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_INDEX_FINGER_PHALANX_PROXIMAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_INDEX_FINGER_PHALANX_INTERMEDIATE);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_INDEX_FINGER_PHALANX_DISTAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_INDEX_FINGER_TIP);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_MIDDLE_FINGER_METACARPAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_MIDDLE_FINGER_PHALANX_PROXIMAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_MIDDLE_FINGER_PHALANX_INTERMEDIATE);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_MIDDLE_FINGER_PHALANX_DISTAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_MIDDLE_FINGER_TIP);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_RING_FINGER_METACARPAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_RING_FINGER_PHALANX_PROXIMAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_RING_FINGER_PHALANX_INTERMEDIATE);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_RING_FINGER_PHALANX_DISTAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_RING_FINGER_TIP);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_PINKY_FINGER_METACARPAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_PINKY_FINGER_PHALANX_PROXIMAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_PINKY_FINGER_PHALANX_INTERMEDIATE);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_PINKY_FINGER_PHALANX_DISTAL);
+ BIND_ENUM_CONSTANT(JOINT_LEFT_PINKY_FINGER_TIP);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_HAND);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_PALM);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_WRIST);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_THUMB_METACARPAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_THUMB_PHALANX_PROXIMAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_THUMB_PHALANX_DISTAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_THUMB_TIP);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_INDEX_FINGER_METACARPAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_INDEX_FINGER_PHALANX_PROXIMAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_INDEX_FINGER_PHALANX_INTERMEDIATE);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_INDEX_FINGER_PHALANX_DISTAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_INDEX_FINGER_TIP);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_MIDDLE_FINGER_METACARPAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_MIDDLE_FINGER_PHALANX_PROXIMAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_MIDDLE_FINGER_PHALANX_INTERMEDIATE);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_MIDDLE_FINGER_PHALANX_DISTAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_MIDDLE_FINGER_TIP);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_RING_FINGER_METACARPAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_RING_FINGER_PHALANX_PROXIMAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_RING_FINGER_PHALANX_INTERMEDIATE);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_RING_FINGER_PHALANX_DISTAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_RING_FINGER_TIP);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_PINKY_FINGER_METACARPAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_PINKY_FINGER_PHALANX_PROXIMAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_PINKY_FINGER_PHALANX_INTERMEDIATE);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_PINKY_FINGER_PHALANX_DISTAL);
+ BIND_ENUM_CONSTANT(JOINT_RIGHT_PINKY_FINGER_TIP);
+ BIND_ENUM_CONSTANT(JOINT_MAX);
+
+ BIND_BITFIELD_FLAG(JOINT_FLAG_ORIENTATION_VALID);
+ BIND_BITFIELD_FLAG(JOINT_FLAG_ORIENTATION_TRACKED);
+ BIND_BITFIELD_FLAG(JOINT_FLAG_POSITION_VALID);
+ BIND_BITFIELD_FLAG(JOINT_FLAG_POSITION_TRACKED);
+}
+
+void XRBodyTracker::set_has_tracking_data(bool p_has_tracking_data) {
+ has_tracking_data = p_has_tracking_data;
+}
+
+bool XRBodyTracker::get_has_tracking_data() const {
+ return has_tracking_data;
+}
+
+void XRBodyTracker::set_body_flags(BitField<BodyFlags> p_body_flags) {
+ body_flags = p_body_flags;
+}
+
+BitField<XRBodyTracker::BodyFlags> XRBodyTracker::get_body_flags() const {
+ return body_flags;
+}
+
+void XRBodyTracker::set_joint_flags(Joint p_joint, BitField<JointFlags> p_flags) {
+ ERR_FAIL_INDEX(p_joint, JOINT_MAX);
+ joint_flags[p_joint] = p_flags;
+}
+
+BitField<XRBodyTracker::JointFlags> XRBodyTracker::get_joint_flags(Joint p_joint) const {
+ ERR_FAIL_INDEX_V(p_joint, JOINT_MAX, BitField<JointFlags>());
+ return joint_flags[p_joint];
+}
+
+void XRBodyTracker::set_joint_transform(Joint p_joint, const Transform3D &p_transform) {
+ ERR_FAIL_INDEX(p_joint, JOINT_MAX);
+ joint_transforms[p_joint] = p_transform;
+}
+
+Transform3D XRBodyTracker::get_joint_transform(Joint p_joint) const {
+ ERR_FAIL_INDEX_V(p_joint, JOINT_MAX, Transform3D());
+ return joint_transforms[p_joint];
+}
diff --git a/servers/xr/xr_body_tracker.h b/servers/xr/xr_body_tracker.h
new file mode 100644
index 0000000000..659aa39df1
--- /dev/null
+++ b/servers/xr/xr_body_tracker.h
@@ -0,0 +1,170 @@
+/**************************************************************************/
+/* xr_body_tracker.h */
+/**************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/**************************************************************************/
+/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
+/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/**************************************************************************/
+
+#ifndef XR_BODY_TRACKER_H
+#define XR_BODY_TRACKER_H
+
+#include "core/object/ref_counted.h"
+
+class XRBodyTracker : public RefCounted {
+ GDCLASS(XRBodyTracker, RefCounted);
+ _THREAD_SAFE_CLASS_
+
+public:
+ enum BodyFlags {
+ BODY_FLAG_UPPER_BODY_SUPPORTED = 1,
+ BODY_FLAG_LOWER_BODY_SUPPORTED = 2,
+ BODY_FLAG_HANDS_SUPPORTED = 4,
+ };
+
+ enum Joint {
+ JOINT_ROOT,
+
+ // Upper Body Joints
+ JOINT_HIPS,
+ JOINT_SPINE,
+ JOINT_CHEST,
+ JOINT_UPPER_CHEST,
+ JOINT_NECK,
+ JOINT_HEAD,
+ JOINT_HEAD_TIP,
+ JOINT_LEFT_SHOULDER,
+ JOINT_LEFT_UPPER_ARM,
+ JOINT_LEFT_LOWER_ARM,
+ JOINT_RIGHT_SHOULDER,
+ JOINT_RIGHT_UPPER_ARM,
+ JOINT_RIGHT_LOWER_ARM,
+
+ // Lower Body Joints
+ JOINT_LEFT_UPPER_LEG,
+ JOINT_LEFT_LOWER_LEG,
+ JOINT_LEFT_FOOT,
+ JOINT_LEFT_TOES,
+ JOINT_RIGHT_UPPER_LEG,
+ JOINT_RIGHT_LOWER_LEG,
+ JOINT_RIGHT_FOOT,
+ JOINT_RIGHT_TOES,
+
+ // Left Hand Joints
+ JOINT_LEFT_HAND,
+ JOINT_LEFT_PALM,
+ JOINT_LEFT_WRIST,
+ JOINT_LEFT_THUMB_METACARPAL,
+ JOINT_LEFT_THUMB_PHALANX_PROXIMAL,
+ JOINT_LEFT_THUMB_PHALANX_DISTAL,
+ JOINT_LEFT_THUMB_TIP,
+ JOINT_LEFT_INDEX_FINGER_METACARPAL,
+ JOINT_LEFT_INDEX_FINGER_PHALANX_PROXIMAL,
+ JOINT_LEFT_INDEX_FINGER_PHALANX_INTERMEDIATE,
+ JOINT_LEFT_INDEX_FINGER_PHALANX_DISTAL,
+ JOINT_LEFT_INDEX_FINGER_TIP,
+ JOINT_LEFT_MIDDLE_FINGER_METACARPAL,
+ JOINT_LEFT_MIDDLE_FINGER_PHALANX_PROXIMAL,
+ JOINT_LEFT_MIDDLE_FINGER_PHALANX_INTERMEDIATE,
+ JOINT_LEFT_MIDDLE_FINGER_PHALANX_DISTAL,
+ JOINT_LEFT_MIDDLE_FINGER_TIP,
+ JOINT_LEFT_RING_FINGER_METACARPAL,
+ JOINT_LEFT_RING_FINGER_PHALANX_PROXIMAL,
+ JOINT_LEFT_RING_FINGER_PHALANX_INTERMEDIATE,
+ JOINT_LEFT_RING_FINGER_PHALANX_DISTAL,
+ JOINT_LEFT_RING_FINGER_TIP,
+ JOINT_LEFT_PINKY_FINGER_METACARPAL,
+ JOINT_LEFT_PINKY_FINGER_PHALANX_PROXIMAL,
+ JOINT_LEFT_PINKY_FINGER_PHALANX_INTERMEDIATE,
+ JOINT_LEFT_PINKY_FINGER_PHALANX_DISTAL,
+ JOINT_LEFT_PINKY_FINGER_TIP,
+
+ // Right Hand Joints
+ JOINT_RIGHT_HAND,
+ JOINT_RIGHT_PALM,
+ JOINT_RIGHT_WRIST,
+ JOINT_RIGHT_THUMB_METACARPAL,
+ JOINT_RIGHT_THUMB_PHALANX_PROXIMAL,
+ JOINT_RIGHT_THUMB_PHALANX_DISTAL,
+ JOINT_RIGHT_THUMB_TIP,
+ JOINT_RIGHT_INDEX_FINGER_METACARPAL,
+ JOINT_RIGHT_INDEX_FINGER_PHALANX_PROXIMAL,
+ JOINT_RIGHT_INDEX_FINGER_PHALANX_INTERMEDIATE,
+ JOINT_RIGHT_INDEX_FINGER_PHALANX_DISTAL,
+ JOINT_RIGHT_INDEX_FINGER_TIP,
+ JOINT_RIGHT_MIDDLE_FINGER_METACARPAL,
+ JOINT_RIGHT_MIDDLE_FINGER_PHALANX_PROXIMAL,
+ JOINT_RIGHT_MIDDLE_FINGER_PHALANX_INTERMEDIATE,
+ JOINT_RIGHT_MIDDLE_FINGER_PHALANX_DISTAL,
+ JOINT_RIGHT_MIDDLE_FINGER_TIP,
+ JOINT_RIGHT_RING_FINGER_METACARPAL,
+ JOINT_RIGHT_RING_FINGER_PHALANX_PROXIMAL,
+ JOINT_RIGHT_RING_FINGER_PHALANX_INTERMEDIATE,
+ JOINT_RIGHT_RING_FINGER_PHALANX_DISTAL,
+ JOINT_RIGHT_RING_FINGER_TIP,
+ JOINT_RIGHT_PINKY_FINGER_METACARPAL,
+ JOINT_RIGHT_PINKY_FINGER_PHALANX_PROXIMAL,
+ JOINT_RIGHT_PINKY_FINGER_PHALANX_INTERMEDIATE,
+ JOINT_RIGHT_PINKY_FINGER_PHALANX_DISTAL,
+ JOINT_RIGHT_PINKY_FINGER_TIP,
+
+ JOINT_MAX,
+ };
+
+ enum JointFlags {
+ JOINT_FLAG_ORIENTATION_VALID = 1,
+ JOINT_FLAG_ORIENTATION_TRACKED = 2,
+ JOINT_FLAG_POSITION_VALID = 4,
+ JOINT_FLAG_POSITION_TRACKED = 8,
+ };
+
+ void set_has_tracking_data(bool p_has_tracking_data);
+ bool get_has_tracking_data() const;
+
+ void set_body_flags(BitField<BodyFlags> p_body_flags);
+ BitField<BodyFlags> get_body_flags() const;
+
+ void set_joint_flags(Joint p_joint, BitField<JointFlags> p_flags);
+ BitField<JointFlags> get_joint_flags(Joint p_joint) const;
+
+ void set_joint_transform(Joint p_joint, const Transform3D &p_transform);
+ Transform3D get_joint_transform(Joint p_joint) const;
+
+protected:
+ static void _bind_methods();
+
+private:
+ bool has_tracking_data = false;
+ BitField<BodyFlags> body_flags;
+
+ BitField<JointFlags> joint_flags[JOINT_MAX];
+ Transform3D joint_transforms[JOINT_MAX];
+};
+
+VARIANT_BITFIELD_CAST(XRBodyTracker::BodyFlags)
+VARIANT_ENUM_CAST(XRBodyTracker::Joint)
+VARIANT_BITFIELD_CAST(XRBodyTracker::JointFlags)
+
+#endif // XR_BODY_TRACKER_H
diff --git a/servers/xr_server.cpp b/servers/xr_server.cpp
index 1e497e22c3..af14ba4a00 100644
--- a/servers/xr_server.cpp
+++ b/servers/xr_server.cpp
@@ -30,6 +30,7 @@
#include "xr_server.h"
#include "core/config/project_settings.h"
+#include "xr/xr_body_tracker.h"
#include "xr/xr_face_tracker.h"
#include "xr/xr_hand_tracker.h"
#include "xr/xr_interface.h"
@@ -86,6 +87,11 @@ void XRServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_face_trackers"), &XRServer::get_face_trackers);
ClassDB::bind_method(D_METHOD("get_face_tracker", "tracker_name"), &XRServer::get_face_tracker);
+ ClassDB::bind_method(D_METHOD("add_body_tracker", "tracker_name", "body_tracker"), &XRServer::add_body_tracker);
+ ClassDB::bind_method(D_METHOD("remove_body_tracker", "tracker_name"), &XRServer::remove_body_tracker);
+ ClassDB::bind_method(D_METHOD("get_body_trackers"), &XRServer::get_body_trackers);
+ ClassDB::bind_method(D_METHOD("get_body_tracker", "tracker_name"), &XRServer::get_body_tracker);
+
ClassDB::bind_method(D_METHOD("get_primary_interface"), &XRServer::get_primary_interface);
ClassDB::bind_method(D_METHOD("set_primary_interface", "interface"), &XRServer::set_primary_interface);
@@ -117,6 +123,10 @@ void XRServer::_bind_methods() {
ADD_SIGNAL(MethodInfo("face_tracker_added", PropertyInfo(Variant::STRING_NAME, "tracker_name"), PropertyInfo(Variant::OBJECT, "face_tracker", PROPERTY_HINT_RESOURCE_TYPE, "XRFaceTracker")));
ADD_SIGNAL(MethodInfo("face_tracker_updated", PropertyInfo(Variant::STRING_NAME, "tracker_name"), PropertyInfo(Variant::OBJECT, "face_tracker", PROPERTY_HINT_RESOURCE_TYPE, "XRFaceTracker")));
ADD_SIGNAL(MethodInfo("face_tracker_removed", PropertyInfo(Variant::STRING_NAME, "tracker_name")));
+
+ ADD_SIGNAL(MethodInfo("body_tracker_added", PropertyInfo(Variant::STRING_NAME, "tracker_name"), PropertyInfo(Variant::OBJECT, "body_tracker", PROPERTY_HINT_RESOURCE_TYPE, "XRBodyTracker")));
+ ADD_SIGNAL(MethodInfo("body_tracker_updated", PropertyInfo(Variant::STRING_NAME, "tracker_name"), PropertyInfo(Variant::OBJECT, "body_tracker", PROPERTY_HINT_RESOURCE_TYPE, "XRBodyTracker")));
+ ADD_SIGNAL(MethodInfo("body_tracker_removed", PropertyInfo(Variant::STRING_NAME, "tracker_name")));
};
double XRServer::get_world_scale() const {
@@ -448,6 +458,44 @@ Ref<XRFaceTracker> XRServer::get_face_tracker(const StringName &p_tracker_name)
return face_trackers[p_tracker_name];
}
+void XRServer::add_body_tracker(const StringName &p_tracker_name, Ref<XRBodyTracker> p_body_tracker) {
+ ERR_FAIL_COND(p_body_tracker.is_null());
+
+ if (!body_trackers.has(p_tracker_name)) {
+ // We don't have a tracker with this name, we're going to add it.
+ body_trackers[p_tracker_name] = p_body_tracker;
+ emit_signal(SNAME("body_tracker_added"), p_tracker_name, p_body_tracker);
+ } else if (body_trackers[p_tracker_name] != p_body_tracker) {
+ // We already have a tracker with this name, we're going to replace it.
+ body_trackers[p_tracker_name] = p_body_tracker;
+ emit_signal(SNAME("body_tracker_updated"), p_tracker_name, p_body_tracker);
+ }
+}
+
+void XRServer::remove_body_tracker(const StringName &p_tracker_name) {
+ // Skip if no face tracker is found.
+ if (!body_trackers.has(p_tracker_name)) {
+ return;
+ }
+
+ // Send the removed signal, then remove the face tracker.
+ emit_signal(SNAME("body_tracker_removed"), p_tracker_name);
+ body_trackers.erase(p_tracker_name);
+}
+
+Dictionary XRServer::get_body_trackers() const {
+ return body_trackers;
+}
+
+Ref<XRBodyTracker> XRServer::get_body_tracker(const StringName &p_tracker_name) const {
+ // Skip if no tracker is found.
+ if (!body_trackers.has(p_tracker_name)) {
+ return Ref<XRBodyTracker>();
+ }
+
+ return body_trackers[p_tracker_name];
+}
+
void XRServer::_process() {
// called from our main game loop before we handle physics and game logic
// note that we can have multiple interfaces active if we have interfaces that purely handle tracking
diff --git a/servers/xr_server.h b/servers/xr_server.h
index 3e45bbb76c..6aaa34b21d 100644
--- a/servers/xr_server.h
+++ b/servers/xr_server.h
@@ -41,6 +41,7 @@ class XRInterface;
class XRPositionalTracker;
class XRHandTracker;
class XRFaceTracker;
+class XRBodyTracker;
/**
The XR server is a singleton object that gives access to the various
@@ -89,6 +90,7 @@ private:
Dictionary trackers;
Dictionary hand_trackers;
Dictionary face_trackers;
+ Dictionary body_trackers;
Ref<XRInterface> primary_interface; /* we'll identify one interface as primary, this will be used by our viewports */
@@ -203,6 +205,14 @@ public:
Dictionary get_face_trackers() const;
Ref<XRFaceTracker> get_face_tracker(const StringName &p_tracker_name) const;
+ /*
+ Body trackers are objects that expose the tracked joints of a body.
+ */
+ void add_body_tracker(const StringName &p_tracker_name, Ref<XRBodyTracker> p_face_tracker);
+ void remove_body_tracker(const StringName &p_tracker_name);
+ Dictionary get_body_trackers() const;
+ Ref<XRBodyTracker> get_body_tracker(const StringName &p_tracker_name) const;
+
// Process is called before we handle our physics process and game process. This is where our interfaces will update controller data and such.
void _process();
diff --git a/tests/core/string/test_node_path.h b/tests/core/string/test_node_path.h
index 031a33c570..bdbc578e85 100644
--- a/tests/core/string/test_node_path.h
+++ b/tests/core/string/test_node_path.h
@@ -167,6 +167,59 @@ TEST_CASE("[NodePath] Empty path") {
node_path_empty.is_empty(),
"The node path should be considered empty.");
}
+
+TEST_CASE("[NodePath] Slice") {
+ const NodePath node_path_relative = NodePath("Parent/Child:prop");
+ const NodePath node_path_absolute = NodePath("/root/Parent/Child:prop");
+ CHECK_MESSAGE(
+ node_path_relative.slice(0, 2) == NodePath("Parent/Child"),
+ "The slice lower bound should be inclusive and the slice upper bound should be exclusive.");
+ CHECK_MESSAGE(
+ node_path_relative.slice(3) == NodePath(":prop"),
+ "Slicing on the length of the path should return the last entry.");
+ CHECK_MESSAGE(
+ node_path_relative.slice(1, 3) == NodePath("Child:prop"),
+ "Slicing should include names and subnames.");
+ CHECK_MESSAGE(
+ node_path_relative.slice(-1) == NodePath(":prop"),
+ "Slicing on -1 should return the last entry.");
+ CHECK_MESSAGE(
+ node_path_relative.slice(0, -1) == NodePath("Parent/Child"),
+ "Slicing up to -1 should include the second-to-last entry.");
+ CHECK_MESSAGE(
+ node_path_relative.slice(-2, -1) == NodePath("Child"),
+ "Slicing from negative to negative should treat lower bound as inclusive and upper bound as exclusive.");
+ CHECK_MESSAGE(
+ node_path_relative.slice(0, 10) == NodePath("Parent/Child:prop"),
+ "Slicing past the length of the path should work like slicing up to the last entry.");
+ CHECK_MESSAGE(
+ node_path_relative.slice(-10, 2) == NodePath("Parent/Child"),
+ "Slicing negatively past the length of the path should work like slicing from the first entry.");
+ CHECK_MESSAGE(
+ node_path_relative.slice(1, 1) == NodePath(""),
+ "Slicing with a lower bound equal to upper bound should return empty path.");
+
+ CHECK_MESSAGE(
+ node_path_absolute.slice(0, 2) == NodePath("/root/Parent"),
+ "Slice from beginning of an absolute path should be an absolute path.");
+ CHECK_MESSAGE(
+ node_path_absolute.slice(1, 4) == NodePath("Parent/Child:prop"),
+ "Slice of an absolute path that does not start at the beginning should be a relative path.");
+ CHECK_MESSAGE(
+ node_path_absolute.slice(3, 4) == NodePath(":prop"),
+ "Slice of an absolute path that does not start at the beginning should be a relative path.");
+
+ CHECK_MESSAGE(
+ NodePath("").slice(0, 1) == NodePath(""),
+ "Slice of an empty path should be an empty path.");
+ CHECK_MESSAGE(
+ NodePath("").slice(-1, 2) == NodePath(""),
+ "Slice of an empty path should be an empty path.");
+ CHECK_MESSAGE(
+ NodePath("/").slice(-1, 2) == NodePath("/"),
+ "Slice of an empty absolute path should be an empty absolute path.");
+}
+
} // namespace TestNodePath
#endif // TEST_NODE_PATH_H