From 9f76398781fbb7c92c5d25ff0df236f91f3d4b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 17 Feb 2024 19:00:04 +0100 Subject: [PATCH 1/3] Revert "Only update inspector if configuration warning change relevant" This reverts commit a53793472e4ed61e68405044beb6325a33ac5814. --- editor/editor_inspector.cpp | 45 +------------------------------------ editor/editor_inspector.h | 2 -- 2 files changed, 1 insertion(+), 46 deletions(-) diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 4e76d40b1de9e..4dfc0023b93c5 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -3535,9 +3535,6 @@ void EditorInspector::edit(Object *p_object) { object = p_object; - property_configuration_warnings.clear(); - _update_configuration_warnings(); - if (object) { update_scroll_request = 0; //reset if (scroll_cache.has(object->get_instance_id())) { //if exists, set something else @@ -4061,48 +4058,8 @@ void EditorInspector::_node_removed(Node *p_node) { void EditorInspector::_warning_changed(Node *p_node) { if (p_node == object) { - // Only update the tree if the list of configuration warnings has changed. - if (_update_configuration_warnings()) { - update_tree_pending = true; - } - } -} - -bool EditorInspector::_update_configuration_warnings() { - Node *node = Object::cast_to(object); - if (!node) { - return false; - } - - bool changed = false; - LocalVector found_warning_indices; - - // New and changed warnings. - Vector warnings = node->get_configuration_warnings_as_dicts(); - for (const Dictionary &warning : warnings) { - if (!warning.has("property")) { - continue; - } - - int found_warning_index = property_configuration_warnings.find(warning); - if (found_warning_index < 0) { - found_warning_index = property_configuration_warnings.size(); - property_configuration_warnings.push_back(warning); - changed = true; - } - found_warning_indices.push_back(found_warning_index); - } - - // Removed warnings. - for (uint32_t i = 0; i < property_configuration_warnings.size(); i++) { - if (found_warning_indices.find(i) < 0) { - property_configuration_warnings.remove_at(i); - i--; - changed = true; - } + update_tree_pending = true; } - - return changed; } void EditorInspector::_notification(int p_what) { diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 4e937ae4ad1a3..2066002a03b7a 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -514,7 +514,6 @@ class EditorInspector : public ScrollContainer { int property_focusable; int update_scroll_request; - LocalVector property_configuration_warnings; HashMap> doc_path_cache; HashSet restart_request_props; HashMap custom_property_descriptions; @@ -544,7 +543,6 @@ class EditorInspector : public ScrollContainer { void _node_removed(Node *p_node); void _warning_changed(Node *p_node); - bool _update_configuration_warnings(); HashMap per_array_page; void _page_change_request(int p_new_page, const StringName &p_array_prefix); From 21f0529aa923e8d337827074f15a5cf83f73c19a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 17 Feb 2024 19:03:21 +0100 Subject: [PATCH 2/3] Revert "Update Node::get_configuration_warnings signature" This reverts commit d3852deaa450d77edb30df2bb1c77bd7bc45befc. --- modules/multiplayer/multiplayer_spawner.cpp | 4 ++-- modules/multiplayer/multiplayer_spawner.h | 2 +- modules/multiplayer/multiplayer_synchronizer.cpp | 4 ++-- modules/multiplayer/multiplayer_synchronizer.h | 2 +- scene/2d/animated_sprite_2d.cpp | 4 ++-- scene/2d/animated_sprite_2d.h | 2 +- scene/2d/canvas_modulate.cpp | 4 ++-- scene/2d/canvas_modulate.h | 2 +- scene/2d/collision_object_2d.cpp | 4 ++-- scene/2d/collision_object_2d.h | 2 +- scene/2d/collision_polygon_2d.cpp | 4 ++-- scene/2d/collision_polygon_2d.h | 2 +- scene/2d/collision_shape_2d.cpp | 4 ++-- scene/2d/collision_shape_2d.h | 2 +- scene/2d/cpu_particles_2d.cpp | 4 ++-- scene/2d/cpu_particles_2d.h | 2 +- scene/2d/gpu_particles_2d.cpp | 4 ++-- scene/2d/gpu_particles_2d.h | 2 +- scene/2d/joint_2d.cpp | 4 ++-- scene/2d/joint_2d.h | 2 +- scene/2d/light_2d.cpp | 9 +++------ scene/2d/light_2d.h | 2 +- scene/2d/light_occluder_2d.cpp | 4 ++-- scene/2d/light_occluder_2d.h | 2 +- scene/2d/navigation_agent_2d.cpp | 4 ++-- scene/2d/navigation_agent_2d.h | 2 +- scene/2d/navigation_link_2d.cpp | 4 ++-- scene/2d/navigation_link_2d.h | 2 +- scene/2d/navigation_region_2d.cpp | 4 ++-- scene/2d/navigation_region_2d.h | 2 +- scene/2d/parallax_layer.cpp | 4 ++-- scene/2d/parallax_layer.h | 2 +- scene/2d/path_2d.cpp | 4 ++-- scene/2d/path_2d.h | 2 +- scene/2d/physical_bone_2d.cpp | 4 ++-- scene/2d/physical_bone_2d.h | 2 +- scene/2d/physics_body_2d.cpp | 4 ++-- scene/2d/physics_body_2d.h | 2 +- scene/2d/remote_transform_2d.cpp | 4 ++-- scene/2d/remote_transform_2d.h | 2 +- scene/2d/shape_cast_2d.cpp | 4 ++-- scene/2d/shape_cast_2d.h | 2 +- scene/2d/skeleton_2d.cpp | 4 ++-- scene/2d/skeleton_2d.h | 2 +- scene/2d/tile_map.cpp | 4 ++-- scene/2d/tile_map.h | 2 +- scene/3d/bone_attachment_3d.cpp | 4 ++-- scene/3d/bone_attachment_3d.h | 3 +-- scene/3d/collision_object_3d.cpp | 4 ++-- scene/3d/collision_object_3d.h | 2 +- scene/3d/collision_polygon_3d.cpp | 4 ++-- scene/3d/collision_polygon_3d.h | 2 +- scene/3d/collision_shape_3d.cpp | 4 ++-- scene/3d/collision_shape_3d.h | 2 +- scene/3d/cpu_particles_3d.cpp | 4 ++-- scene/3d/cpu_particles_3d.h | 2 +- scene/3d/decal.cpp | 4 ++-- scene/3d/decal.h | 2 +- scene/3d/fog_volume.cpp | 4 ++-- scene/3d/fog_volume.h | 2 +- scene/3d/gpu_particles_3d.cpp | 4 ++-- scene/3d/gpu_particles_3d.h | 2 +- scene/3d/gpu_particles_collision_3d.cpp | 4 ++-- scene/3d/gpu_particles_collision_3d.h | 2 +- scene/3d/joint_3d.cpp | 4 ++-- scene/3d/joint_3d.h | 2 +- scene/3d/light_3d.cpp | 12 ++++++------ scene/3d/light_3d.h | 6 +++--- scene/3d/lightmap_gi.cpp | 4 ++-- scene/3d/lightmap_gi.h | 2 +- scene/3d/navigation_agent_3d.cpp | 4 ++-- scene/3d/navigation_agent_3d.h | 2 +- scene/3d/navigation_link_3d.cpp | 4 ++-- scene/3d/navigation_link_3d.h | 2 +- scene/3d/navigation_region_3d.cpp | 4 ++-- scene/3d/navigation_region_3d.h | 2 +- scene/3d/occluder_instance_3d.cpp | 4 ++-- scene/3d/occluder_instance_3d.h | 2 +- scene/3d/path_3d.cpp | 4 ++-- scene/3d/path_3d.h | 2 +- scene/3d/physics_body_3d.cpp | 4 ++-- scene/3d/physics_body_3d.h | 2 +- scene/3d/reflection_probe.cpp | 4 ++-- scene/3d/reflection_probe.h | 2 +- scene/3d/remote_transform_3d.cpp | 4 ++-- scene/3d/remote_transform_3d.h | 2 +- scene/3d/shape_cast_3d.cpp | 4 ++-- scene/3d/shape_cast_3d.h | 2 +- scene/3d/soft_body_3d.cpp | 4 ++-- scene/3d/soft_body_3d.h | 2 +- scene/3d/sprite_3d.cpp | 4 ++-- scene/3d/sprite_3d.h | 2 +- scene/3d/vehicle_body_3d.cpp | 4 ++-- scene/3d/vehicle_body_3d.h | 2 +- scene/3d/visible_on_screen_notifier_3d.cpp | 4 ++-- scene/3d/visible_on_screen_notifier_3d.h | 2 +- scene/3d/visual_instance_3d.cpp | 4 ++-- scene/3d/visual_instance_3d.h | 2 +- scene/3d/voxel_gi.cpp | 4 ++-- scene/3d/voxel_gi.h | 2 +- scene/3d/world_environment.cpp | 4 ++-- scene/3d/world_environment.h | 2 +- scene/3d/xr_nodes.cpp | 12 ++++++------ scene/3d/xr_nodes.h | 6 +++--- scene/animation/animation_tree.cpp | 4 ++-- scene/animation/animation_tree.h | 2 +- scene/gui/base_button.cpp | 4 ++-- scene/gui/base_button.h | 2 +- scene/gui/container.cpp | 4 ++-- scene/gui/container.h | 2 +- scene/gui/control.cpp | 6 +++--- scene/gui/control.h | 2 +- scene/gui/graph_edit.cpp | 4 ++-- scene/gui/graph_edit.h | 2 +- scene/gui/label.cpp | 4 ++-- scene/gui/label.h | 2 +- scene/gui/line_edit.cpp | 4 ++-- scene/gui/line_edit.h | 2 +- scene/gui/range.cpp | 4 ++-- scene/gui/range.h | 2 +- scene/gui/scroll_container.cpp | 4 ++-- scene/gui/scroll_container.h | 2 +- scene/gui/subviewport_container.cpp | 4 ++-- scene/gui/subviewport_container.h | 2 +- scene/main/missing_node.cpp | 4 ++-- scene/main/missing_node.h | 2 +- scene/main/shader_globals_override.cpp | 4 ++-- scene/main/shader_globals_override.h | 2 +- scene/main/timer.cpp | 4 ++-- scene/main/timer.h | 2 +- scene/main/viewport.cpp | 6 +++--- scene/main/viewport.h | 2 +- 132 files changed, 213 insertions(+), 217 deletions(-) diff --git a/modules/multiplayer/multiplayer_spawner.cpp b/modules/multiplayer/multiplayer_spawner.cpp index fecefc7e714cf..264a2e9c8e0a4 100644 --- a/modules/multiplayer/multiplayer_spawner.cpp +++ b/modules/multiplayer/multiplayer_spawner.cpp @@ -87,8 +87,8 @@ void MultiplayerSpawner::_get_property_list(List *p_list) const { } #endif -Array MultiplayerSpawner::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray MultiplayerSpawner::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (spawn_path.is_empty() || !has_node(spawn_path)) { warnings.push_back(RTR("A valid NodePath must be set in the \"Spawn Path\" property in order for MultiplayerSpawner to be able to spawn Nodes.")); diff --git a/modules/multiplayer/multiplayer_spawner.h b/modules/multiplayer/multiplayer_spawner.h index 6cd2946df78ec..0e94b781eaae2 100644 --- a/modules/multiplayer/multiplayer_spawner.h +++ b/modules/multiplayer/multiplayer_spawner.h @@ -91,7 +91,7 @@ class MultiplayerSpawner : public Node { void _get_property_list(List *p_list) const; #endif public: - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; Node *get_spawn_node() const { return spawn_node.is_valid() ? Object::cast_to(ObjectDB::get_instance(spawn_node)) : nullptr; diff --git a/modules/multiplayer/multiplayer_synchronizer.cpp b/modules/multiplayer/multiplayer_synchronizer.cpp index 16df9da78ea22..02e3a119642b7 100644 --- a/modules/multiplayer/multiplayer_synchronizer.cpp +++ b/modules/multiplayer/multiplayer_synchronizer.cpp @@ -143,8 +143,8 @@ bool MultiplayerSynchronizer::update_inbound_sync_time(uint16_t p_network_time) return true; } -Array MultiplayerSynchronizer::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray MultiplayerSynchronizer::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (root_path.is_empty() || !has_node(root_path)) { warnings.push_back(RTR("A valid NodePath must be set in the \"Root Path\" property in order for MultiplayerSynchronizer to be able to synchronize properties.")); diff --git a/modules/multiplayer/multiplayer_synchronizer.h b/modules/multiplayer/multiplayer_synchronizer.h index f5f3993f0d6ec..192d7a5920e18 100644 --- a/modules/multiplayer/multiplayer_synchronizer.h +++ b/modules/multiplayer/multiplayer_synchronizer.h @@ -91,7 +91,7 @@ class MultiplayerSynchronizer : public Node { bool update_outbound_sync_time(uint64_t p_usec); bool update_inbound_sync_time(uint16_t p_network_time); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void set_replication_interval(double p_interval); double get_replication_interval() const; diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp index d319c8ae4e8cb..699d09c0d3d19 100644 --- a/scene/2d/animated_sprite_2d.cpp +++ b/scene/2d/animated_sprite_2d.cpp @@ -569,8 +569,8 @@ StringName AnimatedSprite2D::get_animation() const { return animation; } -Array AnimatedSprite2D::get_configuration_warnings() const { - Array warnings = Node2D::get_configuration_warnings(); +PackedStringArray AnimatedSprite2D::get_configuration_warnings() const { + PackedStringArray warnings = Node2D::get_configuration_warnings(); if (frames.is_null()) { warnings.push_back(RTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite2D to display frames.")); } diff --git a/scene/2d/animated_sprite_2d.h b/scene/2d/animated_sprite_2d.h index 1f70f1af81cce..ac53bd26eede8 100644 --- a/scene/2d/animated_sprite_2d.h +++ b/scene/2d/animated_sprite_2d.h @@ -125,7 +125,7 @@ class AnimatedSprite2D : public Node2D { void set_flip_v(bool p_flip); bool is_flipped_v() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; virtual void get_argument_options(const StringName &p_function, int p_idx, List *r_options) const override; AnimatedSprite2D(); diff --git a/scene/2d/canvas_modulate.cpp b/scene/2d/canvas_modulate.cpp index f87880afd75ef..2c5c6a1a16834 100644 --- a/scene/2d/canvas_modulate.cpp +++ b/scene/2d/canvas_modulate.cpp @@ -113,8 +113,8 @@ Color CanvasModulate::get_color() const { return color; } -Array CanvasModulate::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray CanvasModulate::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (is_in_canvas && is_visible_in_tree()) { List nodes; diff --git a/scene/2d/canvas_modulate.h b/scene/2d/canvas_modulate.h index 05b126e889dbb..08ded52e23394 100644 --- a/scene/2d/canvas_modulate.h +++ b/scene/2d/canvas_modulate.h @@ -54,7 +54,7 @@ class CanvasModulate : public Node2D { void set_color(const Color &p_color); Color get_color() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; CanvasModulate(); ~CanvasModulate(); diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index e36eda573cb84..4e5852984b47c 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -582,8 +582,8 @@ void CollisionObject2D::_update_pickable() { } } -Array CollisionObject2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray CollisionObject2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (shapes.is_empty()) { warnings.push_back(RTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape2D or CollisionPolygon2D as a child to define its shape.")); diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h index 25ae9af8d59c2..780793f289bc8 100644 --- a/scene/2d/collision_object_2d.h +++ b/scene/2d/collision_object_2d.h @@ -166,7 +166,7 @@ class CollisionObject2D : public Node2D { void set_pickable(bool p_enabled); bool is_pickable() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; _FORCE_INLINE_ RID get_rid() const { return rid; } diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index cfbdf65776b00..d2f71eca9d614 100644 --- a/scene/2d/collision_polygon_2d.cpp +++ b/scene/2d/collision_polygon_2d.cpp @@ -232,8 +232,8 @@ bool CollisionPolygon2D::_edit_is_selected_on_click(const Point2 &p_point, doubl } #endif -Array CollisionPolygon2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray CollisionPolygon2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!Object::cast_to(get_parent())) { warnings.push_back(RTR("CollisionPolygon2D only serves to provide a collision shape to a CollisionObject2D derived node. Please only use it as a child of Area2D, StaticBody2D, RigidBody2D, CharacterBody2D, etc. to give them a shape.")); diff --git a/scene/2d/collision_polygon_2d.h b/scene/2d/collision_polygon_2d.h index cbedc718d88eb..f1ee30babeb63 100644 --- a/scene/2d/collision_polygon_2d.h +++ b/scene/2d/collision_polygon_2d.h @@ -77,7 +77,7 @@ class CollisionPolygon2D : public Node2D { void set_polygon(const Vector &p_polygon); Vector get_polygon() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void set_disabled(bool p_disabled); bool is_disabled() const; diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp index 2c6e675527198..ee413c7bc2db9 100644 --- a/scene/2d/collision_shape_2d.cpp +++ b/scene/2d/collision_shape_2d.cpp @@ -173,8 +173,8 @@ bool CollisionShape2D::_edit_is_selected_on_click(const Point2 &p_point, double return shape->_edit_is_selected_on_click(p_point, p_tolerance); } -Array CollisionShape2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray CollisionShape2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); CollisionObject2D *col_object = Object::cast_to(get_parent()); if (col_object == nullptr) { diff --git a/scene/2d/collision_shape_2d.h b/scene/2d/collision_shape_2d.h index 18f16269c0f63..3e13dd698c19c 100644 --- a/scene/2d/collision_shape_2d.h +++ b/scene/2d/collision_shape_2d.h @@ -80,7 +80,7 @@ class CollisionShape2D : public Node2D { void set_debug_color(const Color &p_color); Color get_debug_color() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; CollisionShape2D(); }; diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index c06b172b38ae6..e04e6d7dce30f 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -246,8 +246,8 @@ bool CPUParticles2D::get_fractional_delta() const { return fractional_delta; } -Array CPUParticles2D::get_configuration_warnings() const { - Array warnings = Node2D::get_configuration_warnings(); +PackedStringArray CPUParticles2D::get_configuration_warnings() const { + PackedStringArray warnings = Node2D::get_configuration_warnings(); CanvasItemMaterial *mat = Object::cast_to(get_material().ptr()); diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h index 7108764bbee8d..3f858c327763a 100644 --- a/scene/2d/cpu_particles_2d.h +++ b/scene/2d/cpu_particles_2d.h @@ -282,7 +282,7 @@ class CPUParticles2D : public Node2D { void set_gravity(const Vector2 &p_gravity); Vector2 get_gravity() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void restart(); diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp index d34e3394487d0..bc39513c032b3 100644 --- a/scene/2d/gpu_particles_2d.cpp +++ b/scene/2d/gpu_particles_2d.cpp @@ -327,8 +327,8 @@ float GPUParticles2D::get_interp_to_end() const { return interp_to_end_factor; } -Array GPUParticles2D::get_configuration_warnings() const { - Array warnings = Node2D::get_configuration_warnings(); +PackedStringArray GPUParticles2D::get_configuration_warnings() const { + PackedStringArray warnings = Node2D::get_configuration_warnings(); if (process_material.is_null()) { warnings.push_back(RTR("A material to process the particles is not assigned, so no behavior is imprinted.")); diff --git a/scene/2d/gpu_particles_2d.h b/scene/2d/gpu_particles_2d.h index ba10e5425179f..58996b0327b6a 100644 --- a/scene/2d/gpu_particles_2d.h +++ b/scene/2d/gpu_particles_2d.h @@ -161,7 +161,7 @@ class GPUParticles2D : public Node2D { void set_amount_ratio(float p_ratio); float get_amount_ratio() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void set_sub_emitter(const NodePath &p_path); NodePath get_sub_emitter() const; diff --git a/scene/2d/joint_2d.cpp b/scene/2d/joint_2d.cpp index dd9a721240560..41b121a482a64 100644 --- a/scene/2d/joint_2d.cpp +++ b/scene/2d/joint_2d.cpp @@ -212,8 +212,8 @@ bool Joint2D::get_exclude_nodes_from_collision() const { return exclude_from_collision; } -Array Joint2D::get_configuration_warnings() const { - Array warnings = Node2D::get_configuration_warnings(); +PackedStringArray Joint2D::get_configuration_warnings() const { + PackedStringArray warnings = Node2D::get_configuration_warnings(); if (!warning.is_empty()) { warnings.push_back(warning); diff --git a/scene/2d/joint_2d.h b/scene/2d/joint_2d.h index 6a3777d3f1530..5ff75a77a122d 100644 --- a/scene/2d/joint_2d.h +++ b/scene/2d/joint_2d.h @@ -62,7 +62,7 @@ class Joint2D : public Node2D { _FORCE_INLINE_ bool is_configured() const { return configured; } public: - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; void set_node_a(const NodePath &p_node_a); NodePath get_node_a() const; diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index a8aecd82579b5..c03786caef316 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -401,14 +401,11 @@ Vector2 PointLight2D::get_texture_offset() const { return texture_offset; } -Array PointLight2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray PointLight2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!texture.is_valid()) { - Dictionary texture_warning; - texture_warning["message"] = RTR("A texture with the shape of the light must be supplied."); - texture_warning["property"] = "texture"; - warnings.push_back(texture_warning); + warnings.push_back(RTR("A texture with the shape of the light must be supplied to the \"Texture\" property.")); } return warnings; diff --git a/scene/2d/light_2d.h b/scene/2d/light_2d.h index 79b49b4c69495..3c1171deae293 100644 --- a/scene/2d/light_2d.h +++ b/scene/2d/light_2d.h @@ -174,7 +174,7 @@ class PointLight2D : public Light2D { void set_texture_scale(real_t p_scale); real_t get_texture_scale() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; PointLight2D(); }; diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp index f5da96d4f96d4..61f5d5cd46bdf 100644 --- a/scene/2d/light_occluder_2d.cpp +++ b/scene/2d/light_occluder_2d.cpp @@ -247,8 +247,8 @@ int LightOccluder2D::get_occluder_light_mask() const { return mask; } -Array LightOccluder2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray LightOccluder2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!occluder_polygon.is_valid()) { warnings.push_back(RTR("An occluder polygon must be set (or drawn) for this occluder to take effect.")); diff --git a/scene/2d/light_occluder_2d.h b/scene/2d/light_occluder_2d.h index b8add2e498edf..dd3130394e495 100644 --- a/scene/2d/light_occluder_2d.h +++ b/scene/2d/light_occluder_2d.h @@ -105,7 +105,7 @@ class LightOccluder2D : public Node2D { void set_as_sdf_collision(bool p_enable); bool is_set_as_sdf_collision() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; LightOccluder2D(); ~LightOccluder2D(); diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp index 3b222e27c4a6d..fee774fe2e60e 100644 --- a/scene/2d/navigation_agent_2d.cpp +++ b/scene/2d/navigation_agent_2d.cpp @@ -624,8 +624,8 @@ void NavigationAgent2D::_avoidance_done(Vector3 p_new_velocity) { emit_signal(SNAME("velocity_computed"), safe_velocity); } -Array NavigationAgent2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray NavigationAgent2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!Object::cast_to(get_parent())) { warnings.push_back(RTR("The NavigationAgent2D can be used only under a Node2D inheriting parent node.")); diff --git a/scene/2d/navigation_agent_2d.h b/scene/2d/navigation_agent_2d.h index 7a8d008e90a59..0e46086a81d35 100644 --- a/scene/2d/navigation_agent_2d.h +++ b/scene/2d/navigation_agent_2d.h @@ -200,7 +200,7 @@ class NavigationAgent2D : public Node { void _avoidance_done(Vector3 p_new_velocity); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void set_avoidance_layers(uint32_t p_layers); uint32_t get_avoidance_layers() const; diff --git a/scene/2d/navigation_link_2d.cpp b/scene/2d/navigation_link_2d.cpp index be224eb08bc47..04ba550888ad4 100644 --- a/scene/2d/navigation_link_2d.cpp +++ b/scene/2d/navigation_link_2d.cpp @@ -337,8 +337,8 @@ void NavigationLink2D::set_travel_cost(real_t p_travel_cost) { NavigationServer2D::get_singleton()->link_set_travel_cost(link, travel_cost); } -Array NavigationLink2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray NavigationLink2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (start_position.is_equal_approx(end_position)) { warnings.push_back(RTR("NavigationLink2D start position should be different than the end position to be useful.")); diff --git a/scene/2d/navigation_link_2d.h b/scene/2d/navigation_link_2d.h index 7d8b375b6cc33..2929691c045c7 100644 --- a/scene/2d/navigation_link_2d.h +++ b/scene/2d/navigation_link_2d.h @@ -93,7 +93,7 @@ class NavigationLink2D : public Node2D { void set_travel_cost(real_t p_travel_cost); real_t get_travel_cost() const { return travel_cost; } - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; NavigationLink2D(); ~NavigationLink2D(); diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp index 134ca065ce175..4a434fa3f8b15 100644 --- a/scene/2d/navigation_region_2d.cpp +++ b/scene/2d/navigation_region_2d.cpp @@ -283,8 +283,8 @@ void NavigationRegion2D::_navigation_debug_changed() { } #endif // DEBUG_ENABLED -Array NavigationRegion2D::get_configuration_warnings() const { - Array warnings = Node2D::get_configuration_warnings(); +PackedStringArray NavigationRegion2D::get_configuration_warnings() const { + PackedStringArray warnings = Node2D::get_configuration_warnings(); if (is_visible_in_tree() && is_inside_tree()) { if (!navigation_polygon.is_valid()) { diff --git a/scene/2d/navigation_region_2d.h b/scene/2d/navigation_region_2d.h index 9e9a21d9f301b..e9387376cb030 100644 --- a/scene/2d/navigation_region_2d.h +++ b/scene/2d/navigation_region_2d.h @@ -114,7 +114,7 @@ class NavigationRegion2D : public Node2D { void set_avoidance_layer_value(int p_layer_number, bool p_value); bool get_avoidance_layer_value(int p_layer_number) const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void bake_navigation_polygon(bool p_on_thread); void _bake_finished(Ref p_navigation_polygon); diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp index 44cfc1deb2c3a..3dd0d7b61cd2d 100644 --- a/scene/2d/parallax_layer.cpp +++ b/scene/2d/parallax_layer.cpp @@ -137,8 +137,8 @@ void ParallaxLayer::set_base_offset_and_scale(const Point2 &p_offset, real_t p_s _update_mirroring(); } -Array ParallaxLayer::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray ParallaxLayer::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!Object::cast_to(get_parent())) { warnings.push_back(RTR("ParallaxLayer node only works when set as child of a ParallaxBackground node.")); diff --git a/scene/2d/parallax_layer.h b/scene/2d/parallax_layer.h index dbf93861989f6..22fa0dd51c1e0 100644 --- a/scene/2d/parallax_layer.h +++ b/scene/2d/parallax_layer.h @@ -59,7 +59,7 @@ class ParallaxLayer : public Node2D { void set_base_offset_and_scale(const Point2 &p_offset, real_t p_scale); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; ParallaxLayer(); }; diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 4fce49dc57ea2..282d14da5d5b4 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -287,8 +287,8 @@ void PathFollow2D::_validate_property(PropertyInfo &p_property) const { } } -Array PathFollow2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray PathFollow2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (is_visible_in_tree() && is_inside_tree()) { if (!Object::cast_to(get_parent())) { diff --git a/scene/2d/path_2d.h b/scene/2d/path_2d.h index 616903c7887de..bfd5cde5e9cb8 100644 --- a/scene/2d/path_2d.h +++ b/scene/2d/path_2d.h @@ -106,7 +106,7 @@ class PathFollow2D : public Node2D { void set_cubic_interpolation_enabled(bool p_enabled); bool is_cubic_interpolation_enabled() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; PathFollow2D() {} }; diff --git a/scene/2d/physical_bone_2d.cpp b/scene/2d/physical_bone_2d.cpp index 12a3e6da215c6..64cf56fa85d56 100644 --- a/scene/2d/physical_bone_2d.cpp +++ b/scene/2d/physical_bone_2d.cpp @@ -106,8 +106,8 @@ void PhysicalBone2D::_find_joint_child() { } } -Array PhysicalBone2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray PhysicalBone2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!parent_skeleton) { warnings.push_back(RTR("A PhysicalBone2D only works with a Skeleton2D or another PhysicalBone2D as a parent node!")); diff --git a/scene/2d/physical_bone_2d.h b/scene/2d/physical_bone_2d.h index 1930ce1aba455..e585f2c0ede42 100644 --- a/scene/2d/physical_bone_2d.h +++ b/scene/2d/physical_bone_2d.h @@ -79,7 +79,7 @@ class PhysicalBone2D : public RigidBody2D { void set_follow_bone_when_simulating(bool p_follow); bool get_follow_bone_when_simulating() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; PhysicalBone2D(); ~PhysicalBone2D(); diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 2e0b020232b20..92af3fa3f07c0 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -928,10 +928,10 @@ void RigidBody2D::_notification(int p_what) { #endif } -Array RigidBody2D::get_configuration_warnings() const { +PackedStringArray RigidBody2D::get_configuration_warnings() const { Transform2D t = get_transform(); - Array warnings = CollisionObject2D::get_configuration_warnings(); + PackedStringArray warnings = CollisionObject2D::get_configuration_warnings(); if (ABS(t.columns[0].length() - 1.0) > 0.05 || ABS(t.columns[1].length() - 1.0) > 0.05) { warnings.push_back(RTR("Size changes to RigidBody2D will be overridden by the physics engine when running.\nChange the size in children collision shapes instead.")); diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 44ff1ba8223e3..88161e284ad7d 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -313,7 +313,7 @@ class RigidBody2D : public PhysicsBody2D { TypedArray get_colliding_bodies() const; //function for script - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; RigidBody2D(); ~RigidBody2D(); diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp index b3926a463814c..5ea5098475fac 100644 --- a/scene/2d/remote_transform_2d.cpp +++ b/scene/2d/remote_transform_2d.cpp @@ -200,8 +200,8 @@ void RemoteTransform2D::force_update_cache() { _update_cache(); } -Array RemoteTransform2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray RemoteTransform2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!has_node(remote_node) || !Object::cast_to(get_node(remote_node))) { warnings.push_back(RTR("Path property must point to a valid Node2D node to work.")); diff --git a/scene/2d/remote_transform_2d.h b/scene/2d/remote_transform_2d.h index fe7289380a55a..997fd8fc6942f 100644 --- a/scene/2d/remote_transform_2d.h +++ b/scene/2d/remote_transform_2d.h @@ -70,7 +70,7 @@ class RemoteTransform2D : public Node2D { void force_update_cache(); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; RemoteTransform2D(); }; diff --git a/scene/2d/shape_cast_2d.cpp b/scene/2d/shape_cast_2d.cpp index 332e5eeb3e875..90d80d754906f 100644 --- a/scene/2d/shape_cast_2d.cpp +++ b/scene/2d/shape_cast_2d.cpp @@ -402,8 +402,8 @@ Array ShapeCast2D::_get_collision_result() const { return ret; } -Array ShapeCast2D::get_configuration_warnings() const { - Array warnings = Node2D::get_configuration_warnings(); +PackedStringArray ShapeCast2D::get_configuration_warnings() const { + PackedStringArray warnings = Node2D::get_configuration_warnings(); if (shape.is_null()) { warnings.push_back(RTR("This node cannot interact with other objects unless a Shape2D is assigned.")); diff --git a/scene/2d/shape_cast_2d.h b/scene/2d/shape_cast_2d.h index da7c58baccba0..a577c351fd7a0 100644 --- a/scene/2d/shape_cast_2d.h +++ b/scene/2d/shape_cast_2d.h @@ -118,7 +118,7 @@ class ShapeCast2D : public Node2D { void remove_exception(const CollisionObject2D *p_node); void clear_exceptions(); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; ShapeCast2D(); }; diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp index 432b8e914e273..69e0414855f97 100644 --- a/scene/2d/skeleton_2d.cpp +++ b/scene/2d/skeleton_2d.cpp @@ -415,8 +415,8 @@ int Bone2D::get_index_in_skeleton() const { return skeleton_index; } -Array Bone2D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray Bone2D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!skeleton) { if (parent_bone) { warnings.push_back(RTR("This Bone2D chain should end at a Skeleton2D node.")); diff --git a/scene/2d/skeleton_2d.h b/scene/2d/skeleton_2d.h index 1128ebb7c6597..6a36a3155293a 100644 --- a/scene/2d/skeleton_2d.h +++ b/scene/2d/skeleton_2d.h @@ -78,7 +78,7 @@ class Bone2D : public Node2D { void apply_rest(); Transform2D get_skeleton_rest() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void set_autocalculate_length_and_angle(bool p_autocalculate); bool get_autocalculate_length_and_angle() const; diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index b8ca480e3b562..48fe2afcccee3 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -846,8 +846,8 @@ TypedArray TileMap::get_surrounding_cells(const Vector2i &p_coords) { return tile_set->get_surrounding_cells(p_coords); } -Array TileMap::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray TileMap::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); // Retrieve the set of Z index values with a Y-sorted layer. RBSet y_sorted_z_index; diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index 6edf348caf30c..16750625e5c5b 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -216,7 +216,7 @@ class TileMap : public TileMapLayerGroup { GDVIRTUAL3(_tile_data_runtime_update, int, Vector2i, TileData *); // Configuration warnings. - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; TileMap(); ~TileMap(); diff --git a/scene/3d/bone_attachment_3d.cpp b/scene/3d/bone_attachment_3d.cpp index 3cab128be5c58..5683fb7306e23 100644 --- a/scene/3d/bone_attachment_3d.cpp +++ b/scene/3d/bone_attachment_3d.cpp @@ -87,8 +87,8 @@ void BoneAttachment3D::_get_property_list(List *p_list) const { } } -Array BoneAttachment3D::get_configuration_warnings() const { - Array warnings = Node3D::get_configuration_warnings(); +PackedStringArray BoneAttachment3D::get_configuration_warnings() const { + PackedStringArray warnings = Node3D::get_configuration_warnings(); if (use_external_skeleton) { if (external_skeleton_node_cache.is_null()) { diff --git a/scene/3d/bone_attachment_3d.h b/scene/3d/bone_attachment_3d.h index 13fdccab3c44f..1bf44c2756b74 100644 --- a/scene/3d/bone_attachment_3d.h +++ b/scene/3d/bone_attachment_3d.h @@ -71,8 +71,7 @@ class BoneAttachment3D : public Node3D { virtual void notify_skeleton_bones_renamed(Node *p_base_scene, Skeleton3D *p_skeleton, Dictionary p_rename_map); #endif // TOOLS_ENABLED -public: - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; void set_bone_name(const String &p_name); String get_bone_name() const; diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp index 32799cacfe973..0cfe0f8cb739e 100644 --- a/scene/3d/collision_object_3d.cpp +++ b/scene/3d/collision_object_3d.cpp @@ -728,8 +728,8 @@ bool CollisionObject3D::get_capture_input_on_drag() const { return capture_input_on_drag; } -Array CollisionObject3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray CollisionObject3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (shapes.is_empty()) { warnings.push_back(RTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape3D or CollisionPolygon3D as a child to define its shape.")); diff --git a/scene/3d/collision_object_3d.h b/scene/3d/collision_object_3d.h index dc3c9269e497e..b51423f0215a4 100644 --- a/scene/3d/collision_object_3d.h +++ b/scene/3d/collision_object_3d.h @@ -173,7 +173,7 @@ class CollisionObject3D : public Node3D { _FORCE_INLINE_ RID get_rid() const { return rid; } - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; CollisionObject3D(); ~CollisionObject3D(); diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp index 29cec430119ed..9c1a7181aa50b 100644 --- a/scene/3d/collision_polygon_3d.cpp +++ b/scene/3d/collision_polygon_3d.cpp @@ -168,8 +168,8 @@ void CollisionPolygon3D::set_margin(real_t p_margin) { } } -Array CollisionPolygon3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray CollisionPolygon3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!Object::cast_to(get_parent())) { warnings.push_back(RTR("CollisionPolygon3D only serves to provide a collision shape to a CollisionObject3D derived node.\nPlease only use it as a child of Area3D, StaticBody3D, RigidBody3D, CharacterBody3D, etc. to give them a shape.")); diff --git a/scene/3d/collision_polygon_3d.h b/scene/3d/collision_polygon_3d.h index 715ea721cf871..61290a7947ff7 100644 --- a/scene/3d/collision_polygon_3d.h +++ b/scene/3d/collision_polygon_3d.h @@ -74,7 +74,7 @@ class CollisionPolygon3D : public Node3D { real_t get_margin() const; void set_margin(real_t p_margin); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; CollisionPolygon3D(); }; diff --git a/scene/3d/collision_shape_3d.cpp b/scene/3d/collision_shape_3d.cpp index 30692660f6229..61941a0e53378 100644 --- a/scene/3d/collision_shape_3d.cpp +++ b/scene/3d/collision_shape_3d.cpp @@ -118,8 +118,8 @@ void CollisionShape3D::resource_changed(Ref res) { } #endif -Array CollisionShape3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray CollisionShape3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); CollisionObject3D *col_object = Object::cast_to(get_parent()); if (col_object == nullptr) { diff --git a/scene/3d/collision_shape_3d.h b/scene/3d/collision_shape_3d.h index f66f88648e15d..bc0e70f8ac0b9 100644 --- a/scene/3d/collision_shape_3d.h +++ b/scene/3d/collision_shape_3d.h @@ -64,7 +64,7 @@ class CollisionShape3D : public Node3D { void set_disabled(bool p_disabled); bool is_disabled() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; CollisionShape3D(); ~CollisionShape3D(); diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index 32d68f7f78291..d47e63d790424 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -203,8 +203,8 @@ bool CPUParticles3D::get_fractional_delta() const { return fractional_delta; } -Array CPUParticles3D::get_configuration_warnings() const { - Array warnings = GeometryInstance3D::get_configuration_warnings(); +PackedStringArray CPUParticles3D::get_configuration_warnings() const { + PackedStringArray warnings = GeometryInstance3D::get_configuration_warnings(); bool mesh_found = false; bool anim_material_found = false; diff --git a/scene/3d/cpu_particles_3d.h b/scene/3d/cpu_particles_3d.h index e9b75d9140a81..82ea4bbef3d81 100644 --- a/scene/3d/cpu_particles_3d.h +++ b/scene/3d/cpu_particles_3d.h @@ -305,7 +305,7 @@ class CPUParticles3D : public GeometryInstance3D { void set_gravity(const Vector3 &p_gravity); Vector3 get_gravity() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void restart(); diff --git a/scene/3d/decal.cpp b/scene/3d/decal.cpp index acd52da8b0901..6878df21d8eff 100644 --- a/scene/3d/decal.cpp +++ b/scene/3d/decal.cpp @@ -162,8 +162,8 @@ void Decal::_validate_property(PropertyInfo &p_property) const { } } -Array Decal::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray Decal::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") { warnings.push_back(RTR("Decals are only available when using the Forward+ or Mobile rendering backends.")); diff --git a/scene/3d/decal.h b/scene/3d/decal.h index 3bc6664afdbc2..171b52815ad31 100644 --- a/scene/3d/decal.h +++ b/scene/3d/decal.h @@ -69,7 +69,7 @@ class Decal : public VisualInstance3D { #endif // DISABLE_DEPRECATED public: - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; void set_size(const Vector3 &p_size); Vector3 get_size() const; diff --git a/scene/3d/fog_volume.cpp b/scene/3d/fog_volume.cpp index 1c17a733e9392..12ca1888c47fa 100644 --- a/scene/3d/fog_volume.cpp +++ b/scene/3d/fog_volume.cpp @@ -117,8 +117,8 @@ AABB FogVolume::get_aabb() const { return AABB(); } -Array FogVolume::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray FogVolume::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); Ref environment = get_viewport()->find_world_3d()->get_environment(); diff --git a/scene/3d/fog_volume.h b/scene/3d/fog_volume.h index a185cdbd94d9c..f7e861e3d0539 100644 --- a/scene/3d/fog_volume.h +++ b/scene/3d/fog_volume.h @@ -66,7 +66,7 @@ class FogVolume : public VisualInstance3D { Ref get_material() const; virtual AABB get_aabb() const override; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; FogVolume(); ~FogVolume(); diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index 6670c2c5f6b52..16813b9017b33 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -296,8 +296,8 @@ bool GPUParticles3D::get_interpolate() const { return interpolate; } -Array GPUParticles3D::get_configuration_warnings() const { - Array warnings = GeometryInstance3D::get_configuration_warnings(); +PackedStringArray GPUParticles3D::get_configuration_warnings() const { + PackedStringArray warnings = GeometryInstance3D::get_configuration_warnings(); bool meshes_found = false; bool anim_material_found = false; diff --git a/scene/3d/gpu_particles_3d.h b/scene/3d/gpu_particles_3d.h index 1697749d9b0c6..0c9f2c13783f8 100644 --- a/scene/3d/gpu_particles_3d.h +++ b/scene/3d/gpu_particles_3d.h @@ -164,7 +164,7 @@ class GPUParticles3D : public GeometryInstance3D { void set_draw_pass_mesh(int p_pass, const Ref &p_mesh); Ref get_draw_pass_mesh(int p_pass) const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void set_sub_emitter(const NodePath &p_path); NodePath get_sub_emitter() const; diff --git a/scene/3d/gpu_particles_collision_3d.cpp b/scene/3d/gpu_particles_collision_3d.cpp index f5d5795a27b69..cbc75801b0a98 100644 --- a/scene/3d/gpu_particles_collision_3d.cpp +++ b/scene/3d/gpu_particles_collision_3d.cpp @@ -527,8 +527,8 @@ Ref GPUParticlesCollisionSDF3D::bake() { return ret; } -Array GPUParticlesCollisionSDF3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray GPUParticlesCollisionSDF3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (bake_mask == 0) { warnings.push_back(RTR("The Bake Mask has no bits enabled, which means baking will not produce any collision for this GPUParticlesCollisionSDF3D.\nTo resolve this, enable at least one bit in the Bake Mask property.")); diff --git a/scene/3d/gpu_particles_collision_3d.h b/scene/3d/gpu_particles_collision_3d.h index a4d8b15f9f3c9..16493200691fc 100644 --- a/scene/3d/gpu_particles_collision_3d.h +++ b/scene/3d/gpu_particles_collision_3d.h @@ -170,7 +170,7 @@ class GPUParticlesCollisionSDF3D : public GPUParticlesCollision3D { #endif // DISABLE_DEPRECATED public: - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; void set_thickness(float p_thickness); float get_thickness() const; diff --git a/scene/3d/joint_3d.cpp b/scene/3d/joint_3d.cpp index d76838d434861..1e4e50182cec2 100644 --- a/scene/3d/joint_3d.cpp +++ b/scene/3d/joint_3d.cpp @@ -198,8 +198,8 @@ bool Joint3D::get_exclude_nodes_from_collision() const { return exclude_from_collision; } -Array Joint3D::get_configuration_warnings() const { - Array warnings = Node3D::get_configuration_warnings(); +PackedStringArray Joint3D::get_configuration_warnings() const { + PackedStringArray warnings = Node3D::get_configuration_warnings(); if (!warning.is_empty()) { warnings.push_back(warning); diff --git a/scene/3d/joint_3d.h b/scene/3d/joint_3d.h index bf2519db12193..527aed4079dfd 100644 --- a/scene/3d/joint_3d.h +++ b/scene/3d/joint_3d.h @@ -63,7 +63,7 @@ class Joint3D : public Node3D { _FORCE_INLINE_ bool is_configured() const { return configured; } public: - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; void set_node_a(const NodePath &p_node_a); NodePath get_node_a() const; diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index bc74ff2c0faad..7b70986adce95 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -169,8 +169,8 @@ AABB Light3D::get_aabb() const { return AABB(); } -Array Light3D::get_configuration_warnings() const { - Array warnings = VisualInstance3D::get_configuration_warnings(); +PackedStringArray Light3D::get_configuration_warnings() const { + PackedStringArray warnings = VisualInstance3D::get_configuration_warnings(); if (!get_scale().is_equal_approx(Vector3(1, 1, 1))) { warnings.push_back(RTR("A light's scale does not affect the visual size of the light.")); @@ -596,8 +596,8 @@ OmniLight3D::ShadowMode OmniLight3D::get_shadow_mode() const { return shadow_mode; } -Array OmniLight3D::get_configuration_warnings() const { - Array warnings = Light3D::get_configuration_warnings(); +PackedStringArray OmniLight3D::get_configuration_warnings() const { + PackedStringArray warnings = Light3D::get_configuration_warnings(); if (!has_shadow() && get_projector().is_valid()) { warnings.push_back(RTR("Projector texture only works with shadows active.")); @@ -628,8 +628,8 @@ OmniLight3D::OmniLight3D() : set_shadow_mode(SHADOW_CUBE); } -Array SpotLight3D::get_configuration_warnings() const { - Array warnings = Light3D::get_configuration_warnings(); +PackedStringArray SpotLight3D::get_configuration_warnings() const { + PackedStringArray warnings = Light3D::get_configuration_warnings(); if (has_shadow() && get_param(PARAM_SPOT_ANGLE) >= 90.0) { warnings.push_back(RTR("A SpotLight3D with an angle wider than 90 degrees cannot cast shadows.")); diff --git a/scene/3d/light_3d.h b/scene/3d/light_3d.h index b242493c28f56..d6eca8d8b6e4d 100644 --- a/scene/3d/light_3d.h +++ b/scene/3d/light_3d.h @@ -147,7 +147,7 @@ class Light3D : public VisualInstance3D { Color get_correlated_color() const; virtual AABB get_aabb() const override; - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; Light3D(); ~Light3D(); @@ -217,7 +217,7 @@ class OmniLight3D : public Light3D { void set_shadow_mode(ShadowMode p_mode); ShadowMode get_shadow_mode() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; OmniLight3D(); }; @@ -231,7 +231,7 @@ class SpotLight3D : public Light3D { static void _bind_methods(); public: - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; SpotLight3D(); }; diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index 008a09f141255..86ff6d15dd9d1 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -1528,8 +1528,8 @@ Ref LightmapGI::get_camera_attributes() const { return camera_attributes; } -Array LightmapGI::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray LightmapGI::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") { warnings.push_back(RTR("Lightmap can only be baked from a device that supports the RD backends. Lightmap baking may fail.")); diff --git a/scene/3d/lightmap_gi.h b/scene/3d/lightmap_gi.h index 8d96c1e909d81..765e4a731dd21 100644 --- a/scene/3d/lightmap_gi.h +++ b/scene/3d/lightmap_gi.h @@ -302,7 +302,7 @@ class LightmapGI : public VisualInstance3D { BakeError bake(Node *p_from_node, String p_image_data_path = "", Lightmapper::BakeStepFunc p_bake_step = nullptr, void *p_bake_userdata = nullptr); - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; LightmapGI(); }; diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp index ff0869b4ea99c..eb52d4540e568 100644 --- a/scene/3d/navigation_agent_3d.cpp +++ b/scene/3d/navigation_agent_3d.cpp @@ -690,8 +690,8 @@ void NavigationAgent3D::_avoidance_done(Vector3 p_new_velocity) { emit_signal(SNAME("velocity_computed"), safe_velocity); } -Array NavigationAgent3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray NavigationAgent3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!Object::cast_to(get_parent())) { warnings.push_back(RTR("The NavigationAgent3D can be used only under a Node3D inheriting parent node.")); diff --git a/scene/3d/navigation_agent_3d.h b/scene/3d/navigation_agent_3d.h index 5f7b249b7faad..4eaed83149293 100644 --- a/scene/3d/navigation_agent_3d.h +++ b/scene/3d/navigation_agent_3d.h @@ -221,7 +221,7 @@ class NavigationAgent3D : public Node { void _avoidance_done(Vector3 p_new_velocity); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void set_avoidance_layers(uint32_t p_layers); uint32_t get_avoidance_layers() const; diff --git a/scene/3d/navigation_link_3d.cpp b/scene/3d/navigation_link_3d.cpp index c535393273f1a..dc776ebea255b 100644 --- a/scene/3d/navigation_link_3d.cpp +++ b/scene/3d/navigation_link_3d.cpp @@ -458,8 +458,8 @@ void NavigationLink3D::set_travel_cost(real_t p_travel_cost) { NavigationServer3D::get_singleton()->link_set_travel_cost(link, travel_cost); } -Array NavigationLink3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray NavigationLink3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (start_position.is_equal_approx(end_position)) { warnings.push_back(RTR("NavigationLink3D start position should be different than the end position to be useful.")); diff --git a/scene/3d/navigation_link_3d.h b/scene/3d/navigation_link_3d.h index 771d4707111d4..1867082811ffa 100644 --- a/scene/3d/navigation_link_3d.h +++ b/scene/3d/navigation_link_3d.h @@ -99,7 +99,7 @@ class NavigationLink3D : public Node3D { void set_travel_cost(real_t p_travel_cost); real_t get_travel_cost() const { return travel_cost; } - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; }; #endif // NAVIGATION_LINK_3D_H diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index 5d258d394a89b..d8a63c60a2289 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -270,8 +270,8 @@ bool NavigationRegion3D::is_baking() const { return NavigationServer3D::get_singleton()->is_baking_navigation_mesh(navigation_mesh); } -Array NavigationRegion3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray NavigationRegion3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (is_visible_in_tree() && is_inside_tree()) { if (!navigation_mesh.is_valid()) { diff --git a/scene/3d/navigation_region_3d.h b/scene/3d/navigation_region_3d.h index b6dde0bec883f..82468627deb00 100644 --- a/scene/3d/navigation_region_3d.h +++ b/scene/3d/navigation_region_3d.h @@ -108,7 +108,7 @@ class NavigationRegion3D : public Node3D { void _bake_finished(Ref p_navigation_mesh); bool is_baking() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; NavigationRegion3D(); ~NavigationRegion3D(); diff --git a/scene/3d/occluder_instance_3d.cpp b/scene/3d/occluder_instance_3d.cpp index 0f56bfad523a4..a76488e479ec5 100644 --- a/scene/3d/occluder_instance_3d.cpp +++ b/scene/3d/occluder_instance_3d.cpp @@ -693,8 +693,8 @@ OccluderInstance3D::BakeError OccluderInstance3D::bake_scene(Node *p_from_node, return BAKE_ERROR_OK; } -Array OccluderInstance3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray OccluderInstance3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!bool(GLOBAL_GET("rendering/occlusion_culling/use_occlusion_culling"))) { warnings.push_back(RTR("Occlusion culling is disabled in the Project Settings, which means occlusion culling won't be performed in the root viewport.\nTo resolve this, open the Project Settings and enable Rendering > Occlusion Culling > Use Occlusion Culling.")); diff --git a/scene/3d/occluder_instance_3d.h b/scene/3d/occluder_instance_3d.h index cf20655c2cdf1..f607877e8f245 100644 --- a/scene/3d/occluder_instance_3d.h +++ b/scene/3d/occluder_instance_3d.h @@ -181,7 +181,7 @@ class OccluderInstance3D : public VisualInstance3D { static void _bind_methods(); public: - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; enum BakeError { BAKE_ERROR_OK, diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp index 12e0123242eaf..1f8f7cd54cef8 100644 --- a/scene/3d/path_3d.cpp +++ b/scene/3d/path_3d.cpp @@ -317,8 +317,8 @@ void PathFollow3D::_validate_property(PropertyInfo &p_property) const { } } -Array PathFollow3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray PathFollow3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (is_visible_in_tree() && is_inside_tree()) { if (!Object::cast_to(get_parent())) { diff --git a/scene/3d/path_3d.h b/scene/3d/path_3d.h index 82fbf60bb68a3..0c9111bb8e7a6 100644 --- a/scene/3d/path_3d.h +++ b/scene/3d/path_3d.h @@ -122,7 +122,7 @@ class PathFollow3D : public Node3D { void set_cubic_interpolation_enabled(bool p_enabled); bool is_cubic_interpolation_enabled() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void update_transform(bool p_immediate = false); diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index 2cbd48487040f..67a7f76d7d688 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -995,8 +995,8 @@ TypedArray RigidBody3D::get_colliding_bodies() const { return ret; } -Array RigidBody3D::get_configuration_warnings() const { - Array warnings = CollisionObject3D::get_configuration_warnings(); +PackedStringArray RigidBody3D::get_configuration_warnings() const { + PackedStringArray warnings = CollisionObject3D::get_configuration_warnings(); Vector3 scale = get_transform().get_basis().get_scale(); if (ABS(scale.x - 1.0) > 0.05 || ABS(scale.y - 1.0) > 0.05 || ABS(scale.z - 1.0) > 0.05) { diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h index b360954263f42..b84b7c4f02272 100644 --- a/scene/3d/physics_body_3d.h +++ b/scene/3d/physics_body_3d.h @@ -329,7 +329,7 @@ class RigidBody3D : public PhysicsBody3D { void set_constant_torque(const Vector3 &p_torque); Vector3 get_constant_torque() const; - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; RigidBody3D(); ~RigidBody3D(); diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp index 89368a7309fea..b4dd6d09be3a4 100644 --- a/scene/3d/reflection_probe.cpp +++ b/scene/3d/reflection_probe.cpp @@ -190,8 +190,8 @@ AABB ReflectionProbe::get_aabb() const { return aabb; } -Array ReflectionProbe::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray ReflectionProbe::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") { warnings.push_back(RTR("ReflectionProbes are not supported when using the GL Compatibility backend yet. Support will be added in a future release.")); diff --git a/scene/3d/reflection_probe.h b/scene/3d/reflection_probe.h index 2561b2a922910..425fbb5bc2eb7 100644 --- a/scene/3d/reflection_probe.h +++ b/scene/3d/reflection_probe.h @@ -122,7 +122,7 @@ class ReflectionProbe : public VisualInstance3D { virtual AABB get_aabb() const override; - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; ReflectionProbe(); ~ReflectionProbe(); diff --git a/scene/3d/remote_transform_3d.cpp b/scene/3d/remote_transform_3d.cpp index bb41015219b55..8d6e717132157 100644 --- a/scene/3d/remote_transform_3d.cpp +++ b/scene/3d/remote_transform_3d.cpp @@ -200,8 +200,8 @@ void RemoteTransform3D::force_update_cache() { _update_cache(); } -Array RemoteTransform3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray RemoteTransform3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!has_node(remote_node) || !Object::cast_to(get_node(remote_node))) { warnings.push_back(RTR("The \"Remote Path\" property must point to a valid Node3D or Node3D-derived node to work.")); diff --git a/scene/3d/remote_transform_3d.h b/scene/3d/remote_transform_3d.h index 40b59a5a5ee95..3841821daed28 100644 --- a/scene/3d/remote_transform_3d.h +++ b/scene/3d/remote_transform_3d.h @@ -70,7 +70,7 @@ class RemoteTransform3D : public Node3D { void force_update_cache(); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; RemoteTransform3D(); }; diff --git a/scene/3d/shape_cast_3d.cpp b/scene/3d/shape_cast_3d.cpp index ba4ce834daa51..4d9eeada06cb6 100644 --- a/scene/3d/shape_cast_3d.cpp +++ b/scene/3d/shape_cast_3d.cpp @@ -170,8 +170,8 @@ void ShapeCast3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::COLOR, "debug_shape_custom_color"), "set_debug_shape_custom_color", "get_debug_shape_custom_color"); } -Array ShapeCast3D::get_configuration_warnings() const { - Array warnings = Node3D::get_configuration_warnings(); +PackedStringArray ShapeCast3D::get_configuration_warnings() const { + PackedStringArray warnings = Node3D::get_configuration_warnings(); if (shape.is_null()) { warnings.push_back(RTR("This node cannot interact with other objects unless a Shape3D is assigned.")); diff --git a/scene/3d/shape_cast_3d.h b/scene/3d/shape_cast_3d.h index d690a17a78d35..043e35090f327 100644 --- a/scene/3d/shape_cast_3d.h +++ b/scene/3d/shape_cast_3d.h @@ -140,7 +140,7 @@ class ShapeCast3D : public Node3D { void remove_exception(const CollisionObject3D *p_node); void clear_exceptions(); - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; }; #endif // SHAPE_CAST_3D_H diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp index 540e70866a119..bd03a97a36cc3 100644 --- a/scene/3d/soft_body_3d.cpp +++ b/scene/3d/soft_body_3d.cpp @@ -376,8 +376,8 @@ void SoftBody3D::_bind_methods() { BIND_ENUM_CONSTANT(DISABLE_MODE_KEEP_ACTIVE); } -Array SoftBody3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray SoftBody3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (mesh.is_null()) { warnings.push_back(RTR("This body will be ignored until you set a mesh.")); diff --git a/scene/3d/soft_body_3d.h b/scene/3d/soft_body_3d.h index b5d31d8440214..ab30f7e654ffe 100644 --- a/scene/3d/soft_body_3d.h +++ b/scene/3d/soft_body_3d.h @@ -126,7 +126,7 @@ class SoftBody3D : public MeshInstance3D { void _notification(int p_what); static void _bind_methods(); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; public: RID get_physics_rid() const { return physics_rid; } diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 234baac61a556..8e76e75d0edf0 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -1430,8 +1430,8 @@ StringName AnimatedSprite3D::get_animation() const { return animation; } -Array AnimatedSprite3D::get_configuration_warnings() const { - Array warnings = SpriteBase3D::get_configuration_warnings(); +PackedStringArray AnimatedSprite3D::get_configuration_warnings() const { + PackedStringArray warnings = SpriteBase3D::get_configuration_warnings(); if (frames.is_null()) { warnings.push_back(RTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite3D to display frames.")); } diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h index c83ed88b2da24..cbc7192ddf597 100644 --- a/scene/3d/sprite_3d.h +++ b/scene/3d/sprite_3d.h @@ -285,7 +285,7 @@ class AnimatedSprite3D : public SpriteBase3D { virtual Rect2 get_item_rect() const override; - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; virtual void get_argument_options(const StringName &p_function, int p_idx, List *r_options) const override; AnimatedSprite3D(); diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index b309205697f46..c23032d3b9021 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -105,8 +105,8 @@ void VehicleWheel3D::_notification(int p_what) { } } -Array VehicleWheel3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray VehicleWheel3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!Object::cast_to(get_parent())) { warnings.push_back(RTR("VehicleWheel3D serves to provide a wheel system to a VehicleBody3D. Please use it as a child of a VehicleBody3D.")); diff --git a/scene/3d/vehicle_body_3d.h b/scene/3d/vehicle_body_3d.h index 8127340accc7a..ce913f152d59e 100644 --- a/scene/3d/vehicle_body_3d.h +++ b/scene/3d/vehicle_body_3d.h @@ -147,7 +147,7 @@ class VehicleWheel3D : public Node3D { void set_steering(real_t p_steering); real_t get_steering() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; VehicleWheel3D(); }; diff --git a/scene/3d/visible_on_screen_notifier_3d.cpp b/scene/3d/visible_on_screen_notifier_3d.cpp index c10ddec17e35e..be86872a591d8 100644 --- a/scene/3d/visible_on_screen_notifier_3d.cpp +++ b/scene/3d/visible_on_screen_notifier_3d.cpp @@ -79,8 +79,8 @@ void VisibleOnScreenNotifier3D::_notification(int p_what) { } } -Array VisibleOnScreenNotifier3D::get_configuration_warnings() const { - Array warnings = VisualInstance3D::get_configuration_warnings(); +PackedStringArray VisibleOnScreenNotifier3D::get_configuration_warnings() const { + PackedStringArray warnings = VisualInstance3D::get_configuration_warnings(); if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") { warnings.push_back(RTR("VisibleOnScreenNotifier3D nodes are not supported when using the GL Compatibility backend yet. Support will be added in a future release.")); diff --git a/scene/3d/visible_on_screen_notifier_3d.h b/scene/3d/visible_on_screen_notifier_3d.h index 10e41ceec6dde..85156c256e9b1 100644 --- a/scene/3d/visible_on_screen_notifier_3d.h +++ b/scene/3d/visible_on_screen_notifier_3d.h @@ -57,7 +57,7 @@ class VisibleOnScreenNotifier3D : public VisualInstance3D { virtual AABB get_aabb() const override; bool is_on_screen() const; - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; VisibleOnScreenNotifier3D(); ~VisibleOnScreenNotifier3D(); diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp index 47a9a581b8172..503c39ae3e969 100644 --- a/scene/3d/visual_instance_3d.cpp +++ b/scene/3d/visual_instance_3d.cpp @@ -425,8 +425,8 @@ bool GeometryInstance3D::is_ignoring_occlusion_culling() { return ignore_occlusion_culling; } -Array GeometryInstance3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray GeometryInstance3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!Math::is_zero_approx(visibility_range_end) && visibility_range_end <= visibility_range_begin) { warnings.push_back(RTR("The GeometryInstance3D visibility range's End distance is set to a non-zero value, but is lower than the Begin distance.\nThis means the GeometryInstance3D will never be visible.\nTo resolve this, set the End distance to 0 or to a value greater than the Begin distance.")); diff --git a/scene/3d/visual_instance_3d.h b/scene/3d/visual_instance_3d.h index c088e189ce88c..59ede26ac1b12 100644 --- a/scene/3d/visual_instance_3d.h +++ b/scene/3d/visual_instance_3d.h @@ -194,7 +194,7 @@ class GeometryInstance3D : public VisualInstance3D { void set_ignore_occlusion_culling(bool p_enabled); bool is_ignoring_occlusion_culling(); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; GeometryInstance3D(); virtual ~GeometryInstance3D(); }; diff --git a/scene/3d/voxel_gi.cpp b/scene/3d/voxel_gi.cpp index 011aecc72493a..eb8569fa30fa7 100644 --- a/scene/3d/voxel_gi.cpp +++ b/scene/3d/voxel_gi.cpp @@ -518,8 +518,8 @@ AABB VoxelGI::get_aabb() const { return AABB(-size / 2, size); } -Array VoxelGI::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray VoxelGI::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") { warnings.push_back(RTR("VoxelGI nodes are not supported when using the GL Compatibility backend yet. Support will be added in a future release.")); diff --git a/scene/3d/voxel_gi.h b/scene/3d/voxel_gi.h index 316cb26b77c57..7d7787f721294 100644 --- a/scene/3d/voxel_gi.h +++ b/scene/3d/voxel_gi.h @@ -163,7 +163,7 @@ class VoxelGI : public VisualInstance3D { virtual AABB get_aabb() const override; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; VoxelGI(); ~VoxelGI(); diff --git a/scene/3d/world_environment.cpp b/scene/3d/world_environment.cpp index 8db310ce30a8e..4687c84734838 100644 --- a/scene/3d/world_environment.cpp +++ b/scene/3d/world_environment.cpp @@ -135,8 +135,8 @@ Ref WorldEnvironment::get_camera_attributes() const { return camera_attributes; } -Array WorldEnvironment::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray WorldEnvironment::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!environment.is_valid() && !camera_attributes.is_valid()) { warnings.push_back(RTR("To have any visible effect, WorldEnvironment requires its \"Environment\" property to contain an Environment, its \"Camera Attributes\" property to contain a CameraAttributes resource, or both.")); diff --git a/scene/3d/world_environment.h b/scene/3d/world_environment.h index 57d95f1f0ebf6..2809d2550aeb5 100644 --- a/scene/3d/world_environment.h +++ b/scene/3d/world_environment.h @@ -55,7 +55,7 @@ class WorldEnvironment : public Node { void set_camera_attributes(const Ref &p_camera_attributes); Ref get_camera_attributes() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; WorldEnvironment(); }; diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index 79db9d5560d03..70e32c1a31021 100644 --- a/scene/3d/xr_nodes.cpp +++ b/scene/3d/xr_nodes.cpp @@ -76,8 +76,8 @@ void XRCamera3D::_pose_changed(const Ref &p_pose) { } } -Array XRCamera3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray XRCamera3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (is_visible() && is_inside_tree()) { // must be child node of XROrigin3D! @@ -424,8 +424,8 @@ XRNode3D::~XRNode3D() { xr_server->disconnect("tracker_removed", callable_mp(this, &XRNode3D::_removed_tracker)); } -Array XRNode3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray XRNode3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (is_visible() && is_inside_tree()) { // must be child node of XROrigin! @@ -603,8 +603,8 @@ Plane XRAnchor3D::get_plane() const { Vector XROrigin3D::origin_nodes; -Array XROrigin3D::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray XROrigin3D::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (is_visible() && is_inside_tree()) { bool has_camera = false; diff --git a/scene/3d/xr_nodes.h b/scene/3d/xr_nodes.h index 7f75e69fbc960..ad52cf113d1bd 100644 --- a/scene/3d/xr_nodes.h +++ b/scene/3d/xr_nodes.h @@ -55,7 +55,7 @@ class XRCamera3D : public Camera3D { void _pose_changed(const Ref &p_pose); public: - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; virtual Vector3 project_local_ray_normal(const Point2 &p_pos) const override; virtual Point2 unproject_position(const Vector3 &p_pos) const override; @@ -109,7 +109,7 @@ class XRNode3D : public Node3D { Ref get_pose(); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; XRNode3D(); ~XRNode3D(); @@ -193,7 +193,7 @@ class XROrigin3D : public Node3D { static void _bind_methods(); public: - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; real_t get_world_scale() const; void set_world_scale(real_t p_world_scale); diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index 9694e855b5258..844b6e64e8303 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -606,8 +606,8 @@ uint64_t AnimationTree::get_last_process_pass() const { return process_pass; } -Array AnimationTree::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray AnimationTree::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!root_animation_node.is_valid()) { warnings.push_back(RTR("No root AnimationNode for the graph is set.")); } diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h index 7d153b2736133..87928e4d2075a 100644 --- a/scene/animation/animation_tree.h +++ b/scene/animation/animation_tree.h @@ -261,7 +261,7 @@ class AnimationTree : public AnimationMixer { void set_advance_expression_base_node(const NodePath &p_path); NodePath get_advance_expression_base_node() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; bool is_state_invalid() const; String get_invalid_state_reason() const; diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 49616f87ccebc..66b14dc967180 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -430,8 +430,8 @@ bool BaseButton::_was_pressed_by_mouse() const { return was_mouse_pressed; } -Array BaseButton::get_configuration_warnings() const { - Array warnings = Control::get_configuration_warnings(); +PackedStringArray BaseButton::get_configuration_warnings() const { + PackedStringArray warnings = Control::get_configuration_warnings(); if (get_button_group().is_valid() && !is_toggle_mode()) { warnings.push_back(RTR("ButtonGroup is intended to be used only with buttons that have toggle_mode set to true.")); diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h index b5fbf11c8d3c0..a8d5cee44cade 100644 --- a/scene/gui/base_button.h +++ b/scene/gui/base_button.h @@ -139,7 +139,7 @@ class BaseButton : public Control { void set_button_group(const Ref &p_group); Ref get_button_group() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; BaseButton(); ~BaseButton(); diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp index 594ae3eee8ad7..c6e66c95c6951 100644 --- a/scene/gui/container.cpp +++ b/scene/gui/container.cpp @@ -189,8 +189,8 @@ void Container::_notification(int p_what) { } } -Array Container::get_configuration_warnings() const { - Array warnings = Control::get_configuration_warnings(); +PackedStringArray Container::get_configuration_warnings() const { + PackedStringArray warnings = Control::get_configuration_warnings(); if (get_class() == "Container" && get_script().is_null()) { warnings.push_back(RTR("Container by itself serves no purpose unless a script configures its children placement behavior.\nIf you don't intend to add a script, use a plain Control node instead.")); diff --git a/scene/gui/container.h b/scene/gui/container.h index d04a71fe231db..94c3c540d72b1 100644 --- a/scene/gui/container.h +++ b/scene/gui/container.h @@ -63,7 +63,7 @@ class Container : public Control { virtual Vector get_allowed_size_flags_horizontal() const; virtual Vector get_allowed_size_flags_vertical() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; Container(); }; diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 2124ffb8060fb..b351d1ee4f26b 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -228,9 +228,9 @@ void Control::get_argument_options(const StringName &p_function, int p_idx, List } } -Array Control::get_configuration_warnings() const { - ERR_READ_THREAD_GUARD_V(Array()); - Array warnings = Node::get_configuration_warnings(); +PackedStringArray Control::get_configuration_warnings() const { + ERR_READ_THREAD_GUARD_V(PackedStringArray()); + PackedStringArray warnings = Node::get_configuration_warnings(); if (data.mouse_filter == MOUSE_FILTER_IGNORE && !data.tooltip.is_empty()) { warnings.push_back(RTR("The Hint Tooltip won't be displayed as the control's Mouse Filter is set to \"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\".")); diff --git a/scene/gui/control.h b/scene/gui/control.h index 8bcd9554577d5..a900a593ddb02 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -407,7 +407,7 @@ class Control : public CanvasItem { static void set_root_layout_direction(int p_root_dir); virtual void get_argument_options(const StringName &p_function, int p_idx, List *r_options) const override; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; virtual bool is_text_field() const; diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 7ea3aa344a7fa..c23d21775fdef 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -251,8 +251,8 @@ Control::CursorShape GraphEdit::get_cursor_shape(const Point2 &p_pos) const { return Control::get_cursor_shape(p_pos); } -Array GraphEdit::get_configuration_warnings() const { - Array warnings = Control::get_configuration_warnings(); +PackedStringArray GraphEdit::get_configuration_warnings() const { + PackedStringArray warnings = Control::get_configuration_warnings(); warnings.push_back(RTR("Please be aware that GraphEdit and GraphNode will undergo extensive refactoring in a future 4.x version involving compatibility-breaking API changes.")); diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h index dd99651d603e5..e24f039e84dc6 100644 --- a/scene/gui/graph_edit.h +++ b/scene/gui/graph_edit.h @@ -375,7 +375,7 @@ class GraphEdit : public Control { virtual CursorShape get_cursor_shape(const Point2 &p_pos = Point2i()) const override; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; Error connect_node(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port); bool is_node_connected(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port); diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index f8479710152f4..56da1332e778f 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -330,8 +330,8 @@ inline void draw_glyph_outline(const Glyph &p_gl, const RID &p_canvas, const Col } } -Array Label::get_configuration_warnings() const { - Array warnings = Control::get_configuration_warnings(); +PackedStringArray Label::get_configuration_warnings() const { + PackedStringArray warnings = Control::get_configuration_warnings(); // FIXME: This is not ideal and the sizing model should be fixed, // but for now we have to warn about this impossible to resolve combination. diff --git a/scene/gui/label.h b/scene/gui/label.h index fe90bd06bb4b4..4bd0e53605749 100644 --- a/scene/gui/label.h +++ b/scene/gui/label.h @@ -97,7 +97,7 @@ class Label : public Control { public: virtual Size2 get_minimum_size() const override; - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; void set_horizontal_alignment(HorizontalAlignment p_alignment); HorizontalAlignment get_horizontal_alignment() const; diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 72a84e4884e2e..37212a34ad33d 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -2279,8 +2279,8 @@ void LineEdit::_emit_text_change() { emit_signal(SNAME("text_changed"), text); text_changed_dirty = false; } -Array LineEdit::get_configuration_warnings() const { - Array warnings = Control::get_configuration_warnings(); +PackedStringArray LineEdit::get_configuration_warnings() const { + PackedStringArray warnings = Control::get_configuration_warnings(); if (secret_character.length() > 1) { warnings.push_back("Secret Character property supports only one character. Extra characters will be ignored."); } diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index b2582e0eb532d..993bc727e481d 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -385,7 +385,7 @@ class LineEdit : public Control { virtual bool is_text_field() const override; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void show_virtual_keyboard(); diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index da40c7f3e2461..236dfcc864a13 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -30,8 +30,8 @@ #include "range.h" -Array Range::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray Range::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (shared->exp_ratio && shared->min <= 0) { warnings.push_back(RTR("If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0.")); diff --git a/scene/gui/range.h b/scene/gui/range.h index e08a77f0f7bf6..b1c2446deda36 100644 --- a/scene/gui/range.h +++ b/scene/gui/range.h @@ -103,7 +103,7 @@ class Range : public Control { void share(Range *p_range); void unshare(); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; Range(); ~Range(); diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index fd3a1f4a450d7..89d308de3f6ac 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -537,8 +537,8 @@ void ScrollContainer::set_follow_focus(bool p_follow) { follow_focus = p_follow; } -Array ScrollContainer::get_configuration_warnings() const { - Array warnings = Container::get_configuration_warnings(); +PackedStringArray ScrollContainer::get_configuration_warnings() const { + PackedStringArray warnings = Container::get_configuration_warnings(); int found = 0; diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h index 69ff7ccc14ec7..02146618cddd1 100644 --- a/scene/gui/scroll_container.h +++ b/scene/gui/scroll_container.h @@ -119,7 +119,7 @@ class ScrollContainer : public Container { VScrollBar *get_v_scroll_bar(); void ensure_control_visible(Control *p_control); - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; ScrollContainer(); }; diff --git a/scene/gui/subviewport_container.cpp b/scene/gui/subviewport_container.cpp index 4ed136005a5d8..0d33774e2087b 100644 --- a/scene/gui/subviewport_container.cpp +++ b/scene/gui/subviewport_container.cpp @@ -259,8 +259,8 @@ void SubViewportContainer::remove_child_notify(Node *p_child) { } } -Array SubViewportContainer::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray SubViewportContainer::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); bool has_viewport = false; for (int i = 0; i < get_child_count(); i++) { diff --git a/scene/gui/subviewport_container.h b/scene/gui/subviewport_container.h index e172f2f040675..06420de7303b0 100644 --- a/scene/gui/subviewport_container.h +++ b/scene/gui/subviewport_container.h @@ -68,7 +68,7 @@ class SubViewportContainer : public Container { virtual Vector get_allowed_size_flags_horizontal() const override; virtual Vector get_allowed_size_flags_vertical() const override; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; SubViewportContainer(); }; diff --git a/scene/main/missing_node.cpp b/scene/main/missing_node.cpp index 02e079892c340..83672ae5e01eb 100644 --- a/scene/main/missing_node.cpp +++ b/scene/main/missing_node.cpp @@ -82,9 +82,9 @@ bool MissingNode::is_recording_properties() const { return recording_properties; } -Array MissingNode::get_configuration_warnings() const { +PackedStringArray MissingNode::get_configuration_warnings() const { // The mere existence of this node is warning. - Array ret; + PackedStringArray ret; if (!original_scene.is_empty()) { ret.push_back(vformat(RTR("This node was an instance of scene '%s', which was no longer available when this scene was loaded."), original_scene)); ret.push_back(vformat(RTR("Saving current scene will discard instance and all its properties, including editable children edits (if existing)."))); diff --git a/scene/main/missing_node.h b/scene/main/missing_node.h index ccaf1e471e22a..fb1c957988b5d 100644 --- a/scene/main/missing_node.h +++ b/scene/main/missing_node.h @@ -59,7 +59,7 @@ class MissingNode : public Node { void set_recording_properties(bool p_enable); bool is_recording_properties() const; - virtual Array get_configuration_warnings() const override; + virtual PackedStringArray get_configuration_warnings() const override; MissingNode(); }; diff --git a/scene/main/shader_globals_override.cpp b/scene/main/shader_globals_override.cpp index b3d3659c5b800..e3c26c30e21b3 100644 --- a/scene/main/shader_globals_override.cpp +++ b/scene/main/shader_globals_override.cpp @@ -271,8 +271,8 @@ void ShaderGlobalsOverride::_notification(int p_what) { } } -Array ShaderGlobalsOverride::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray ShaderGlobalsOverride::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (!active) { warnings.push_back(RTR("ShaderGlobalsOverride is not active because another node of the same type is in the scene.")); diff --git a/scene/main/shader_globals_override.h b/scene/main/shader_globals_override.h index 72226c0cb357c..d8557ecf6a1ee 100644 --- a/scene/main/shader_globals_override.h +++ b/scene/main/shader_globals_override.h @@ -58,7 +58,7 @@ class ShaderGlobalsOverride : public Node { static void _bind_methods(); public: - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; ShaderGlobalsOverride(); }; diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp index acb788f76fb5c..0f4f18b495eab 100644 --- a/scene/main/timer.cpp +++ b/scene/main/timer.cpp @@ -180,8 +180,8 @@ void Timer::_set_process(bool p_process, bool p_force) { processing = p_process; } -Array Timer::get_configuration_warnings() const { - Array warnings = Node::get_configuration_warnings(); +PackedStringArray Timer::get_configuration_warnings() const { + PackedStringArray warnings = Node::get_configuration_warnings(); if (wait_time < 0.05 - CMP_EPSILON) { warnings.push_back(RTR("Very low timer wait times (< 0.05 seconds) may behave in significantly different ways depending on the rendered or physics frame rate.\nConsider using a script's process loop instead of relying on a Timer for very low wait times.")); diff --git a/scene/main/timer.h b/scene/main/timer.h index add61ef5f4709..d16e49793ddd9 100644 --- a/scene/main/timer.h +++ b/scene/main/timer.h @@ -73,7 +73,7 @@ class Timer : public Node { double get_time_left() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void set_timer_process_callback(TimerProcessCallback p_callback); TimerProcessCallback get_timer_process_callback() const; diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 5952af60ee8df..da72c8b737dec 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -3510,9 +3510,9 @@ Variant Viewport::gui_get_drag_data() const { return gui.drag_data; } -Array Viewport::get_configuration_warnings() const { - ERR_MAIN_THREAD_GUARD_V(Array()); - Array warnings = Node::get_configuration_warnings(); +PackedStringArray Viewport::get_configuration_warnings() const { + ERR_MAIN_THREAD_GUARD_V(PackedStringArray()); + PackedStringArray warnings = Node::get_configuration_warnings(); if (size.x <= 1 || size.y <= 1) { warnings.push_back(RTR("The Viewport size must be greater than or equal to 2 pixels on both dimensions to render anything.")); diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 68f0e8b65508b..03db0d402302c 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -614,7 +614,7 @@ class Viewport : public Node { Control *gui_get_focus_owner() const; Control *gui_get_hovered_control() const; - Array get_configuration_warnings() const override; + PackedStringArray get_configuration_warnings() const override; void set_debug_draw(DebugDraw p_debug_draw); DebugDraw get_debug_draw() const; From 92fcbe2f5c1b0293dea581bc4b7bfd9d7e68a160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 17 Feb 2024 19:04:18 +0100 Subject: [PATCH 3/3] Revert "Allow configuration warnings to refer to a property" This reverts commit bf37a9bac6ebfb09c0a374260c35ede8373ce427. --- doc/classes/EditorProperty.xml | 3 - doc/classes/Node.xml | 6 +- editor/editor_inspector.cpp | 96 ------------------ editor/editor_inspector.h | 10 -- editor/gui/scene_tree_editor.cpp | 50 ++++++++-- .../4.2-stable.expected | 7 -- scene/main/node.compat.inc | 41 -------- scene/main/node.cpp | 97 ++----------------- scene/main/node.h | 9 +- 9 files changed, 52 insertions(+), 267 deletions(-) delete mode 100644 scene/main/node.compat.inc diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 535515165be62..4fd288f16df22 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -72,9 +72,6 @@ Used by the inspector, set to [code]true[/code] when the property is checked. - - Used by the inspector, set to show a configuration warning on the property. - Used by the inspector, set to [code]true[/code] when the property can be deleted by the user. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index a46bb593d4785..4fced2142fa75 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -37,13 +37,9 @@ - + The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a [code]tool[/code] script. - Each array element must either be a [String] or a [Dictionary]. - A dictionary element must contain a key [code]message[/code] of type [String] which is shown in the user interface. - The dictionary may optionally contain a key [code]property[/code] of type [NodePath], which also shows this warning in the inspector on the corresponding property. - If a string is found in the returned array, it is converted to an equivalent dictionary with the [code]message[/code] field set. Returning an empty array produces no warnings. Call [method update_configuration_warnings] when the warnings need to be updated for this node. [codeblock] diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 4dfc0023b93c5..583a52ed52e32 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -214,22 +214,6 @@ void EditorProperty::_notification(int p_what) { text_size -= close->get_width() + 4 * EDSCALE; } } - - if (!configuration_warning.is_empty() && !read_only) { - Ref warning; - - warning = get_theme_icon(SNAME("NodeWarning"), SNAME("EditorIcons")); - - rect.size.x -= warning->get_width() + get_theme_constant(SNAME("hseparator"), SNAME("Tree")); - - if (is_layout_rtl()) { - rect.position.x += warning->get_width() + get_theme_constant(SNAME("hseparator"), SNAME("Tree")); - } - - if (no_children) { - text_size -= warning->get_width() + 4 * EDSCALE; - } - } } //set children @@ -415,38 +399,6 @@ void EditorProperty::_notification(int p_what) { } else { delete_rect = Rect2(); } - - if (!configuration_warning.is_empty() && !read_only) { - Ref warning; - - StringName warning_icon; - Node *node = Object::cast_to(object); - if (node) { - const int warning_num = node->get_configuration_warnings_of_property(property_path).size(); - warning_icon = Node::get_configuration_warning_icon(warning_num); - } else { - // This shouldn't happen, but let's not crash over an icon. - warning_icon = "NodeWarning"; - } - warning = get_theme_icon(warning_icon, SNAME("EditorIcons")); - - ofs -= warning->get_width() + get_theme_constant(SNAME("hseparator"), SNAME("Tree")); - - Color color2(1, 1, 1); - if (configuration_warning_hover) { - color2.r *= 1.2; - color2.g *= 1.2; - color2.b *= 1.2; - } - configuration_warning_rect = Rect2(ofs, ((size.height - warning->get_height()) / 2), warning->get_width(), warning->get_height()); - if (rtl) { - draw_texture(warning, Vector2(size.width - configuration_warning_rect.position.x - warning->get_width(), configuration_warning_rect.position.y), color2); - } else { - draw_texture(warning, configuration_warning_rect.position, color2); - } - } else { - configuration_warning_rect = Rect2(); - } } break; } } @@ -722,12 +674,6 @@ void EditorProperty::gui_input(const Ref &p_event) { check_hover = new_check_hover; queue_redraw(); } - - bool new_configuration_warning_hover = configuration_warning_rect.has_point(mpos) && !button_left; - if (new_configuration_warning_hover != configuration_warning_hover) { - configuration_warning_hover = new_configuration_warning_hover; - queue_redraw(); - } } Ref mb = p_event; @@ -784,16 +730,6 @@ void EditorProperty::gui_input(const Ref &p_event) { queue_redraw(); emit_signal(SNAME("property_checked"), property, checked); } - - if (configuration_warning_rect.has_point(mpos)) { - if (warning_dialog == nullptr) { - warning_dialog = memnew(AcceptDialog); - add_child(warning_dialog); - warning_dialog->set_title(TTR("Node Configuration Warning!")); - } - warning_dialog->set_text(configuration_warning); - warning_dialog->popup_centered(); - } } else if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) { accept_event(); _update_popup(); @@ -919,16 +855,6 @@ float EditorProperty::get_name_split_ratio() const { return split_ratio; } -void EditorProperty::set_configuration_warning(const String &p_configuration_warning) { - configuration_warning = p_configuration_warning; - queue_redraw(); - queue_sort(); -} - -String EditorProperty::get_configuration_warning() const { - return configuration_warning; -} - void EditorProperty::set_object_and_property(Object *p_object, const StringName &p_property) { object = p_object; property = p_property; @@ -985,15 +911,6 @@ void EditorProperty::_update_pin_flags() { } } -void EditorProperty::_update_configuration_warnings() { - Node *node = Object::cast_to(object); - if (node) { - const PackedStringArray warnings = node->get_configuration_warnings_as_strings(true, property_path); - const String warning_lines = String("\n").join(warnings); - set_configuration_warning(warning_lines); - } -} - Control *EditorProperty::make_custom_tooltip(const String &p_text) const { EditorHelpBit *tooltip = nullptr; @@ -1069,9 +986,6 @@ void EditorProperty::_bind_methods() { ClassDB::bind_method(D_METHOD("set_deletable", "deletable"), &EditorProperty::set_deletable); ClassDB::bind_method(D_METHOD("is_deletable"), &EditorProperty::is_deletable); - ClassDB::bind_method(D_METHOD("set_configuration_warning", "configuration_warning"), &EditorProperty::set_configuration_warning); - ClassDB::bind_method(D_METHOD("get_configuration_warning"), &EditorProperty::get_configuration_warning); - ClassDB::bind_method(D_METHOD("get_edited_property"), &EditorProperty::get_edited_property); ClassDB::bind_method(D_METHOD("get_edited_object"), &EditorProperty::get_edited_object); @@ -1089,7 +1003,6 @@ void EditorProperty::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_warning"), "set_draw_warning", "is_draw_warning"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "keying"), "set_keying", "is_keying"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "deletable"), "set_deletable", "is_deletable"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "configuration_warning"), "set_configuration_warning", "get_configuration_warning"); ADD_SIGNAL(MethodInfo("property_changed", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), PropertyInfo(Variant::STRING_NAME, "field"), PropertyInfo(Variant::BOOL, "changing"))); ADD_SIGNAL(MethodInfo("multiple_properties_changed", PropertyInfo(Variant::PACKED_STRING_ARRAY, "properties"), PropertyInfo(Variant::ARRAY, "value"))); @@ -3409,7 +3322,6 @@ void EditorInspector::update_tree() { ep->set_keying(keying); ep->set_read_only(property_read_only || all_read_only); ep->set_deletable(deletable_properties || p.name.begins_with("metadata/")); - ep->_update_configuration_warnings(); } current_vbox->add_child(editors[i].property_editor); @@ -4056,12 +3968,6 @@ void EditorInspector::_node_removed(Node *p_node) { } } -void EditorInspector::_warning_changed(Node *p_node) { - if (p_node == object) { - update_tree_pending = true; - } -} - void EditorInspector::_notification(int p_what) { switch (p_what) { case NOTIFICATION_READY: { @@ -4073,7 +3979,6 @@ void EditorInspector::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { if (!sub_inspector) { get_tree()->connect("node_removed", callable_mp(this, &EditorInspector::_node_removed)); - get_tree()->connect("node_configuration_warning_changed", callable_mp(this, &EditorInspector::_warning_changed)); } } break; @@ -4084,7 +3989,6 @@ void EditorInspector::_notification(int p_what) { case NOTIFICATION_EXIT_TREE: { if (!sub_inspector) { get_tree()->disconnect("node_removed", callable_mp(this, &EditorInspector::_node_removed)); - get_tree()->disconnect("node_configuration_warning_changed", callable_mp(this, &EditorInspector::_warning_changed)); } edit(nullptr); } break; diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 2066002a03b7a..0e908b7a14a08 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -76,7 +76,6 @@ class EditorProperty : public Container { String doc_path; bool internal = false; bool has_doc_tooltip = false; - AcceptDialog *warning_dialog = nullptr; int property_usage; @@ -99,8 +98,6 @@ class EditorProperty : public Container { bool check_hover = false; Rect2 delete_rect; bool delete_hover = false; - Rect2 configuration_warning_rect; - bool configuration_warning_hover = false; bool can_revert = false; bool can_pin = false; @@ -124,15 +121,12 @@ class EditorProperty : public Container { Control *bottom_editor = nullptr; PopupMenu *menu = nullptr; - String configuration_warning; - HashMap cache; GDVIRTUAL0(_update_property) GDVIRTUAL1(_set_read_only, bool) void _update_pin_flags(); - void _update_configuration_warnings(); protected: void _notification(int p_what); @@ -209,9 +203,6 @@ class EditorProperty : public Container { void set_name_split_ratio(float p_ratio); float get_name_split_ratio() const; - void set_configuration_warning(const String &p_configuration_warning); - String get_configuration_warning() const; - void set_object_and_property(Object *p_object, const StringName &p_property); virtual Control *make_custom_tooltip(const String &p_text) const override; @@ -542,7 +533,6 @@ class EditorInspector : public ScrollContainer { void _object_id_selected(const String &p_path, ObjectID p_id); void _node_removed(Node *p_node); - void _warning_changed(Node *p_node); HashMap per_array_page; void _page_change_request(int p_new_page, const StringName &p_array_prefix); diff --git a/editor/gui/scene_tree_editor.cpp b/editor/gui/scene_tree_editor.cpp index 7fb52251cefb8..14af49aabff3f 100644 --- a/editor/gui/scene_tree_editor.cpp +++ b/editor/gui/scene_tree_editor.cpp @@ -132,13 +132,32 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_i } undo_redo->commit_action(); } else if (p_id == BUTTON_WARNING) { - const PackedStringArray warnings = n->get_configuration_warnings_as_strings(true); + const PackedStringArray warnings = n->get_configuration_warnings(); + if (warnings.is_empty()) { return; } - const String warning_lines = String("\n").join(warnings); - warning->set_text(warning_lines); + // Improve looks on tooltip, extra spacing on non-bullet point newlines. + const String bullet_point = U"• "; + String all_warnings; + for (const String &w : warnings) { + all_warnings += "\n" + bullet_point + w; + } + + // Limit the line width while keeping some padding. + // It is not efficient, but it does not have to be. + const PackedInt32Array boundaries = TS->string_get_word_breaks(all_warnings, "", 80); + PackedStringArray lines; + for (int i = 0; i < boundaries.size(); i += 2) { + const int start = boundaries[i]; + const int end = boundaries[i + 1]; + const String line = all_warnings.substr(start, end - start); + lines.append(line); + } + all_warnings = String("\n").join(lines).indent(" ").replace(U" •", U"\n•").substr(2); // We don't want the first two newlines. + + warning->set_text(all_warnings); warning->popup_centered(); } else if (p_id == BUTTON_SIGNALS) { @@ -275,12 +294,29 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { if (can_rename) { //should be can edit.. - const PackedStringArray warnings = p_node->get_configuration_warnings_as_strings(false); + const PackedStringArray warnings = p_node->get_configuration_warnings(); const int num_warnings = warnings.size(); if (num_warnings > 0) { - const StringName warning_icon = Node::get_configuration_warning_icon(num_warnings); - const String warning_lines = String("\n\n").join(warnings); - item->add_button(0, get_editor_theme_icon(warning_icon), BUTTON_WARNING, false, TTR("Node configuration warning:") + "\n\n" + warning_lines); + String warning_icon; + if (num_warnings == 1) { + warning_icon = SNAME("NodeWarning"); + } else if (num_warnings <= 3) { + warning_icon = vformat("NodeWarnings%d", num_warnings); + } else { + warning_icon = SNAME("NodeWarnings4Plus"); + } + + // Improve looks on tooltip, extra spacing on non-bullet point newlines. + const String bullet_point = U"• "; + String all_warnings; + for (const String &w : warnings) { + all_warnings += "\n\n" + bullet_point + w.replace("\n", "\n "); + } + if (num_warnings == 1) { + all_warnings.remove_at(0); // With only one warning, two newlines do not look great. + } + + item->add_button(0, get_editor_theme_icon(warning_icon), BUTTON_WARNING, false, TTR("Node configuration warning:") + all_warnings); } if (p_node->is_unique_name_in_owner()) { diff --git a/misc/extension_api_validation/4.2-stable.expected b/misc/extension_api_validation/4.2-stable.expected index 2b7a39944ab4b..b3da7c0877ed1 100644 --- a/misc/extension_api_validation/4.2-stable.expected +++ b/misc/extension_api_validation/4.2-stable.expected @@ -84,13 +84,6 @@ Validate extension JSON: Error: Field 'classes/Sky/properties/sky_material': typ Property hints reordered to improve editor usability. The types allowed are still the same as before. No adjustments should be necessary. -GH-68420 --------- -Validate extension JSON: Error: Field 'classes/Node/methods/_get_configuration_warnings/return_value': type changed value in new API, from "PackedStringArray" to "Array". - -Allow configuration warnings to refer to a property. Compatibility method registered. - - GH-86907 -------- diff --git a/scene/main/node.compat.inc b/scene/main/node.compat.inc deleted file mode 100644 index 7e957e5a14a11..0000000000000 --- a/scene/main/node.compat.inc +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************/ -/* node.compat.inc */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/**************************************************************************/ - -#ifndef DISABLE_DEPRECATED - -PackedStringArray Node::get_configuration_warnings_bind_compat_68420() const { - return PackedStringArray(get_configuration_warnings()); -} - -void Node::_bind_compatibility_methods() { - ClassDB::bind_compatibility_method(D_METHOD("get_configuration_warnings"), &Node::get_configuration_warnings_bind_compat_68420); -} - -#endif // DISABLE_DEPRECATED diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 77e00e4ab43ba..853c684b136aa 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -3204,91 +3204,16 @@ void Node::clear_internal_tree_resource_paths() { } } -Array Node::get_configuration_warnings() const { - ERR_THREAD_GUARD_V(Array()); - Array warnings; - GDVIRTUAL_CALL(_get_configuration_warnings, warnings); - return warnings; -} - -Dictionary Node::configuration_warning_to_dict(const Variant &p_warning) const { - switch (p_warning.get_type()) { - case Variant::Type::DICTIONARY: - return p_warning; - case Variant::Type::STRING: { - // Convert string to dictionary. - Dictionary warning; - warning["message"] = p_warning; - return warning; - } - default: { - ERR_FAIL_V_MSG(Dictionary(), "Node::get_configuration_warnings returned a value which is neither a string nor a dictionary, but a " + Variant::get_type_name(p_warning.get_type())); - } - } -} - -Vector Node::get_configuration_warnings_as_dicts() const { - Vector ret; - Array mixed = get_configuration_warnings(); - for (int i = 0; i < mixed.size(); i++) { - ret.append(configuration_warning_to_dict(mixed[i])); - } - return ret; -} +PackedStringArray Node::get_configuration_warnings() const { + ERR_THREAD_GUARD_V(PackedStringArray()); + PackedStringArray ret; -Vector Node::get_configuration_warnings_of_property(const String &p_property) const { - Vector ret; - Vector warnings = get_configuration_warnings_as_dicts(); - if (p_property.is_empty()) { + Vector warnings; + if (GDVIRTUAL_CALL(_get_configuration_warnings, warnings)) { ret.append_array(warnings); - } else { - // Filter by property path. - for (int i = 0; i < warnings.size(); i++) { - Dictionary warning = warnings[i]; - String warning_property = warning.get("property", String()); - if (p_property == warning_property) { - ret.append(warning); - } - } } - return ret; -} - -PackedStringArray Node::get_configuration_warnings_as_strings(bool p_wrap_lines, const String &p_property) const { - Vector warnings = get_configuration_warnings_of_property(p_property); - const String bullet_point = U"• "; - PackedStringArray all_warnings; - for (const Dictionary &warning : warnings) { - if (!warning.has("message")) { - continue; - } - - // Prefix with property name if we are showing all warnings. - String text; - if (warning.has("property") && p_property.is_empty()) { - text = bullet_point + vformat("[%s] %s", warning["property"], warning["message"]); - } else { - text = bullet_point + static_cast(warning["message"]); - } - - if (p_wrap_lines) { - // Limit the line width while keeping some padding. - // It is not efficient, but it does not have to be. - const PackedInt32Array boundaries = TS->string_get_word_breaks(text, "", 80); - PackedStringArray lines; - for (int i = 0; i < boundaries.size(); i += 2) { - const int start = boundaries[i]; - const int end = boundaries[i + 1]; - String line = text.substr(start, end - start); - lines.append(line); - } - text = String("\n").join(lines); - } - text = text.replace("\n", "\n "); - all_warnings.append(text); - } - return all_warnings; + return ret; } void Node::update_configuration_warnings() { @@ -3774,16 +3699,6 @@ String Node::_get_name_num_separator() { return " "; } -StringName Node::get_configuration_warning_icon(int p_count) { - if (p_count == 1) { - return SNAME("NodeWarning"); - } else if (p_count <= 3) { - return vformat("NodeWarnings%d", p_count); - } else { - return SNAME("NodeWarnings4Plus"); - } -} - Node::Node() { orphan_node_count++; } diff --git a/scene/main/node.h b/scene/main/node.h index bbbdb87a328c3..b936cdd375b07 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -304,7 +304,6 @@ class Node : public Object { static void _bind_methods(); static String _get_name_num_separator(); - static StringName get_configuration_warning_icon(int p_count); friend class SceneState; @@ -331,7 +330,7 @@ class Node : public Object { GDVIRTUAL0(_enter_tree) GDVIRTUAL0(_exit_tree) GDVIRTUAL0(_ready) - GDVIRTUAL0RC(Array, _get_configuration_warnings) + GDVIRTUAL0RC(Vector, _get_configuration_warnings) GDVIRTUAL1(_input, Ref) GDVIRTUAL1(_shortcut_input, Ref) @@ -648,11 +647,7 @@ class Node : public Object { _FORCE_INLINE_ Viewport *get_viewport() const { return data.viewport; } - virtual Array get_configuration_warnings() const; - Dictionary configuration_warning_to_dict(const Variant &p_warning) const; - Vector get_configuration_warnings_as_dicts() const; - Vector get_configuration_warnings_of_property(const String &p_property = String()) const; - PackedStringArray get_configuration_warnings_as_strings(bool p_wrap_lines, const String &p_property = String()) const; + virtual PackedStringArray get_configuration_warnings() const; void update_configuration_warnings();