summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/editor/gdscript_translation_parser_plugin.cpp8
-rw-r--r--modules/gdscript/editor/gdscript_translation_parser_plugin.h2
-rw-r--r--modules/gltf/editor/editor_scene_importer_blend.cpp2
-rw-r--r--modules/gridmap/editor/grid_map_editor_plugin.cpp4
-rw-r--r--modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp6
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.cpp13
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.h9
-rw-r--r--modules/lightmapper_rd/lm_compute.glsl5
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllReadOnly_ScriptProperties.generated.cs6
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllWriteOnly_ScriptProperties.generated.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptProperties.generated.cs236
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptProperties.generated.cs272
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/MixedReadOnlyWriteOnly_ScriptProperties.generated.cs10
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptMethods.generated.cs2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptProperties.generated.cs4
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs9
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs27
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs9
-rw-r--r--modules/multiplayer/editor/editor_network_profiler.cpp4
-rw-r--r--modules/multiplayer/editor/multiplayer_editor_plugin.cpp2
-rw-r--r--modules/multiplayer/editor/replication_editor.cpp4
-rw-r--r--modules/navigation/editor/navigation_mesh_editor_plugin.cpp4
-rw-r--r--modules/noise/editor/noise_editor_plugin.cpp2
-rw-r--r--modules/openxr/editor/openxr_action_editor.cpp2
-rw-r--r--modules/openxr/editor/openxr_action_map_editor.cpp8
-rw-r--r--modules/openxr/editor/openxr_action_set_editor.cpp6
-rw-r--r--modules/openxr/editor/openxr_interaction_profile_editor.cpp4
-rw-r--r--modules/openxr/editor/openxr_select_action_dialog.cpp2
-rw-r--r--modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp2
-rw-r--r--modules/openxr/extensions/openxr_composition_layer_extension.cpp2
30 files changed, 324 insertions, 344 deletions
diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp b/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp
index 316281209a..d74d316704 100644
--- a/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp
+++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp
@@ -276,8 +276,8 @@ void GDScriptEditorTranslationParserPlugin::_assess_call(const GDScriptParser::C
id_ctx_plural.resize(3);
bool extract_id_ctx_plural = true;
- if (function_name == tr_func) {
- // Extract from tr(id, ctx).
+ if (function_name == tr_func || function_name == atr_func) {
+ // Extract from `tr(id, ctx)` or `atr(id, ctx)`.
for (int i = 0; i < p_call->arguments.size(); i++) {
if (_is_constant_string(p_call->arguments[i])) {
id_ctx_plural.write[i] = p_call->arguments[i]->reduced_value;
@@ -289,8 +289,8 @@ void GDScriptEditorTranslationParserPlugin::_assess_call(const GDScriptParser::C
if (extract_id_ctx_plural) {
ids_ctx_plural->push_back(id_ctx_plural);
}
- } else if (function_name == trn_func) {
- // Extract from tr_n(id, plural, n, ctx).
+ } else if (function_name == trn_func || function_name == atrn_func) {
+ // Extract from `tr_n(id, plural, n, ctx)` or `atr_n(id, plural, n, ctx)`.
Vector<int> indices;
indices.push_back(0);
indices.push_back(3);
diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.h b/modules/gdscript/editor/gdscript_translation_parser_plugin.h
index fe876134c2..61ff81ed66 100644
--- a/modules/gdscript/editor/gdscript_translation_parser_plugin.h
+++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.h
@@ -45,6 +45,8 @@ class GDScriptEditorTranslationParserPlugin : public EditorTranslationParserPlug
// List of patterns used for extracting translation strings.
StringName tr_func = "tr";
StringName trn_func = "tr_n";
+ StringName atr_func = "atr";
+ StringName atrn_func = "atr_n";
HashSet<StringName> assignment_patterns;
HashSet<StringName> first_arg_patterns;
HashSet<StringName> second_arg_patterns;
diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp
index 42c3ecc7cb..ccf347e03e 100644
--- a/modules/gltf/editor/editor_scene_importer_blend.cpp
+++ b/modules/gltf/editor/editor_scene_importer_blend.cpp
@@ -493,7 +493,7 @@ bool EditorFileSystemImportFormatSupportQueryBlend::query() {
blender_path_browse = memnew(Button);
blender_path_browse->set_text(TTR("Browse"));
- blender_path_browse->connect("pressed", callable_mp(this, &EditorFileSystemImportFormatSupportQueryBlend::_browse_install));
+ blender_path_browse->connect(SceneStringName(pressed), callable_mp(this, &EditorFileSystemImportFormatSupportQueryBlend::_browse_install));
hb->add_child(blender_path_browse);
hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp
index 0cb3ec2d5e..27c74421db 100644
--- a/modules/gridmap/editor/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp
@@ -1294,14 +1294,14 @@ GridMapEditor::GridMapEditor() {
mode_thumbnail->set_toggle_mode(true);
mode_thumbnail->set_pressed(true);
hb->add_child(mode_thumbnail);
- mode_thumbnail->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_THUMBNAIL));
+ mode_thumbnail->connect(SceneStringName(pressed), callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_THUMBNAIL));
mode_list = memnew(Button);
mode_list->set_theme_type_variation("FlatButton");
mode_list->set_toggle_mode(true);
mode_list->set_pressed(false);
hb->add_child(mode_list);
- mode_list->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_LIST));
+ mode_list->connect(SceneStringName(pressed), callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_LIST));
size_slider = memnew(HSlider);
size_slider->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp b/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp
index 2739e66e9e..cd3814879a 100644
--- a/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp
+++ b/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp
@@ -342,7 +342,7 @@ AudioStreamInteractiveTransitionEditor::AudioStreamInteractiveTransitionEditor()
transition_enabled = memnew(CheckBox);
transition_enabled->set_text(TTR("Enabled"));
edit_vb->add_margin_child(TTR("Use Transition:"), transition_enabled);
- transition_enabled->connect("pressed", callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited));
+ transition_enabled->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited));
transition_from = memnew(OptionButton);
edit_vb->add_margin_child(TTR("Transition From:"), transition_from);
@@ -377,7 +377,7 @@ AudioStreamInteractiveTransitionEditor::AudioStreamInteractiveTransitionEditor()
hold_previous = memnew(CheckBox);
hold_previous->set_text(TTR("Enabled"));
- hold_previous->connect("pressed", callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited));
+ hold_previous->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamInteractiveTransitionEditor::_edited));
edit_vb->add_margin_child(TTR("Hold Previous:"), hold_previous);
set_exclusive(true);
@@ -397,7 +397,7 @@ void EditorInspectorPluginAudioStreamInteractive::parse_end(Object *p_object) {
if (Object::cast_to<AudioStreamInteractive>(p_object)) {
Button *button = EditorInspector::create_inspector_action_button(TTR("Edit Transitions"));
button->set_icon(audio_stream_interactive_transition_editor->get_editor_theme_icon(SNAME("Blend")));
- button->connect("pressed", callable_mp(this, &EditorInspectorPluginAudioStreamInteractive::_edit).bind(p_object));
+ button->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorPluginAudioStreamInteractive::_edit).bind(p_object));
add_custom_control(button);
}
}
diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp
index 835fb3e59d..cc2fa18449 100644
--- a/modules/lightmapper_rd/lightmapper_rd.cpp
+++ b/modules/lightmapper_rd/lightmapper_rd.cpp
@@ -226,7 +226,7 @@ void LightmapperRD::_sort_triangle_clusters(uint32_t p_cluster_size, uint32_t p_
}
}
-Lightmapper::BakeError LightmapperRD::_blit_meshes_into_atlas(int p_max_texture_size, Vector<Ref<Image>> &albedo_images, Vector<Ref<Image>> &emission_images, AABB &bounds, Size2i &atlas_size, int &atlas_slices, BakeStepFunc p_step_function, void *p_bake_userdata) {
+Lightmapper::BakeError LightmapperRD::_blit_meshes_into_atlas(int p_max_texture_size, int p_denoiser_range, Vector<Ref<Image>> &albedo_images, Vector<Ref<Image>> &emission_images, AABB &bounds, Size2i &atlas_size, int &atlas_slices, BakeStepFunc p_step_function, void *p_bake_userdata) {
Vector<Size2i> sizes;
for (int m_i = 0; m_i < mesh_instances.size(); m_i++) {
@@ -261,7 +261,7 @@ Lightmapper::BakeError LightmapperRD::_blit_meshes_into_atlas(int p_max_texture_
source_sizes.resize(sizes.size());
source_indices.resize(sizes.size());
for (int i = 0; i < source_indices.size(); i++) {
- source_sizes.write[i] = sizes[i] + Vector2i(2, 2); // Add padding between lightmaps
+ source_sizes.write[i] = sizes[i] + Vector2i(2, 2).maxi(p_denoiser_range); // Add padding between lightmaps
source_indices.write[i] = i;
}
Vector<Vector3i> atlas_offsets;
@@ -906,7 +906,7 @@ LightmapperRD::BakeError LightmapperRD::_denoise_oidn(RenderingDevice *p_rd, RID
return BAKE_OK;
}
-LightmapperRD::BakeError LightmapperRD::_denoise(RenderingDevice *p_rd, Ref<RDShaderFile> &p_compute_shader, const RID &p_compute_base_uniform_set, PushConstant &p_push_constant, RID p_source_light_tex, RID p_source_normal_tex, RID p_dest_light_tex, float p_denoiser_strength, const Size2i &p_atlas_size, int p_atlas_slices, bool p_bake_sh, BakeStepFunc p_step_function) {
+LightmapperRD::BakeError LightmapperRD::_denoise(RenderingDevice *p_rd, Ref<RDShaderFile> &p_compute_shader, const RID &p_compute_base_uniform_set, PushConstant &p_push_constant, RID p_source_light_tex, RID p_source_normal_tex, RID p_dest_light_tex, float p_denoiser_strength, int p_denoiser_range, const Size2i &p_atlas_size, int p_atlas_slices, bool p_bake_sh, BakeStepFunc p_step_function) {
RID denoise_params_buffer = p_rd->uniform_buffer_create(sizeof(DenoiseParams));
DenoiseParams denoise_params;
denoise_params.spatial_bandwidth = 5.0f;
@@ -914,6 +914,7 @@ LightmapperRD::BakeError LightmapperRD::_denoise(RenderingDevice *p_rd, Ref<RDSh
denoise_params.albedo_bandwidth = 1.0f;
denoise_params.normal_bandwidth = 0.1f;
denoise_params.filter_strength = 10.0f;
+ denoise_params.half_search_window = p_denoiser_range;
p_rd->buffer_update(denoise_params_buffer, 0, sizeof(DenoiseParams), &denoise_params);
Vector<RD::Uniform> uniforms = dilate_or_denoise_common_uniforms(p_source_light_tex, p_dest_light_tex);
@@ -976,7 +977,7 @@ LightmapperRD::BakeError LightmapperRD::_denoise(RenderingDevice *p_rd, Ref<RDSh
return BAKE_OK;
}
-LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_denoiser, float p_denoiser_strength, int p_bounces, float p_bounce_indirect_energy, float p_bias, int p_max_texture_size, bool p_bake_sh, bool p_texture_for_bounces, GenerateProbes p_generate_probes, const Ref<Image> &p_environment_panorama, const Basis &p_environment_transform, BakeStepFunc p_step_function, void *p_bake_userdata, float p_exposure_normalization) {
+LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_denoiser, float p_denoiser_strength, int p_denoiser_range, int p_bounces, float p_bounce_indirect_energy, float p_bias, int p_max_texture_size, bool p_bake_sh, bool p_texture_for_bounces, GenerateProbes p_generate_probes, const Ref<Image> &p_environment_panorama, const Basis &p_environment_transform, BakeStepFunc p_step_function, void *p_bake_userdata, float p_exposure_normalization) {
int denoiser = GLOBAL_GET("rendering/lightmapping/denoising/denoiser");
String oidn_path = EDITOR_GET("filesystem/tools/oidn/oidn_denoise_path");
@@ -1008,7 +1009,7 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
Vector<Ref<Image>> albedo_images;
Vector<Ref<Image>> emission_images;
- BakeError bake_error = _blit_meshes_into_atlas(p_max_texture_size, albedo_images, emission_images, bounds, atlas_size, atlas_slices, p_step_function, p_bake_userdata);
+ BakeError bake_error = _blit_meshes_into_atlas(p_max_texture_size, p_denoiser_range, albedo_images, emission_images, bounds, atlas_size, atlas_slices, p_step_function, p_bake_userdata);
if (bake_error != BAKE_OK) {
return bake_error;
}
@@ -1793,7 +1794,7 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
} else {
// JNLM (built-in).
SWAP(light_accum_tex, light_accum_tex2);
- error = _denoise(rd, compute_shader, compute_base_uniform_set, push_constant, light_accum_tex2, normal_tex, light_accum_tex, p_denoiser_strength, atlas_size, atlas_slices, p_bake_sh, p_step_function);
+ error = _denoise(rd, compute_shader, compute_base_uniform_set, push_constant, light_accum_tex2, normal_tex, light_accum_tex, p_denoiser_strength, p_denoiser_range, atlas_size, atlas_slices, p_bake_sh, p_step_function);
}
if (unlikely(error != BAKE_OK)) {
return error;
diff --git a/modules/lightmapper_rd/lightmapper_rd.h b/modules/lightmapper_rd/lightmapper_rd.h
index 5414048ddc..487c44a480 100644
--- a/modules/lightmapper_rd/lightmapper_rd.h
+++ b/modules/lightmapper_rd/lightmapper_rd.h
@@ -262,16 +262,17 @@ class LightmapperRD : public Lightmapper {
float albedo_bandwidth;
float normal_bandwidth;
+ int half_search_window;
float filter_strength;
- float pad[3];
+ float pad[2];
};
- BakeError _blit_meshes_into_atlas(int p_max_texture_size, Vector<Ref<Image>> &albedo_images, Vector<Ref<Image>> &emission_images, AABB &bounds, Size2i &atlas_size, int &atlas_slices, BakeStepFunc p_step_function, void *p_bake_userdata);
+ BakeError _blit_meshes_into_atlas(int p_max_texture_size, int p_denoiser_range, Vector<Ref<Image>> &albedo_images, Vector<Ref<Image>> &emission_images, AABB &bounds, Size2i &atlas_size, int &atlas_slices, BakeStepFunc p_step_function, void *p_bake_userdata);
void _create_acceleration_structures(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, AABB &bounds, int grid_size, uint32_t p_cluster_size, Vector<Probe> &probe_positions, GenerateProbes p_generate_probes, Vector<int> &slice_triangle_count, Vector<int> &slice_seam_count, RID &vertex_buffer, RID &triangle_buffer, RID &lights_buffer, RID &r_triangle_indices_buffer, RID &r_cluster_indices_buffer, RID &r_cluster_aabbs_buffer, RID &probe_positions_buffer, RID &grid_texture, RID &seams_buffer, BakeStepFunc p_step_function, void *p_bake_userdata);
void _raster_geometry(RenderingDevice *rd, Size2i atlas_size, int atlas_slices, int grid_size, AABB bounds, float p_bias, Vector<int> slice_triangle_count, RID position_tex, RID unocclude_tex, RID normal_tex, RID raster_depth_buffer, RID rasterize_shader, RID raster_base_uniform);
BakeError _dilate(RenderingDevice *rd, Ref<RDShaderFile> &compute_shader, RID &compute_base_uniform_set, PushConstant &push_constant, RID &source_light_tex, RID &dest_light_tex, const Size2i &atlas_size, int atlas_slices);
- BakeError _denoise(RenderingDevice *p_rd, Ref<RDShaderFile> &p_compute_shader, const RID &p_compute_base_uniform_set, PushConstant &p_push_constant, RID p_source_light_tex, RID p_source_normal_tex, RID p_dest_light_tex, float p_denoiser_strength, const Size2i &p_atlas_size, int p_atlas_slices, bool p_bake_sh, BakeStepFunc p_step_function);
+ BakeError _denoise(RenderingDevice *p_rd, Ref<RDShaderFile> &p_compute_shader, const RID &p_compute_base_uniform_set, PushConstant &p_push_constant, RID p_source_light_tex, RID p_source_normal_tex, RID p_dest_light_tex, float p_denoiser_strength, int p_denoiser_range, const Size2i &p_atlas_size, int p_atlas_slices, bool p_bake_sh, BakeStepFunc p_step_function);
Error _store_pfm(RenderingDevice *p_rd, RID p_atlas_tex, int p_index, const Size2i &p_atlas_size, const String &p_name);
Ref<Image> _read_pfm(const String &p_name);
@@ -283,7 +284,7 @@ public:
virtual void add_omni_light(bool p_static, const Vector3 &p_position, const Color &p_color, float p_energy, float p_indirect_energy, float p_range, float p_attenuation, float p_size, float p_shadow_blur) override;
virtual void add_spot_light(bool p_static, const Vector3 &p_position, const Vector3 p_direction, const Color &p_color, float p_energy, float p_indirect_energy, float p_range, float p_attenuation, float p_spot_angle, float p_spot_attenuation, float p_size, float p_shadow_blur) override;
virtual void add_probe(const Vector3 &p_position) override;
- virtual BakeError bake(BakeQuality p_quality, bool p_use_denoiser, float p_denoiser_strength, int p_bounces, float p_bounce_indirect_energy, float p_bias, int p_max_texture_size, bool p_bake_sh, bool p_texture_for_bounces, GenerateProbes p_generate_probes, const Ref<Image> &p_environment_panorama, const Basis &p_environment_transform, BakeStepFunc p_step_function = nullptr, void *p_bake_userdata = nullptr, float p_exposure_normalization = 1.0) override;
+ virtual BakeError bake(BakeQuality p_quality, bool p_use_denoiser, float p_denoiser_strength, int p_denoiser_range, int p_bounces, float p_bounce_indirect_energy, float p_bias, int p_max_texture_size, bool p_bake_sh, bool p_texture_for_bounces, GenerateProbes p_generate_probes, const Ref<Image> &p_environment_panorama, const Basis &p_environment_transform, BakeStepFunc p_step_function = nullptr, void *p_bake_userdata = nullptr, float p_exposure_normalization = 1.0) override;
int get_bake_texture_count() const override;
Ref<Image> get_bake_texture(int p_index) const override;
diff --git a/modules/lightmapper_rd/lm_compute.glsl b/modules/lightmapper_rd/lm_compute.glsl
index 1d088450e9..9424d5a4c1 100644
--- a/modules/lightmapper_rd/lm_compute.glsl
+++ b/modules/lightmapper_rd/lm_compute.glsl
@@ -76,6 +76,7 @@ layout(set = 1, binding = 3) uniform DenoiseParams {
float albedo_bandwidth;
float normal_bandwidth;
+ int half_search_window;
float filter_strength;
}
denoise_params;
@@ -849,10 +850,10 @@ void main() {
// Half the size of the patch window around each pixel that is weighted to compute the denoised pixel.
// A value of 1 represents a 3x3 window, a value of 2 a 5x5 window, etc.
- const int HALF_PATCH_WINDOW = 4;
+ const int HALF_PATCH_WINDOW = 3;
// Half the size of the search window around each pixel that is denoised and weighted to compute the denoised pixel.
- const int HALF_SEARCH_WINDOW = 10;
+ const int HALF_SEARCH_WINDOW = denoise_params.half_search_window;
// For all of the following sigma values, smaller values will give less weight to pixels that have a bigger distance
// in the feature being evaluated. Therefore, smaller values are likely to cause more noise to appear, but will also
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 96ff0f75e9..825daffe80 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
@@ -33,15 +33,15 @@ partial class AllReadOnly
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyAutoProperty);
return true;
}
- else if (name == PropertyName.ReadOnlyProperty) {
+ if (name == PropertyName.ReadOnlyProperty) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyProperty);
return true;
}
- else if (name == PropertyName.InitOnlyAutoProperty) {
+ if (name == PropertyName.InitOnlyAutoProperty) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.InitOnlyAutoProperty);
return true;
}
- else if (name == PropertyName.ReadOnlyField) {
+ if (name == PropertyName.ReadOnlyField) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyField);
return true;
}
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 91dd282b99..615450efe8 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
@@ -25,7 +25,7 @@ partial class AllWriteOnly
this.WriteOnlyProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
- else if (name == PropertyName._writeOnlyBackingField) {
+ if (name == PropertyName._writeOnlyBackingField) {
this._writeOnlyBackingField = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
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 334adc1243..67ec4fa883 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
@@ -257,239 +257,239 @@ partial class ExportedFields
this._fieldBoolean = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
- else if (name == PropertyName._fieldChar) {
+ if (name == PropertyName._fieldChar) {
this._fieldChar = global::Godot.NativeInterop.VariantUtils.ConvertTo<char>(value);
return true;
}
- else if (name == PropertyName._fieldSByte) {
+ if (name == PropertyName._fieldSByte) {
this._fieldSByte = global::Godot.NativeInterop.VariantUtils.ConvertTo<sbyte>(value);
return true;
}
- else if (name == PropertyName._fieldInt16) {
+ if (name == PropertyName._fieldInt16) {
this._fieldInt16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<short>(value);
return true;
}
- else if (name == PropertyName._fieldInt32) {
+ if (name == PropertyName._fieldInt32) {
this._fieldInt32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
return true;
}
- else if (name == PropertyName._fieldInt64) {
+ if (name == PropertyName._fieldInt64) {
this._fieldInt64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<long>(value);
return true;
}
- else if (name == PropertyName._fieldByte) {
+ if (name == PropertyName._fieldByte) {
this._fieldByte = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte>(value);
return true;
}
- else if (name == PropertyName._fieldUInt16) {
+ if (name == PropertyName._fieldUInt16) {
this._fieldUInt16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ushort>(value);
return true;
}
- else if (name == PropertyName._fieldUInt32) {
+ if (name == PropertyName._fieldUInt32) {
this._fieldUInt32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<uint>(value);
return true;
}
- else if (name == PropertyName._fieldUInt64) {
+ if (name == PropertyName._fieldUInt64) {
this._fieldUInt64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ulong>(value);
return true;
}
- else if (name == PropertyName._fieldSingle) {
+ if (name == PropertyName._fieldSingle) {
this._fieldSingle = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
return true;
}
- else if (name == PropertyName._fieldDouble) {
+ if (name == PropertyName._fieldDouble) {
this._fieldDouble = global::Godot.NativeInterop.VariantUtils.ConvertTo<double>(value);
return true;
}
- else if (name == PropertyName._fieldString) {
+ if (name == PropertyName._fieldString) {
this._fieldString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName._fieldVector2) {
+ if (name == PropertyName._fieldVector2) {
this._fieldVector2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2>(value);
return true;
}
- else if (name == PropertyName._fieldVector2I) {
+ if (name == PropertyName._fieldVector2I) {
this._fieldVector2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2I>(value);
return true;
}
- else if (name == PropertyName._fieldRect2) {
+ if (name == PropertyName._fieldRect2) {
this._fieldRect2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2>(value);
return true;
}
- else if (name == PropertyName._fieldRect2I) {
+ if (name == PropertyName._fieldRect2I) {
this._fieldRect2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2I>(value);
return true;
}
- else if (name == PropertyName._fieldTransform2D) {
+ if (name == PropertyName._fieldTransform2D) {
this._fieldTransform2D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform2D>(value);
return true;
}
- else if (name == PropertyName._fieldVector3) {
+ if (name == PropertyName._fieldVector3) {
this._fieldVector3 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3>(value);
return true;
}
- else if (name == PropertyName._fieldVector3I) {
+ if (name == PropertyName._fieldVector3I) {
this._fieldVector3I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3I>(value);
return true;
}
- else if (name == PropertyName._fieldBasis) {
+ if (name == PropertyName._fieldBasis) {
this._fieldBasis = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Basis>(value);
return true;
}
- else if (name == PropertyName._fieldQuaternion) {
+ if (name == PropertyName._fieldQuaternion) {
this._fieldQuaternion = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Quaternion>(value);
return true;
}
- else if (name == PropertyName._fieldTransform3D) {
+ if (name == PropertyName._fieldTransform3D) {
this._fieldTransform3D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform3D>(value);
return true;
}
- else if (name == PropertyName._fieldVector4) {
+ if (name == PropertyName._fieldVector4) {
this._fieldVector4 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4>(value);
return true;
}
- else if (name == PropertyName._fieldVector4I) {
+ if (name == PropertyName._fieldVector4I) {
this._fieldVector4I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4I>(value);
return true;
}
- else if (name == PropertyName._fieldProjection) {
+ if (name == PropertyName._fieldProjection) {
this._fieldProjection = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Projection>(value);
return true;
}
- else if (name == PropertyName._fieldAabb) {
+ if (name == PropertyName._fieldAabb) {
this._fieldAabb = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Aabb>(value);
return true;
}
- else if (name == PropertyName._fieldColor) {
+ if (name == PropertyName._fieldColor) {
this._fieldColor = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color>(value);
return true;
}
- else if (name == PropertyName._fieldPlane) {
+ if (name == PropertyName._fieldPlane) {
this._fieldPlane = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Plane>(value);
return true;
}
- else if (name == PropertyName._fieldCallable) {
+ if (name == PropertyName._fieldCallable) {
this._fieldCallable = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Callable>(value);
return true;
}
- else if (name == PropertyName._fieldSignal) {
+ if (name == PropertyName._fieldSignal) {
this._fieldSignal = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Signal>(value);
return true;
}
- else if (name == PropertyName._fieldEnum) {
+ if (name == PropertyName._fieldEnum) {
this._fieldEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedFields.MyEnum>(value);
return true;
}
- else if (name == PropertyName._fieldFlagsEnum) {
+ if (name == PropertyName._fieldFlagsEnum) {
this._fieldFlagsEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedFields.MyFlagsEnum>(value);
return true;
}
- else if (name == PropertyName._fieldByteArray) {
+ if (name == PropertyName._fieldByteArray) {
this._fieldByteArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte[]>(value);
return true;
}
- else if (name == PropertyName._fieldInt32Array) {
+ if (name == PropertyName._fieldInt32Array) {
this._fieldInt32Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
return true;
}
- else if (name == PropertyName._fieldInt64Array) {
+ if (name == PropertyName._fieldInt64Array) {
this._fieldInt64Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<long[]>(value);
return true;
}
- else if (name == PropertyName._fieldSingleArray) {
+ if (name == PropertyName._fieldSingleArray) {
this._fieldSingleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<float[]>(value);
return true;
}
- else if (name == PropertyName._fieldDoubleArray) {
+ if (name == PropertyName._fieldDoubleArray) {
this._fieldDoubleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<double[]>(value);
return true;
}
- else if (name == PropertyName._fieldStringArray) {
+ if (name == PropertyName._fieldStringArray) {
this._fieldStringArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
return true;
}
- else if (name == PropertyName._fieldStringArrayEnum) {
+ if (name == PropertyName._fieldStringArrayEnum) {
this._fieldStringArrayEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
return true;
}
- else if (name == PropertyName._fieldVector2Array) {
+ if (name == PropertyName._fieldVector2Array) {
this._fieldVector2Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2[]>(value);
return true;
}
- else if (name == PropertyName._fieldVector3Array) {
+ if (name == PropertyName._fieldVector3Array) {
this._fieldVector3Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3[]>(value);
return true;
}
- else if (name == PropertyName._fieldColorArray) {
+ if (name == PropertyName._fieldColorArray) {
this._fieldColorArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color[]>(value);
return true;
}
- else if (name == PropertyName._fieldGodotObjectOrDerivedArray) {
+ if (name == PropertyName._fieldGodotObjectOrDerivedArray) {
this._fieldGodotObjectOrDerivedArray = global::Godot.NativeInterop.VariantUtils.ConvertToSystemArrayOfGodotObject<global::Godot.GodotObject>(value);
return true;
}
- else if (name == PropertyName._fieldStringNameArray) {
+ if (name == PropertyName._fieldStringNameArray) {
this._fieldStringNameArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.StringName[]>(value);
return true;
}
- else if (name == PropertyName._fieldNodePathArray) {
+ if (name == PropertyName._fieldNodePathArray) {
this._fieldNodePathArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath[]>(value);
return true;
}
- else if (name == PropertyName._fieldRidArray) {
+ if (name == PropertyName._fieldRidArray) {
this._fieldRidArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid[]>(value);
return true;
}
- else if (name == PropertyName._fieldEmptyInt32Array) {
+ if (name == PropertyName._fieldEmptyInt32Array) {
this._fieldEmptyInt32Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
return true;
}
- else if (name == PropertyName._fieldArrayFromList) {
+ if (name == PropertyName._fieldArrayFromList) {
this._fieldArrayFromList = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
return true;
}
- else if (name == PropertyName._fieldVariant) {
+ if (name == PropertyName._fieldVariant) {
this._fieldVariant = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Variant>(value);
return true;
}
- else if (name == PropertyName._fieldGodotObjectOrDerived) {
+ if (name == PropertyName._fieldGodotObjectOrDerived) {
this._fieldGodotObjectOrDerived = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.GodotObject>(value);
return true;
}
- else if (name == PropertyName._fieldGodotResourceTexture) {
+ if (name == PropertyName._fieldGodotResourceTexture) {
this._fieldGodotResourceTexture = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Texture>(value);
return true;
}
- else if (name == PropertyName._fieldStringName) {
+ if (name == PropertyName._fieldStringName) {
this._fieldStringName = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.StringName>(value);
return true;
}
- else if (name == PropertyName._fieldNodePath) {
+ if (name == PropertyName._fieldNodePath) {
this._fieldNodePath = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath>(value);
return true;
}
- else if (name == PropertyName._fieldRid) {
+ if (name == PropertyName._fieldRid) {
this._fieldRid = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid>(value);
return true;
}
- else if (name == PropertyName._fieldGodotDictionary) {
+ if (name == PropertyName._fieldGodotDictionary) {
this._fieldGodotDictionary = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Dictionary>(value);
return true;
}
- else if (name == PropertyName._fieldGodotArray) {
+ if (name == PropertyName._fieldGodotArray) {
this._fieldGodotArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Array>(value);
return true;
}
- else if (name == PropertyName._fieldGodotGenericDictionary) {
+ if (name == PropertyName._fieldGodotGenericDictionary) {
this._fieldGodotGenericDictionary = global::Godot.NativeInterop.VariantUtils.ConvertToDictionary<string, bool>(value);
return true;
}
- else if (name == PropertyName._fieldGodotGenericArray) {
+ if (name == PropertyName._fieldGodotGenericArray) {
this._fieldGodotGenericArray = global::Godot.NativeInterop.VariantUtils.ConvertToArray<int>(value);
return true;
}
- else if (name == PropertyName._fieldEmptyInt64Array) {
+ if (name == PropertyName._fieldEmptyInt64Array) {
this._fieldEmptyInt64Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<long[]>(value);
return true;
}
@@ -503,239 +503,239 @@ partial class ExportedFields
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this._fieldBoolean);
return true;
}
- else if (name == PropertyName._fieldChar) {
+ if (name == PropertyName._fieldChar) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<char>(this._fieldChar);
return true;
}
- else if (name == PropertyName._fieldSByte) {
+ if (name == PropertyName._fieldSByte) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<sbyte>(this._fieldSByte);
return true;
}
- else if (name == PropertyName._fieldInt16) {
+ if (name == PropertyName._fieldInt16) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<short>(this._fieldInt16);
return true;
}
- else if (name == PropertyName._fieldInt32) {
+ if (name == PropertyName._fieldInt32) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this._fieldInt32);
return true;
}
- else if (name == PropertyName._fieldInt64) {
+ if (name == PropertyName._fieldInt64) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long>(this._fieldInt64);
return true;
}
- else if (name == PropertyName._fieldByte) {
+ if (name == PropertyName._fieldByte) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte>(this._fieldByte);
return true;
}
- else if (name == PropertyName._fieldUInt16) {
+ if (name == PropertyName._fieldUInt16) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ushort>(this._fieldUInt16);
return true;
}
- else if (name == PropertyName._fieldUInt32) {
+ if (name == PropertyName._fieldUInt32) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<uint>(this._fieldUInt32);
return true;
}
- else if (name == PropertyName._fieldUInt64) {
+ if (name == PropertyName._fieldUInt64) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ulong>(this._fieldUInt64);
return true;
}
- else if (name == PropertyName._fieldSingle) {
+ if (name == PropertyName._fieldSingle) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this._fieldSingle);
return true;
}
- else if (name == PropertyName._fieldDouble) {
+ if (name == PropertyName._fieldDouble) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double>(this._fieldDouble);
return true;
}
- else if (name == PropertyName._fieldString) {
+ if (name == PropertyName._fieldString) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._fieldString);
return true;
}
- else if (name == PropertyName._fieldVector2) {
+ if (name == PropertyName._fieldVector2) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2>(this._fieldVector2);
return true;
}
- else if (name == PropertyName._fieldVector2I) {
+ if (name == PropertyName._fieldVector2I) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2I>(this._fieldVector2I);
return true;
}
- else if (name == PropertyName._fieldRect2) {
+ if (name == PropertyName._fieldRect2) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2>(this._fieldRect2);
return true;
}
- else if (name == PropertyName._fieldRect2I) {
+ if (name == PropertyName._fieldRect2I) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2I>(this._fieldRect2I);
return true;
}
- else if (name == PropertyName._fieldTransform2D) {
+ if (name == PropertyName._fieldTransform2D) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform2D>(this._fieldTransform2D);
return true;
}
- else if (name == PropertyName._fieldVector3) {
+ if (name == PropertyName._fieldVector3) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3>(this._fieldVector3);
return true;
}
- else if (name == PropertyName._fieldVector3I) {
+ if (name == PropertyName._fieldVector3I) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3I>(this._fieldVector3I);
return true;
}
- else if (name == PropertyName._fieldBasis) {
+ if (name == PropertyName._fieldBasis) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Basis>(this._fieldBasis);
return true;
}
- else if (name == PropertyName._fieldQuaternion) {
+ if (name == PropertyName._fieldQuaternion) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Quaternion>(this._fieldQuaternion);
return true;
}
- else if (name == PropertyName._fieldTransform3D) {
+ if (name == PropertyName._fieldTransform3D) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform3D>(this._fieldTransform3D);
return true;
}
- else if (name == PropertyName._fieldVector4) {
+ if (name == PropertyName._fieldVector4) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4>(this._fieldVector4);
return true;
}
- else if (name == PropertyName._fieldVector4I) {
+ if (name == PropertyName._fieldVector4I) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4I>(this._fieldVector4I);
return true;
}
- else if (name == PropertyName._fieldProjection) {
+ if (name == PropertyName._fieldProjection) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Projection>(this._fieldProjection);
return true;
}
- else if (name == PropertyName._fieldAabb) {
+ if (name == PropertyName._fieldAabb) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Aabb>(this._fieldAabb);
return true;
}
- else if (name == PropertyName._fieldColor) {
+ if (name == PropertyName._fieldColor) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color>(this._fieldColor);
return true;
}
- else if (name == PropertyName._fieldPlane) {
+ if (name == PropertyName._fieldPlane) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Plane>(this._fieldPlane);
return true;
}
- else if (name == PropertyName._fieldCallable) {
+ if (name == PropertyName._fieldCallable) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Callable>(this._fieldCallable);
return true;
}
- else if (name == PropertyName._fieldSignal) {
+ if (name == PropertyName._fieldSignal) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Signal>(this._fieldSignal);
return true;
}
- else if (name == PropertyName._fieldEnum) {
+ if (name == PropertyName._fieldEnum) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedFields.MyEnum>(this._fieldEnum);
return true;
}
- else if (name == PropertyName._fieldFlagsEnum) {
+ if (name == PropertyName._fieldFlagsEnum) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedFields.MyFlagsEnum>(this._fieldFlagsEnum);
return true;
}
- else if (name == PropertyName._fieldByteArray) {
+ if (name == PropertyName._fieldByteArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte[]>(this._fieldByteArray);
return true;
}
- else if (name == PropertyName._fieldInt32Array) {
+ if (name == PropertyName._fieldInt32Array) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this._fieldInt32Array);
return true;
}
- else if (name == PropertyName._fieldInt64Array) {
+ if (name == PropertyName._fieldInt64Array) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long[]>(this._fieldInt64Array);
return true;
}
- else if (name == PropertyName._fieldSingleArray) {
+ if (name == PropertyName._fieldSingleArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float[]>(this._fieldSingleArray);
return true;
}
- else if (name == PropertyName._fieldDoubleArray) {
+ if (name == PropertyName._fieldDoubleArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double[]>(this._fieldDoubleArray);
return true;
}
- else if (name == PropertyName._fieldStringArray) {
+ if (name == PropertyName._fieldStringArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this._fieldStringArray);
return true;
}
- else if (name == PropertyName._fieldStringArrayEnum) {
+ if (name == PropertyName._fieldStringArrayEnum) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this._fieldStringArrayEnum);
return true;
}
- else if (name == PropertyName._fieldVector2Array) {
+ if (name == PropertyName._fieldVector2Array) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2[]>(this._fieldVector2Array);
return true;
}
- else if (name == PropertyName._fieldVector3Array) {
+ if (name == PropertyName._fieldVector3Array) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3[]>(this._fieldVector3Array);
return true;
}
- else if (name == PropertyName._fieldColorArray) {
+ if (name == PropertyName._fieldColorArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color[]>(this._fieldColorArray);
return true;
}
- else if (name == PropertyName._fieldGodotObjectOrDerivedArray) {
+ if (name == PropertyName._fieldGodotObjectOrDerivedArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFromSystemArrayOfGodotObject(this._fieldGodotObjectOrDerivedArray);
return true;
}
- else if (name == PropertyName._fieldStringNameArray) {
+ if (name == PropertyName._fieldStringNameArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.StringName[]>(this._fieldStringNameArray);
return true;
}
- else if (name == PropertyName._fieldNodePathArray) {
+ if (name == PropertyName._fieldNodePathArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath[]>(this._fieldNodePathArray);
return true;
}
- else if (name == PropertyName._fieldRidArray) {
+ if (name == PropertyName._fieldRidArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid[]>(this._fieldRidArray);
return true;
}
- else if (name == PropertyName._fieldEmptyInt32Array) {
+ if (name == PropertyName._fieldEmptyInt32Array) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this._fieldEmptyInt32Array);
return true;
}
- else if (name == PropertyName._fieldArrayFromList) {
+ if (name == PropertyName._fieldArrayFromList) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this._fieldArrayFromList);
return true;
}
- else if (name == PropertyName._fieldVariant) {
+ if (name == PropertyName._fieldVariant) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Variant>(this._fieldVariant);
return true;
}
- else if (name == PropertyName._fieldGodotObjectOrDerived) {
+ if (name == PropertyName._fieldGodotObjectOrDerived) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.GodotObject>(this._fieldGodotObjectOrDerived);
return true;
}
- else if (name == PropertyName._fieldGodotResourceTexture) {
+ if (name == PropertyName._fieldGodotResourceTexture) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Texture>(this._fieldGodotResourceTexture);
return true;
}
- else if (name == PropertyName._fieldStringName) {
+ if (name == PropertyName._fieldStringName) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.StringName>(this._fieldStringName);
return true;
}
- else if (name == PropertyName._fieldNodePath) {
+ if (name == PropertyName._fieldNodePath) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath>(this._fieldNodePath);
return true;
}
- else if (name == PropertyName._fieldRid) {
+ if (name == PropertyName._fieldRid) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid>(this._fieldRid);
return true;
}
- else if (name == PropertyName._fieldGodotDictionary) {
+ if (name == PropertyName._fieldGodotDictionary) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Dictionary>(this._fieldGodotDictionary);
return true;
}
- else if (name == PropertyName._fieldGodotArray) {
+ if (name == PropertyName._fieldGodotArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Array>(this._fieldGodotArray);
return true;
}
- else if (name == PropertyName._fieldGodotGenericDictionary) {
+ if (name == PropertyName._fieldGodotGenericDictionary) {
value = global::Godot.NativeInterop.VariantUtils.CreateFromDictionary(this._fieldGodotGenericDictionary);
return true;
}
- else if (name == PropertyName._fieldGodotGenericArray) {
+ if (name == PropertyName._fieldGodotGenericArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFromArray(this._fieldGodotGenericArray);
return true;
}
- else if (name == PropertyName._fieldEmptyInt64Array) {
+ if (name == PropertyName._fieldEmptyInt64Array) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long[]>(this._fieldEmptyInt64Array);
return true;
}
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 6e0e9fffbe..aa876d8d7d 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
@@ -293,275 +293,275 @@ partial class ExportedProperties
this.NotGenerateComplexLamdaProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.NotGenerateLamdaNoFieldProperty) {
+ if (name == PropertyName.NotGenerateLamdaNoFieldProperty) {
this.NotGenerateLamdaNoFieldProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.NotGenerateComplexReturnProperty) {
+ if (name == PropertyName.NotGenerateComplexReturnProperty) {
this.NotGenerateComplexReturnProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.NotGenerateReturnsProperty) {
+ if (name == PropertyName.NotGenerateReturnsProperty) {
this.NotGenerateReturnsProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.FullPropertyString) {
+ if (name == PropertyName.FullPropertyString) {
this.FullPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.FullPropertyString_Complex) {
+ if (name == PropertyName.FullPropertyString_Complex) {
this.FullPropertyString_Complex = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.LamdaPropertyString) {
+ if (name == PropertyName.LamdaPropertyString) {
this.LamdaPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.PropertyBoolean) {
+ if (name == PropertyName.PropertyBoolean) {
this.PropertyBoolean = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
- else if (name == PropertyName.PropertyChar) {
+ if (name == PropertyName.PropertyChar) {
this.PropertyChar = global::Godot.NativeInterop.VariantUtils.ConvertTo<char>(value);
return true;
}
- else if (name == PropertyName.PropertySByte) {
+ if (name == PropertyName.PropertySByte) {
this.PropertySByte = global::Godot.NativeInterop.VariantUtils.ConvertTo<sbyte>(value);
return true;
}
- else if (name == PropertyName.PropertyInt16) {
+ if (name == PropertyName.PropertyInt16) {
this.PropertyInt16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<short>(value);
return true;
}
- else if (name == PropertyName.PropertyInt32) {
+ if (name == PropertyName.PropertyInt32) {
this.PropertyInt32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
return true;
}
- else if (name == PropertyName.PropertyInt64) {
+ if (name == PropertyName.PropertyInt64) {
this.PropertyInt64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<long>(value);
return true;
}
- else if (name == PropertyName.PropertyByte) {
+ if (name == PropertyName.PropertyByte) {
this.PropertyByte = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte>(value);
return true;
}
- else if (name == PropertyName.PropertyUInt16) {
+ if (name == PropertyName.PropertyUInt16) {
this.PropertyUInt16 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ushort>(value);
return true;
}
- else if (name == PropertyName.PropertyUInt32) {
+ if (name == PropertyName.PropertyUInt32) {
this.PropertyUInt32 = global::Godot.NativeInterop.VariantUtils.ConvertTo<uint>(value);
return true;
}
- else if (name == PropertyName.PropertyUInt64) {
+ if (name == PropertyName.PropertyUInt64) {
this.PropertyUInt64 = global::Godot.NativeInterop.VariantUtils.ConvertTo<ulong>(value);
return true;
}
- else if (name == PropertyName.PropertySingle) {
+ if (name == PropertyName.PropertySingle) {
this.PropertySingle = global::Godot.NativeInterop.VariantUtils.ConvertTo<float>(value);
return true;
}
- else if (name == PropertyName.PropertyDouble) {
+ if (name == PropertyName.PropertyDouble) {
this.PropertyDouble = global::Godot.NativeInterop.VariantUtils.ConvertTo<double>(value);
return true;
}
- else if (name == PropertyName.PropertyString) {
+ if (name == PropertyName.PropertyString) {
this.PropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName.PropertyVector2) {
+ if (name == PropertyName.PropertyVector2) {
this.PropertyVector2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2>(value);
return true;
}
- else if (name == PropertyName.PropertyVector2I) {
+ if (name == PropertyName.PropertyVector2I) {
this.PropertyVector2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2I>(value);
return true;
}
- else if (name == PropertyName.PropertyRect2) {
+ if (name == PropertyName.PropertyRect2) {
this.PropertyRect2 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2>(value);
return true;
}
- else if (name == PropertyName.PropertyRect2I) {
+ if (name == PropertyName.PropertyRect2I) {
this.PropertyRect2I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rect2I>(value);
return true;
}
- else if (name == PropertyName.PropertyTransform2D) {
+ if (name == PropertyName.PropertyTransform2D) {
this.PropertyTransform2D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform2D>(value);
return true;
}
- else if (name == PropertyName.PropertyVector3) {
+ if (name == PropertyName.PropertyVector3) {
this.PropertyVector3 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3>(value);
return true;
}
- else if (name == PropertyName.PropertyVector3I) {
+ if (name == PropertyName.PropertyVector3I) {
this.PropertyVector3I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3I>(value);
return true;
}
- else if (name == PropertyName.PropertyBasis) {
+ if (name == PropertyName.PropertyBasis) {
this.PropertyBasis = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Basis>(value);
return true;
}
- else if (name == PropertyName.PropertyQuaternion) {
+ if (name == PropertyName.PropertyQuaternion) {
this.PropertyQuaternion = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Quaternion>(value);
return true;
}
- else if (name == PropertyName.PropertyTransform3D) {
+ if (name == PropertyName.PropertyTransform3D) {
this.PropertyTransform3D = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Transform3D>(value);
return true;
}
- else if (name == PropertyName.PropertyVector4) {
+ if (name == PropertyName.PropertyVector4) {
this.PropertyVector4 = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4>(value);
return true;
}
- else if (name == PropertyName.PropertyVector4I) {
+ if (name == PropertyName.PropertyVector4I) {
this.PropertyVector4I = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector4I>(value);
return true;
}
- else if (name == PropertyName.PropertyProjection) {
+ if (name == PropertyName.PropertyProjection) {
this.PropertyProjection = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Projection>(value);
return true;
}
- else if (name == PropertyName.PropertyAabb) {
+ if (name == PropertyName.PropertyAabb) {
this.PropertyAabb = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Aabb>(value);
return true;
}
- else if (name == PropertyName.PropertyColor) {
+ if (name == PropertyName.PropertyColor) {
this.PropertyColor = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color>(value);
return true;
}
- else if (name == PropertyName.PropertyPlane) {
+ if (name == PropertyName.PropertyPlane) {
this.PropertyPlane = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Plane>(value);
return true;
}
- else if (name == PropertyName.PropertyCallable) {
+ if (name == PropertyName.PropertyCallable) {
this.PropertyCallable = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Callable>(value);
return true;
}
- else if (name == PropertyName.PropertySignal) {
+ if (name == PropertyName.PropertySignal) {
this.PropertySignal = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Signal>(value);
return true;
}
- else if (name == PropertyName.PropertyEnum) {
+ if (name == PropertyName.PropertyEnum) {
this.PropertyEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedProperties.MyEnum>(value);
return true;
}
- else if (name == PropertyName.PropertyFlagsEnum) {
+ if (name == PropertyName.PropertyFlagsEnum) {
this.PropertyFlagsEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::ExportedProperties.MyFlagsEnum>(value);
return true;
}
- else if (name == PropertyName.PropertyByteArray) {
+ if (name == PropertyName.PropertyByteArray) {
this.PropertyByteArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<byte[]>(value);
return true;
}
- else if (name == PropertyName.PropertyInt32Array) {
+ if (name == PropertyName.PropertyInt32Array) {
this.PropertyInt32Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<int[]>(value);
return true;
}
- else if (name == PropertyName.PropertyInt64Array) {
+ if (name == PropertyName.PropertyInt64Array) {
this.PropertyInt64Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<long[]>(value);
return true;
}
- else if (name == PropertyName.PropertySingleArray) {
+ if (name == PropertyName.PropertySingleArray) {
this.PropertySingleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<float[]>(value);
return true;
}
- else if (name == PropertyName.PropertyDoubleArray) {
+ if (name == PropertyName.PropertyDoubleArray) {
this.PropertyDoubleArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<double[]>(value);
return true;
}
- else if (name == PropertyName.PropertyStringArray) {
+ if (name == PropertyName.PropertyStringArray) {
this.PropertyStringArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
return true;
}
- else if (name == PropertyName.PropertyStringArrayEnum) {
+ if (name == PropertyName.PropertyStringArrayEnum) {
this.PropertyStringArrayEnum = global::Godot.NativeInterop.VariantUtils.ConvertTo<string[]>(value);
return true;
}
- else if (name == PropertyName.PropertyVector2Array) {
+ if (name == PropertyName.PropertyVector2Array) {
this.PropertyVector2Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector2[]>(value);
return true;
}
- else if (name == PropertyName.PropertyVector3Array) {
+ if (name == PropertyName.PropertyVector3Array) {
this.PropertyVector3Array = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Vector3[]>(value);
return true;
}
- else if (name == PropertyName.PropertyColorArray) {
+ if (name == PropertyName.PropertyColorArray) {
this.PropertyColorArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Color[]>(value);
return true;
}
- else if (name == PropertyName.PropertyGodotObjectOrDerivedArray) {
+ if (name == PropertyName.PropertyGodotObjectOrDerivedArray) {
this.PropertyGodotObjectOrDerivedArray = global::Godot.NativeInterop.VariantUtils.ConvertToSystemArrayOfGodotObject<global::Godot.GodotObject>(value);
return true;
}
- else if (name == PropertyName.field_StringNameArray) {
+ if (name == PropertyName.field_StringNameArray) {
this.field_StringNameArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.StringName[]>(value);
return true;
}
- else if (name == PropertyName.field_NodePathArray) {
+ if (name == PropertyName.field_NodePathArray) {
this.field_NodePathArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath[]>(value);
return true;
}
- else if (name == PropertyName.field_RidArray) {
+ if (name == PropertyName.field_RidArray) {
this.field_RidArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid[]>(value);
return true;
}
- else if (name == PropertyName.PropertyVariant) {
+ if (name == PropertyName.PropertyVariant) {
this.PropertyVariant = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Variant>(value);
return true;
}
- else if (name == PropertyName.PropertyGodotObjectOrDerived) {
+ if (name == PropertyName.PropertyGodotObjectOrDerived) {
this.PropertyGodotObjectOrDerived = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.GodotObject>(value);
return true;
}
- else if (name == PropertyName.PropertyGodotResourceTexture) {
+ if (name == PropertyName.PropertyGodotResourceTexture) {
this.PropertyGodotResourceTexture = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Texture>(value);
return true;
}
- else if (name == PropertyName.PropertyStringName) {
+ if (name == PropertyName.PropertyStringName) {
this.PropertyStringName = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.StringName>(value);
return true;
}
- else if (name == PropertyName.PropertyNodePath) {
+ if (name == PropertyName.PropertyNodePath) {
this.PropertyNodePath = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath>(value);
return true;
}
- else if (name == PropertyName.PropertyRid) {
+ if (name == PropertyName.PropertyRid) {
this.PropertyRid = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Rid>(value);
return true;
}
- else if (name == PropertyName.PropertyGodotDictionary) {
+ if (name == PropertyName.PropertyGodotDictionary) {
this.PropertyGodotDictionary = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Dictionary>(value);
return true;
}
- else if (name == PropertyName.PropertyGodotArray) {
+ if (name == PropertyName.PropertyGodotArray) {
this.PropertyGodotArray = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.Collections.Array>(value);
return true;
}
- else if (name == PropertyName.PropertyGodotGenericDictionary) {
+ if (name == PropertyName.PropertyGodotGenericDictionary) {
this.PropertyGodotGenericDictionary = global::Godot.NativeInterop.VariantUtils.ConvertToDictionary<string, bool>(value);
return true;
}
- else if (name == PropertyName.PropertyGodotGenericArray) {
+ if (name == PropertyName.PropertyGodotGenericArray) {
this.PropertyGodotGenericArray = global::Godot.NativeInterop.VariantUtils.ConvertToArray<int>(value);
return true;
}
- else if (name == PropertyName._notGeneratePropertyString) {
+ if (name == PropertyName._notGeneratePropertyString) {
this._notGeneratePropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName._notGeneratePropertyInt) {
+ if (name == PropertyName._notGeneratePropertyInt) {
this._notGeneratePropertyInt = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
return true;
}
- else if (name == PropertyName._fullPropertyString) {
+ if (name == PropertyName._fullPropertyString) {
this._fullPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName._fullPropertyStringComplex) {
+ if (name == PropertyName._fullPropertyStringComplex) {
this._fullPropertyStringComplex = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
- else if (name == PropertyName._lamdaPropertyString) {
+ if (name == PropertyName._lamdaPropertyString) {
this._lamdaPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo<string>(value);
return true;
}
@@ -575,275 +575,275 @@ partial class ExportedProperties
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerateComplexLamdaProperty);
return true;
}
- else if (name == PropertyName.NotGenerateLamdaNoFieldProperty) {
+ if (name == PropertyName.NotGenerateLamdaNoFieldProperty) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerateLamdaNoFieldProperty);
return true;
}
- else if (name == PropertyName.NotGenerateComplexReturnProperty) {
+ if (name == PropertyName.NotGenerateComplexReturnProperty) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerateComplexReturnProperty);
return true;
}
- else if (name == PropertyName.NotGenerateReturnsProperty) {
+ if (name == PropertyName.NotGenerateReturnsProperty) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.NotGenerateReturnsProperty);
return true;
}
- else if (name == PropertyName.FullPropertyString) {
+ if (name == PropertyName.FullPropertyString) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.FullPropertyString);
return true;
}
- else if (name == PropertyName.FullPropertyString_Complex) {
+ if (name == PropertyName.FullPropertyString_Complex) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.FullPropertyString_Complex);
return true;
}
- else if (name == PropertyName.LamdaPropertyString) {
+ if (name == PropertyName.LamdaPropertyString) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.LamdaPropertyString);
return true;
}
- else if (name == PropertyName.PropertyBoolean) {
+ if (name == PropertyName.PropertyBoolean) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this.PropertyBoolean);
return true;
}
- else if (name == PropertyName.PropertyChar) {
+ if (name == PropertyName.PropertyChar) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<char>(this.PropertyChar);
return true;
}
- else if (name == PropertyName.PropertySByte) {
+ if (name == PropertyName.PropertySByte) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<sbyte>(this.PropertySByte);
return true;
}
- else if (name == PropertyName.PropertyInt16) {
+ if (name == PropertyName.PropertyInt16) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<short>(this.PropertyInt16);
return true;
}
- else if (name == PropertyName.PropertyInt32) {
+ if (name == PropertyName.PropertyInt32) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this.PropertyInt32);
return true;
}
- else if (name == PropertyName.PropertyInt64) {
+ if (name == PropertyName.PropertyInt64) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long>(this.PropertyInt64);
return true;
}
- else if (name == PropertyName.PropertyByte) {
+ if (name == PropertyName.PropertyByte) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte>(this.PropertyByte);
return true;
}
- else if (name == PropertyName.PropertyUInt16) {
+ if (name == PropertyName.PropertyUInt16) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ushort>(this.PropertyUInt16);
return true;
}
- else if (name == PropertyName.PropertyUInt32) {
+ if (name == PropertyName.PropertyUInt32) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<uint>(this.PropertyUInt32);
return true;
}
- else if (name == PropertyName.PropertyUInt64) {
+ if (name == PropertyName.PropertyUInt64) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<ulong>(this.PropertyUInt64);
return true;
}
- else if (name == PropertyName.PropertySingle) {
+ if (name == PropertyName.PropertySingle) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float>(this.PropertySingle);
return true;
}
- else if (name == PropertyName.PropertyDouble) {
+ if (name == PropertyName.PropertyDouble) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double>(this.PropertyDouble);
return true;
}
- else if (name == PropertyName.PropertyString) {
+ if (name == PropertyName.PropertyString) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.PropertyString);
return true;
}
- else if (name == PropertyName.PropertyVector2) {
+ if (name == PropertyName.PropertyVector2) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2>(this.PropertyVector2);
return true;
}
- else if (name == PropertyName.PropertyVector2I) {
+ if (name == PropertyName.PropertyVector2I) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2I>(this.PropertyVector2I);
return true;
}
- else if (name == PropertyName.PropertyRect2) {
+ if (name == PropertyName.PropertyRect2) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2>(this.PropertyRect2);
return true;
}
- else if (name == PropertyName.PropertyRect2I) {
+ if (name == PropertyName.PropertyRect2I) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rect2I>(this.PropertyRect2I);
return true;
}
- else if (name == PropertyName.PropertyTransform2D) {
+ if (name == PropertyName.PropertyTransform2D) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform2D>(this.PropertyTransform2D);
return true;
}
- else if (name == PropertyName.PropertyVector3) {
+ if (name == PropertyName.PropertyVector3) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3>(this.PropertyVector3);
return true;
}
- else if (name == PropertyName.PropertyVector3I) {
+ if (name == PropertyName.PropertyVector3I) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3I>(this.PropertyVector3I);
return true;
}
- else if (name == PropertyName.PropertyBasis) {
+ if (name == PropertyName.PropertyBasis) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Basis>(this.PropertyBasis);
return true;
}
- else if (name == PropertyName.PropertyQuaternion) {
+ if (name == PropertyName.PropertyQuaternion) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Quaternion>(this.PropertyQuaternion);
return true;
}
- else if (name == PropertyName.PropertyTransform3D) {
+ if (name == PropertyName.PropertyTransform3D) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Transform3D>(this.PropertyTransform3D);
return true;
}
- else if (name == PropertyName.PropertyVector4) {
+ if (name == PropertyName.PropertyVector4) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4>(this.PropertyVector4);
return true;
}
- else if (name == PropertyName.PropertyVector4I) {
+ if (name == PropertyName.PropertyVector4I) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector4I>(this.PropertyVector4I);
return true;
}
- else if (name == PropertyName.PropertyProjection) {
+ if (name == PropertyName.PropertyProjection) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Projection>(this.PropertyProjection);
return true;
}
- else if (name == PropertyName.PropertyAabb) {
+ if (name == PropertyName.PropertyAabb) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Aabb>(this.PropertyAabb);
return true;
}
- else if (name == PropertyName.PropertyColor) {
+ if (name == PropertyName.PropertyColor) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color>(this.PropertyColor);
return true;
}
- else if (name == PropertyName.PropertyPlane) {
+ if (name == PropertyName.PropertyPlane) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Plane>(this.PropertyPlane);
return true;
}
- else if (name == PropertyName.PropertyCallable) {
+ if (name == PropertyName.PropertyCallable) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Callable>(this.PropertyCallable);
return true;
}
- else if (name == PropertyName.PropertySignal) {
+ if (name == PropertyName.PropertySignal) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Signal>(this.PropertySignal);
return true;
}
- else if (name == PropertyName.PropertyEnum) {
+ if (name == PropertyName.PropertyEnum) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedProperties.MyEnum>(this.PropertyEnum);
return true;
}
- else if (name == PropertyName.PropertyFlagsEnum) {
+ if (name == PropertyName.PropertyFlagsEnum) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::ExportedProperties.MyFlagsEnum>(this.PropertyFlagsEnum);
return true;
}
- else if (name == PropertyName.PropertyByteArray) {
+ if (name == PropertyName.PropertyByteArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<byte[]>(this.PropertyByteArray);
return true;
}
- else if (name == PropertyName.PropertyInt32Array) {
+ if (name == PropertyName.PropertyInt32Array) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int[]>(this.PropertyInt32Array);
return true;
}
- else if (name == PropertyName.PropertyInt64Array) {
+ if (name == PropertyName.PropertyInt64Array) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<long[]>(this.PropertyInt64Array);
return true;
}
- else if (name == PropertyName.PropertySingleArray) {
+ if (name == PropertyName.PropertySingleArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<float[]>(this.PropertySingleArray);
return true;
}
- else if (name == PropertyName.PropertyDoubleArray) {
+ if (name == PropertyName.PropertyDoubleArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<double[]>(this.PropertyDoubleArray);
return true;
}
- else if (name == PropertyName.PropertyStringArray) {
+ if (name == PropertyName.PropertyStringArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this.PropertyStringArray);
return true;
}
- else if (name == PropertyName.PropertyStringArrayEnum) {
+ if (name == PropertyName.PropertyStringArrayEnum) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string[]>(this.PropertyStringArrayEnum);
return true;
}
- else if (name == PropertyName.PropertyVector2Array) {
+ if (name == PropertyName.PropertyVector2Array) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector2[]>(this.PropertyVector2Array);
return true;
}
- else if (name == PropertyName.PropertyVector3Array) {
+ if (name == PropertyName.PropertyVector3Array) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Vector3[]>(this.PropertyVector3Array);
return true;
}
- else if (name == PropertyName.PropertyColorArray) {
+ if (name == PropertyName.PropertyColorArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Color[]>(this.PropertyColorArray);
return true;
}
- else if (name == PropertyName.PropertyGodotObjectOrDerivedArray) {
+ if (name == PropertyName.PropertyGodotObjectOrDerivedArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFromSystemArrayOfGodotObject(this.PropertyGodotObjectOrDerivedArray);
return true;
}
- else if (name == PropertyName.field_StringNameArray) {
+ if (name == PropertyName.field_StringNameArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.StringName[]>(this.field_StringNameArray);
return true;
}
- else if (name == PropertyName.field_NodePathArray) {
+ if (name == PropertyName.field_NodePathArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath[]>(this.field_NodePathArray);
return true;
}
- else if (name == PropertyName.field_RidArray) {
+ if (name == PropertyName.field_RidArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid[]>(this.field_RidArray);
return true;
}
- else if (name == PropertyName.PropertyVariant) {
+ if (name == PropertyName.PropertyVariant) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Variant>(this.PropertyVariant);
return true;
}
- else if (name == PropertyName.PropertyGodotObjectOrDerived) {
+ if (name == PropertyName.PropertyGodotObjectOrDerived) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.GodotObject>(this.PropertyGodotObjectOrDerived);
return true;
}
- else if (name == PropertyName.PropertyGodotResourceTexture) {
+ if (name == PropertyName.PropertyGodotResourceTexture) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Texture>(this.PropertyGodotResourceTexture);
return true;
}
- else if (name == PropertyName.PropertyStringName) {
+ if (name == PropertyName.PropertyStringName) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.StringName>(this.PropertyStringName);
return true;
}
- else if (name == PropertyName.PropertyNodePath) {
+ if (name == PropertyName.PropertyNodePath) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath>(this.PropertyNodePath);
return true;
}
- else if (name == PropertyName.PropertyRid) {
+ if (name == PropertyName.PropertyRid) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Rid>(this.PropertyRid);
return true;
}
- else if (name == PropertyName.PropertyGodotDictionary) {
+ if (name == PropertyName.PropertyGodotDictionary) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Dictionary>(this.PropertyGodotDictionary);
return true;
}
- else if (name == PropertyName.PropertyGodotArray) {
+ if (name == PropertyName.PropertyGodotArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.Collections.Array>(this.PropertyGodotArray);
return true;
}
- else if (name == PropertyName.PropertyGodotGenericDictionary) {
+ if (name == PropertyName.PropertyGodotGenericDictionary) {
value = global::Godot.NativeInterop.VariantUtils.CreateFromDictionary(this.PropertyGodotGenericDictionary);
return true;
}
- else if (name == PropertyName.PropertyGodotGenericArray) {
+ if (name == PropertyName.PropertyGodotGenericArray) {
value = global::Godot.NativeInterop.VariantUtils.CreateFromArray(this.PropertyGodotGenericArray);
return true;
}
- else if (name == PropertyName._notGeneratePropertyString) {
+ if (name == PropertyName._notGeneratePropertyString) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._notGeneratePropertyString);
return true;
}
- else if (name == PropertyName._notGeneratePropertyInt) {
+ if (name == PropertyName._notGeneratePropertyInt) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this._notGeneratePropertyInt);
return true;
}
- else if (name == PropertyName._fullPropertyString) {
+ if (name == PropertyName._fullPropertyString) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._fullPropertyString);
return true;
}
- else if (name == PropertyName._fullPropertyStringComplex) {
+ if (name == PropertyName._fullPropertyStringComplex) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._fullPropertyStringComplex);
return true;
}
- else if (name == PropertyName._lamdaPropertyString) {
+ if (name == PropertyName._lamdaPropertyString) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this._lamdaPropertyString);
return true;
}
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 91f808f55e..cabdbe8d99 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
@@ -41,7 +41,7 @@ partial class MixedReadOnlyWriteOnly
this.WriteOnlyProperty = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
- else if (name == PropertyName._writeOnlyBackingField) {
+ if (name == PropertyName._writeOnlyBackingField) {
this._writeOnlyBackingField = global::Godot.NativeInterop.VariantUtils.ConvertTo<bool>(value);
return true;
}
@@ -55,19 +55,19 @@ partial class MixedReadOnlyWriteOnly
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyAutoProperty);
return true;
}
- else if (name == PropertyName.ReadOnlyProperty) {
+ if (name == PropertyName.ReadOnlyProperty) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyProperty);
return true;
}
- else if (name == PropertyName.InitOnlyAutoProperty) {
+ if (name == PropertyName.InitOnlyAutoProperty) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.InitOnlyAutoProperty);
return true;
}
- else if (name == PropertyName.ReadOnlyField) {
+ if (name == PropertyName.ReadOnlyField) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<string>(this.ReadOnlyField);
return true;
}
- else if (name == PropertyName._writeOnlyBackingField) {
+ if (name == PropertyName._writeOnlyBackingField) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<bool>(this._writeOnlyBackingField);
return true;
}
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptMethods.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptMethods.generated.cs
index 8656f4617e..a6e58bf27d 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptMethods.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptMethods.generated.cs
@@ -54,7 +54,7 @@ partial class ScriptBoilerplate
if (method == MethodName._Process) {
return true;
}
- else if (method == MethodName.Bazz) {
+ if (method == MethodName.Bazz) {
return true;
}
return base.HasGodotClassMethod(method);
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptProperties.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptProperties.generated.cs
index 09368b7ab6..81cc27502f 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptProperties.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ScriptBoilerplate_ScriptProperties.generated.cs
@@ -25,7 +25,7 @@ partial class ScriptBoilerplate
this._nodePath = global::Godot.NativeInterop.VariantUtils.ConvertTo<global::Godot.NodePath>(value);
return true;
}
- else if (name == PropertyName._velocity) {
+ if (name == PropertyName._velocity) {
this._velocity = global::Godot.NativeInterop.VariantUtils.ConvertTo<int>(value);
return true;
}
@@ -39,7 +39,7 @@ partial class ScriptBoilerplate
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<global::Godot.NodePath>(this._nodePath);
return true;
}
- else if (name == PropertyName._velocity) {
+ if (name == PropertyName._velocity) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom<int>(this._velocity);
return true;
}
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 f314f7dada..39d3a6f94e 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptMethodsGenerator.cs
@@ -253,11 +253,9 @@ namespace Godot.SourceGenerators
source.Append(" [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]\n");
source.Append(" protected override bool HasGodotClassMethod(in godot_string_name method)\n {\n");
- bool isFirstEntry = true;
foreach (string methodName in distinctMethodNames)
{
- GenerateHasMethodEntry(methodName, source, isFirstEntry);
- isFirstEntry = false;
+ GenerateHasMethodEntry(methodName, source);
}
source.Append(" return base.HasGodotClassMethod(method);\n");
@@ -412,13 +410,10 @@ namespace Godot.SourceGenerators
private static void GenerateHasMethodEntry(
string methodName,
- StringBuilder source,
- bool isFirstEntry
+ StringBuilder source
)
{
source.Append(" ");
- if (!isFirstEntry)
- source.Append("else ");
source.Append("if (method == MethodName.");
source.Append(methodName);
source.Append(") {\n return true;\n }\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 a25a2c2f68..02c2cd4034 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertiesGenerator.cs
@@ -172,7 +172,6 @@ namespace Godot.SourceGenerators
if (godotClassProperties.Length > 0 || godotClassFields.Length > 0)
{
- bool isFirstEntry;
// Generate SetGodotClassPropertyValue
@@ -186,15 +185,13 @@ namespace Godot.SourceGenerators
source.Append(" protected override bool SetGodotClassPropertyValue(in godot_string_name name, ");
source.Append("in godot_variant value)\n {\n");
- isFirstEntry = true;
foreach (var property in godotClassProperties)
{
if (property.PropertySymbol.IsReadOnly || property.PropertySymbol.SetMethod!.IsInitOnly)
continue;
GeneratePropertySetter(property.PropertySymbol.Name,
- property.PropertySymbol.Type, property.Type, source, isFirstEntry);
- isFirstEntry = false;
+ property.PropertySymbol.Type, property.Type, source);
}
foreach (var field in godotClassFields)
@@ -203,8 +200,7 @@ namespace Godot.SourceGenerators
continue;
GeneratePropertySetter(field.FieldSymbol.Name,
- field.FieldSymbol.Type, field.Type, source, isFirstEntry);
- isFirstEntry = false;
+ field.FieldSymbol.Type, field.Type, source);
}
source.Append(" return base.SetGodotClassPropertyValue(name, value);\n");
@@ -222,22 +218,19 @@ namespace Godot.SourceGenerators
source.Append(" protected override bool GetGodotClassPropertyValue(in godot_string_name name, ");
source.Append("out godot_variant value)\n {\n");
- isFirstEntry = true;
foreach (var property in godotClassProperties)
{
if (property.PropertySymbol.IsWriteOnly)
continue;
GeneratePropertyGetter(property.PropertySymbol.Name,
- property.PropertySymbol.Type, property.Type, source, isFirstEntry);
- isFirstEntry = false;
+ property.PropertySymbol.Type, property.Type, source);
}
foreach (var field in godotClassFields)
{
GeneratePropertyGetter(field.FieldSymbol.Name,
- field.FieldSymbol.Type, field.Type, source, isFirstEntry);
- isFirstEntry = false;
+ field.FieldSymbol.Type, field.Type, source);
}
source.Append(" return base.GetGodotClassPropertyValue(name, out value);\n");
@@ -318,15 +311,11 @@ namespace Godot.SourceGenerators
string propertyMemberName,
ITypeSymbol propertyTypeSymbol,
MarshalType propertyMarshalType,
- StringBuilder source,
- bool isFirstEntry
+ StringBuilder source
)
{
source.Append(" ");
- if (!isFirstEntry)
- source.Append("else ");
-
source.Append("if (name == PropertyName.")
.Append(propertyMemberName)
.Append(") {\n")
@@ -343,15 +332,11 @@ namespace Godot.SourceGenerators
string propertyMemberName,
ITypeSymbol propertyTypeSymbol,
MarshalType propertyMarshalType,
- StringBuilder source,
- bool isFirstEntry
+ StringBuilder source
)
{
source.Append(" ");
- if (!isFirstEntry)
- source.Append("else ");
-
source.Append("if (name == PropertyName.")
.Append(propertyMemberName)
.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 107bd93faa..deac5f2bcf 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSignalsGenerator.cs
@@ -319,11 +319,9 @@ namespace Godot.SourceGenerators
source.Append(
" protected override bool HasGodotClassSignal(in godot_string_name signal)\n {\n");
- bool isFirstEntry = true;
foreach (var signal in godotSignalDelegates)
{
- GenerateHasSignalEntry(signal.Name, source, isFirstEntry);
- isFirstEntry = false;
+ GenerateHasSignalEntry(signal.Name, source);
}
source.Append(" return base.HasGodotClassSignal(signal);\n");
@@ -473,13 +471,10 @@ namespace Godot.SourceGenerators
private static void GenerateHasSignalEntry(
string signalName,
- StringBuilder source,
- bool isFirstEntry
+ StringBuilder source
)
{
source.Append(" ");
- if (!isFirstEntry)
- source.Append("else ");
source.Append("if (signal == SignalName.");
source.Append(signalName);
source.Append(") {\n return true;\n }\n");
diff --git a/modules/multiplayer/editor/editor_network_profiler.cpp b/modules/multiplayer/editor/editor_network_profiler.cpp
index a45e5ffdc0..75941207c7 100644
--- a/modules/multiplayer/editor/editor_network_profiler.cpp
+++ b/modules/multiplayer/editor/editor_network_profiler.cpp
@@ -260,12 +260,12 @@ EditorNetworkProfiler::EditorNetworkProfiler() {
activate = memnew(Button);
activate->set_toggle_mode(true);
activate->set_text(TTR("Start"));
- activate->connect("pressed", callable_mp(this, &EditorNetworkProfiler::_activate_pressed));
+ activate->connect(SceneStringName(pressed), callable_mp(this, &EditorNetworkProfiler::_activate_pressed));
hb->add_child(activate);
clear_button = memnew(Button);
clear_button->set_text(TTR("Clear"));
- clear_button->connect("pressed", callable_mp(this, &EditorNetworkProfiler::_clear_pressed));
+ clear_button->connect(SceneStringName(pressed), callable_mp(this, &EditorNetworkProfiler::_clear_pressed));
hb->add_child(clear_button);
hb->add_spacer();
diff --git a/modules/multiplayer/editor/multiplayer_editor_plugin.cpp b/modules/multiplayer/editor/multiplayer_editor_plugin.cpp
index 29ebc38edf..a496f5dfa2 100644
--- a/modules/multiplayer/editor/multiplayer_editor_plugin.cpp
+++ b/modules/multiplayer/editor/multiplayer_editor_plugin.cpp
@@ -116,7 +116,7 @@ MultiplayerEditorPlugin::MultiplayerEditorPlugin() {
repl_editor = memnew(ReplicationEditor);
button = EditorNode::get_bottom_panel()->add_item(TTR("Replication"), repl_editor, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_replication_bottom_panel", TTR("Toggle Replication Bottom Panel")));
button->hide();
- repl_editor->get_pin()->connect("pressed", callable_mp(this, &MultiplayerEditorPlugin::_pinned));
+ repl_editor->get_pin()->connect(SceneStringName(pressed), callable_mp(this, &MultiplayerEditorPlugin::_pinned));
debugger.instantiate();
debugger->connect("open_request", callable_mp(this, &MultiplayerEditorPlugin::_open_request));
}
diff --git a/modules/multiplayer/editor/replication_editor.cpp b/modules/multiplayer/editor/replication_editor.cpp
index 08e7ba360a..3cc0a5ae53 100644
--- a/modules/multiplayer/editor/replication_editor.cpp
+++ b/modules/multiplayer/editor/replication_editor.cpp
@@ -244,7 +244,7 @@ ReplicationEditor::ReplicationEditor() {
vb->add_child(hb);
add_pick_button = memnew(Button);
- add_pick_button->connect("pressed", callable_mp(this, &ReplicationEditor::_pick_new_property));
+ add_pick_button->connect(SceneStringName(pressed), callable_mp(this, &ReplicationEditor::_pick_new_property));
add_pick_button->set_text(TTR("Add property to sync..."));
hb->add_child(add_pick_button);
@@ -260,7 +260,7 @@ ReplicationEditor::ReplicationEditor() {
hb->add_child(np_line_edit);
add_from_path_button = memnew(Button);
- add_from_path_button->connect("pressed", callable_mp(this, &ReplicationEditor::_add_pressed));
+ add_from_path_button->connect(SceneStringName(pressed), callable_mp(this, &ReplicationEditor::_add_pressed));
add_from_path_button->set_text(TTR("Add from path"));
hb->add_child(add_from_path_button);
diff --git a/modules/navigation/editor/navigation_mesh_editor_plugin.cpp b/modules/navigation/editor/navigation_mesh_editor_plugin.cpp
index d7bf1cdd38..d07d3cdff5 100644
--- a/modules/navigation/editor/navigation_mesh_editor_plugin.cpp
+++ b/modules/navigation/editor/navigation_mesh_editor_plugin.cpp
@@ -138,14 +138,14 @@ NavigationMeshEditor::NavigationMeshEditor() {
button_bake->set_toggle_mode(true);
button_bake->set_text(TTR("Bake NavigationMesh"));
button_bake->set_tooltip_text(TTR("Bakes the NavigationMesh by first parsing the scene for source geometry and then creating the navigation mesh vertices and polygons."));
- button_bake->connect("pressed", callable_mp(this, &NavigationMeshEditor::_bake_pressed));
+ button_bake->connect(SceneStringName(pressed), callable_mp(this, &NavigationMeshEditor::_bake_pressed));
button_reset = memnew(Button);
button_reset->set_theme_type_variation("FlatButton");
bake_hbox->add_child(button_reset);
button_reset->set_text(TTR("Clear NavigationMesh"));
button_reset->set_tooltip_text(TTR("Clears the internal NavigationMesh vertices and polygons."));
- button_reset->connect("pressed", callable_mp(this, &NavigationMeshEditor::_clear_pressed));
+ button_reset->connect(SceneStringName(pressed), callable_mp(this, &NavigationMeshEditor::_clear_pressed));
bake_info = memnew(Label);
bake_hbox->add_child(bake_info);
diff --git a/modules/noise/editor/noise_editor_plugin.cpp b/modules/noise/editor/noise_editor_plugin.cpp
index 917fa0cd15..200f31cca1 100644
--- a/modules/noise/editor/noise_editor_plugin.cpp
+++ b/modules/noise/editor/noise_editor_plugin.cpp
@@ -67,7 +67,7 @@ public:
_3d_space_switch->set_toggle_mode(true);
_3d_space_switch->set_offset(SIDE_LEFT, PADDING_3D_SPACE_SWITCH);
_3d_space_switch->set_offset(SIDE_TOP, PADDING_3D_SPACE_SWITCH);
- _3d_space_switch->connect("pressed", callable_mp(this, &NoisePreview::_on_3d_button_pressed));
+ _3d_space_switch->connect(SceneStringName(pressed), callable_mp(this, &NoisePreview::_on_3d_button_pressed));
add_child(_3d_space_switch);
}
diff --git a/modules/openxr/editor/openxr_action_editor.cpp b/modules/openxr/editor/openxr_action_editor.cpp
index 4b188471a0..06d2e8dcc9 100644
--- a/modules/openxr/editor/openxr_action_editor.cpp
+++ b/modules/openxr/editor/openxr_action_editor.cpp
@@ -159,7 +159,7 @@ OpenXRActionEditor::OpenXRActionEditor(Ref<OpenXRAction> p_action) {
rem_action = memnew(Button);
rem_action->set_tooltip_text(TTR("Remove action"));
- rem_action->connect("pressed", callable_mp(this, &OpenXRActionEditor::_on_remove_action));
+ rem_action->connect(SceneStringName(pressed), callable_mp(this, &OpenXRActionEditor::_on_remove_action));
rem_action->set_flat(true);
add_child(rem_action);
}
diff --git a/modules/openxr/editor/openxr_action_map_editor.cpp b/modules/openxr/editor/openxr_action_map_editor.cpp
index 5dd737756a..62b4a427b9 100644
--- a/modules/openxr/editor/openxr_action_map_editor.cpp
+++ b/modules/openxr/editor/openxr_action_map_editor.cpp
@@ -402,13 +402,13 @@ OpenXRActionMapEditor::OpenXRActionMapEditor() {
add_action_set = memnew(Button);
add_action_set->set_text(TTR("Add Action Set"));
add_action_set->set_tooltip_text(TTR("Add an action set."));
- add_action_set->connect("pressed", callable_mp(this, &OpenXRActionMapEditor::_on_add_action_set));
+ add_action_set->connect(SceneStringName(pressed), callable_mp(this, &OpenXRActionMapEditor::_on_add_action_set));
top_hb->add_child(add_action_set);
add_interaction_profile = memnew(Button);
add_interaction_profile->set_text(TTR("Add profile"));
add_interaction_profile->set_tooltip_text(TTR("Add an interaction profile."));
- add_interaction_profile->connect("pressed", callable_mp(this, &OpenXRActionMapEditor::_on_add_interaction_profile));
+ add_interaction_profile->connect(SceneStringName(pressed), callable_mp(this, &OpenXRActionMapEditor::_on_add_interaction_profile));
top_hb->add_child(add_interaction_profile);
VSeparator *vseparator = memnew(VSeparator);
@@ -417,13 +417,13 @@ OpenXRActionMapEditor::OpenXRActionMapEditor() {
save_as = memnew(Button);
save_as->set_text(TTR("Save"));
save_as->set_tooltip_text(TTR("Save this OpenXR action map."));
- save_as->connect("pressed", callable_mp(this, &OpenXRActionMapEditor::_on_save_action_map));
+ save_as->connect(SceneStringName(pressed), callable_mp(this, &OpenXRActionMapEditor::_on_save_action_map));
top_hb->add_child(save_as);
_default = memnew(Button);
_default->set_text(TTR("Reset to Default"));
_default->set_tooltip_text(TTR("Reset to default OpenXR action map."));
- _default->connect("pressed", callable_mp(this, &OpenXRActionMapEditor::_on_reset_to_default_layout));
+ _default->connect(SceneStringName(pressed), callable_mp(this, &OpenXRActionMapEditor::_on_reset_to_default_layout));
top_hb->add_child(_default);
tabs = memnew(TabContainer);
diff --git a/modules/openxr/editor/openxr_action_set_editor.cpp b/modules/openxr/editor/openxr_action_set_editor.cpp
index 8b4a0e989c..5d9a3155fb 100644
--- a/modules/openxr/editor/openxr_action_set_editor.cpp
+++ b/modules/openxr/editor/openxr_action_set_editor.cpp
@@ -229,7 +229,7 @@ OpenXRActionSetEditor::OpenXRActionSetEditor(Ref<OpenXRActionMap> p_action_map,
fold_btn = memnew(Button);
fold_btn->set_v_size_flags(Control::SIZE_SHRINK_BEGIN);
- fold_btn->connect("pressed", callable_mp(this, &OpenXRActionSetEditor::_on_toggle_expand));
+ fold_btn->connect(SceneStringName(pressed), callable_mp(this, &OpenXRActionSetEditor::_on_toggle_expand));
fold_btn->set_flat(true);
panel_hb->add_child(fold_btn);
@@ -262,13 +262,13 @@ OpenXRActionSetEditor::OpenXRActionSetEditor(Ref<OpenXRActionMap> p_action_map,
add_action = memnew(Button);
add_action->set_tooltip_text(TTR("Add action."));
- add_action->connect("pressed", callable_mp(this, &OpenXRActionSetEditor::_on_add_action));
+ add_action->connect(SceneStringName(pressed), callable_mp(this, &OpenXRActionSetEditor::_on_add_action));
add_action->set_flat(true);
action_set_hb->add_child(add_action);
rem_action_set = memnew(Button);
rem_action_set->set_tooltip_text(TTR("Remove action set."));
- rem_action_set->connect("pressed", callable_mp(this, &OpenXRActionSetEditor::_on_remove_action_set));
+ rem_action_set->connect(SceneStringName(pressed), callable_mp(this, &OpenXRActionSetEditor::_on_remove_action_set));
rem_action_set->set_flat(true);
action_set_hb->add_child(rem_action_set);
diff --git a/modules/openxr/editor/openxr_interaction_profile_editor.cpp b/modules/openxr/editor/openxr_interaction_profile_editor.cpp
index da6a9eed70..ab36c0744e 100644
--- a/modules/openxr/editor/openxr_interaction_profile_editor.cpp
+++ b/modules/openxr/editor/openxr_interaction_profile_editor.cpp
@@ -222,7 +222,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
Button *path_add = memnew(Button);
path_add->set_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
path_add->set_flat(true);
- path_add->connect("pressed", callable_mp(this, &OpenXRInteractionProfileEditor::select_action_for).bind(String(p_io_path->openxr_path)));
+ path_add->connect(SceneStringName(pressed), callable_mp(this, &OpenXRInteractionProfileEditor::select_action_for).bind(String(p_io_path->openxr_path)));
path_hb->add_child(path_add);
if (interaction_profile.is_valid()) {
@@ -249,7 +249,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
Button *action_rem = memnew(Button);
action_rem->set_flat(true);
action_rem->set_icon(get_theme_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
- action_rem->connect("pressed", callable_mp((OpenXRInteractionProfileEditor *)this, &OpenXRInteractionProfileEditor::_on_remove_pressed).bind(action->get_name_with_set(), String(p_io_path->openxr_path)));
+ action_rem->connect(SceneStringName(pressed), callable_mp((OpenXRInteractionProfileEditor *)this, &OpenXRInteractionProfileEditor::_on_remove_pressed).bind(action->get_name_with_set(), String(p_io_path->openxr_path)));
action_hb->add_child(action_rem);
}
}
diff --git a/modules/openxr/editor/openxr_select_action_dialog.cpp b/modules/openxr/editor/openxr_select_action_dialog.cpp
index 8eec54be63..de0ab40f9e 100644
--- a/modules/openxr/editor/openxr_select_action_dialog.cpp
+++ b/modules/openxr/editor/openxr_select_action_dialog.cpp
@@ -97,7 +97,7 @@ void OpenXRSelectActionDialog::open() {
String action_name = action->get_name_with_set();
action_button->set_flat(true);
action_button->set_text(action->get_name() + ": " + action->get_localized_name());
- action_button->connect("pressed", callable_mp(this, &OpenXRSelectActionDialog::_on_select_action).bind(action_name));
+ action_button->connect(SceneStringName(pressed), callable_mp(this, &OpenXRSelectActionDialog::_on_select_action).bind(action_name));
action_hb->add_child(action_button);
action_buttons[action_name] = action_button->get_path();
diff --git a/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp b/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
index 8fd66fac04..e6705d5c82 100644
--- a/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
+++ b/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp
@@ -82,7 +82,7 @@ void OpenXRSelectInteractionProfileDialog::open(PackedStringArray p_do_not_inclu
Button *ip_button = memnew(Button);
ip_button->set_flat(true);
ip_button->set_text(OpenXRInteractionProfileMetadata::get_singleton()->get_profile(path)->display_name);
- ip_button->connect("pressed", callable_mp(this, &OpenXRSelectInteractionProfileDialog::_on_select_interaction_profile).bind(path));
+ ip_button->connect(SceneStringName(pressed), callable_mp(this, &OpenXRSelectInteractionProfileDialog::_on_select_interaction_profile).bind(path));
main_vb->add_child(ip_button);
ip_buttons[path] = ip_button->get_path();
diff --git a/modules/openxr/extensions/openxr_composition_layer_extension.cpp b/modules/openxr/extensions/openxr_composition_layer_extension.cpp
index fb21c45fd8..994b08af53 100644
--- a/modules/openxr/extensions/openxr_composition_layer_extension.cpp
+++ b/modules/openxr/extensions/openxr_composition_layer_extension.cpp
@@ -286,7 +286,7 @@ bool OpenXRViewportCompositionLayerProvider::update_and_acquire_swapchain(bool p
// Create our new swap chain
int64_t swapchain_format = openxr_api->get_color_swapchain_format();
- const uint32_t sample_count = 3;
+ const uint32_t sample_count = 1;
const uint32_t array_size = 1;
XrSwapchainCreateFlags create_flags = 0;
if (p_static_image) {