diff options
author | Juan Linietsky <reduzio@gmail.com> | 2021-02-10 20:06:14 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-10 20:06:14 -0300 |
commit | ad293a82f1fc2e4baa35f54b9b8038df72d23737 (patch) | |
tree | 7edbd352cf34d87b4d8e604c1730251c38131e19 /scene | |
parent | e8f73124a7d97abc94cea3cf7fe5b5614f61a448 (diff) | |
parent | 1aa2823fa32c7a4b41d806418ec99949fc44ffb3 (diff) |
Merge pull request #45879 from reduz/remove-change-notify
Removed _change_notify(property)
Diffstat (limited to 'scene')
78 files changed, 149 insertions, 353 deletions
diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp index 8a6bd5f6b6..f39850441b 100644 --- a/scene/2d/animated_sprite_2d.cpp +++ b/scene/2d/animated_sprite_2d.cpp @@ -409,7 +409,7 @@ void AnimatedSprite2D::_notification(int p_what) { } update(); - _change_notify("frame"); + emit_signal(SceneStringNames::get_singleton()->frame_changed); } @@ -477,7 +477,7 @@ void AnimatedSprite2D::set_sprite_frames(const Ref<SpriteFrames> &p_frames) { set_frame(frame); } - _change_notify(); + notify_property_list_changed(); _reset_timeout(); update(); update_configuration_warning(); @@ -510,7 +510,7 @@ void AnimatedSprite2D::set_frame(int p_frame) { frame = p_frame; _reset_timeout(); update(); - _change_notify("frame"); + emit_signal(SceneStringNames::get_singleton()->frame_changed); } @@ -546,7 +546,6 @@ void AnimatedSprite2D::set_offset(const Point2 &p_offset) { offset = p_offset; update(); item_rect_changed(); - _change_notify("offset"); } Point2 AnimatedSprite2D::get_offset() const { @@ -573,8 +572,7 @@ bool AnimatedSprite2D::is_flipped_v() const { void AnimatedSprite2D::_res_changed() { set_frame(frame); - _change_notify("frame"); - _change_notify("animation"); + update(); } @@ -642,7 +640,7 @@ void AnimatedSprite2D::set_animation(const StringName &p_animation) { animation = p_animation; _reset_timeout(); set_frame(0); - _change_notify(); + notify_property_list_changed(); update(); } diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index ae1c1e449a..4e7eec906c 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -249,15 +249,11 @@ void AudioStreamPlayer2D::_notification(int p_what) { setseek = setplay; active = true; setplay = -1; - //do not update, this makes it easier to animate (will shut off otherwise) - //_change_notify("playing"); //update property in editor } //stop playing if no longer active if (!active) { set_physics_process_internal(false); - //do not update, this makes it easier to animate (will shut off otherwise) - //_change_notify("playing"); //update property in editor emit_signal("finished"); } } @@ -404,7 +400,7 @@ void AudioStreamPlayer2D::_validate_property(PropertyInfo &property) const { } void AudioStreamPlayer2D::_bus_layout_changed() { - _change_notify(); + notify_property_list_changed(); } void AudioStreamPlayer2D::set_max_distance(float p_pixels) { diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 5e6a89fa18..0e51264171 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -410,7 +410,7 @@ bool CPUParticles2D::get_particle_flag(ParticleFlags p_particle_flag) const { void CPUParticles2D::set_emission_shape(EmissionShape p_shape) { ERR_FAIL_INDEX(p_shape, EMISSION_SHAPE_MAX); emission_shape = p_shape; - _change_notify(); + notify_property_list_changed(); } void CPUParticles2D::set_emission_sphere_radius(float p_radius) { @@ -599,7 +599,7 @@ void CPUParticles2D::_particles_process(float p_delta) { cycle++; if (one_shot && cycle > 0) { set_emitting(false); - _change_notify(); + notify_property_list_changed(); } } diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp index 2e477a88a9..af70c47f7c 100644 --- a/scene/2d/gpu_particles_2d.cpp +++ b/scene/2d/gpu_particles_2d.cpp @@ -101,7 +101,6 @@ void GPUParticles2D::set_visibility_rect(const Rect2 &p_visibility_rect) { RS::get_singleton()->particles_set_custom_aabb(particles, aabb); - _change_notify("visibility_rect"); update(); } @@ -305,7 +304,7 @@ void GPUParticles2D::_notification(int p_what) { if (p_what == NOTIFICATION_INTERNAL_PROCESS) { if (one_shot && !is_emitting()) { - _change_notify(); + notify_property_list_changed(); set_process_internal(false); } } diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index c000c8ea19..15fcb08422 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -377,7 +377,6 @@ void PointLight2D::set_texture_offset(const Vector2 &p_offset) { texture_offset = p_offset; RS::get_singleton()->canvas_light_set_texture_offset(_get_light(), texture_offset); item_rect_changed(); - _change_notify("offset"); } Vector2 PointLight2D::get_texture_offset() const { diff --git a/scene/2d/mesh_instance_2d.cpp b/scene/2d/mesh_instance_2d.cpp index 430e655fc6..b7a0028199 100644 --- a/scene/2d/mesh_instance_2d.cpp +++ b/scene/2d/mesh_instance_2d.cpp @@ -71,7 +71,6 @@ void MeshInstance2D::set_texture(const Ref<Texture2D> &p_texture) { texture = p_texture; update(); emit_signal("texture_changed"); - _change_notify("texture"); } void MeshInstance2D::set_normal_map(const Ref<Texture2D> &p_texture) { diff --git a/scene/2d/multimesh_instance_2d.cpp b/scene/2d/multimesh_instance_2d.cpp index 5164e5c7e9..72a899370e 100644 --- a/scene/2d/multimesh_instance_2d.cpp +++ b/scene/2d/multimesh_instance_2d.cpp @@ -71,7 +71,6 @@ void MultiMeshInstance2D::set_texture(const Ref<Texture2D> &p_texture) { texture = p_texture; update(); emit_signal("texture_changed"); - _change_notify("texture"); } Ref<Texture2D> MultiMeshInstance2D::get_texture() const { diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp index 7360fce330..b02cdf12ad 100644 --- a/scene/2d/navigation_region_2d.cpp +++ b/scene/2d/navigation_region_2d.cpp @@ -481,7 +481,6 @@ void NavigationRegion2D::set_navigation_polygon(const Ref<NavigationPolygon> &p_ } _navpoly_changed(); - _change_notify("navpoly"); update_configuration_warning(); } diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index 70a4e3f0fb..bf311632c8 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -53,12 +53,6 @@ void Node2D::_edit_set_state(const Dictionary &p_state) { skew = p_state["skew"]; _update_transform(); - _change_notify("rotation"); - _change_notify("rotation_degrees"); - _change_notify("scale"); - _change_notify("skew"); - _change_notify("skew_degrees"); - _change_notify("position"); } void Node2D::_edit_set_position(const Point2 &p_position) { @@ -80,8 +74,6 @@ Size2 Node2D::_edit_get_scale() const { void Node2D::_edit_set_rotation(float p_rotation) { angle = p_rotation; _update_transform(); - _change_notify("rotation"); - _change_notify("rotation_degrees"); } float Node2D::_edit_get_rotation() const { @@ -124,8 +116,6 @@ void Node2D::_edit_set_rect(const Rect2 &p_edit_rect) { _scale *= new_scale; _update_transform(); - _change_notify("scale"); - _change_notify("position"); } #endif @@ -156,7 +146,6 @@ void Node2D::set_position(const Point2 &p_pos) { } pos = p_pos; _update_transform(); - _change_notify("position"); } void Node2D::set_rotation(float p_radians) { @@ -165,8 +154,6 @@ void Node2D::set_rotation(float p_radians) { } angle = p_radians; _update_transform(); - _change_notify("rotation"); - _change_notify("rotation_degrees"); } void Node2D::set_skew(float p_radians) { @@ -175,8 +162,6 @@ void Node2D::set_skew(float p_radians) { } skew = p_radians; _update_transform(); - _change_notify("skew"); - _change_notify("skew_degrees"); } void Node2D::set_rotation_degrees(float p_degrees) { @@ -200,7 +185,6 @@ void Node2D::set_scale(const Size2 &p_scale) { _scale.y = CMP_EPSILON; } _update_transform(); - _change_notify("scale"); } Point2 Node2D::get_position() const { @@ -358,7 +342,6 @@ void Node2D::set_z_index(int p_z) { ERR_FAIL_COND(p_z > RS::CANVAS_ITEM_Z_MAX); z_index = p_z; RS::get_singleton()->canvas_item_set_z_index(get_canvas_item(), z_index); - _change_notify("z_index"); } void Node2D::set_z_as_relative(bool p_enabled) { diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 8c103a1239..724998641f 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -319,8 +319,6 @@ void PathFollow2D::set_offset(float p_offset) { _update_transform(); } - _change_notify("offset"); - _change_notify("unit_offset"); } void PathFollow2D::set_h_offset(float p_h_offset) { diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index ecb354ad15..ecc05fb931 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -483,7 +483,6 @@ void Polygon2D::set_offset(const Vector2 &p_offset) { offset = p_offset; rect_cache_dirty = true; update(); - _change_notify("offset"); } Vector2 Polygon2D::get_offset() const { diff --git a/scene/2d/sprite_2d.cpp b/scene/2d/sprite_2d.cpp index d1a3c01266..dde9790b44 100644 --- a/scene/2d/sprite_2d.cpp +++ b/scene/2d/sprite_2d.cpp @@ -155,7 +155,6 @@ void Sprite2D::set_texture(const Ref<Texture2D> &p_texture) { update(); emit_signal("texture_changed"); item_rect_changed(); - _change_notify("texture"); } Ref<Texture2D> Sprite2D::get_texture() const { @@ -176,7 +175,6 @@ void Sprite2D::set_offset(const Point2 &p_offset) { offset = p_offset; update(); item_rect_changed(); - _change_notify("offset"); } Point2 Sprite2D::get_offset() const { @@ -224,8 +222,6 @@ void Sprite2D::set_region_rect(const Rect2 &p_region_rect) { if (region) { item_rect_changed(); } - - _change_notify("region_rect"); } Rect2 Sprite2D::get_region_rect() const { @@ -250,8 +246,6 @@ void Sprite2D::set_frame(int p_frame) { frame = p_frame; - _change_notify("frame"); - _change_notify("frame_coords"); emit_signal(SceneStringNames::get_singleton()->frame_changed); } @@ -275,7 +269,7 @@ void Sprite2D::set_vframes(int p_amount) { vframes = p_amount; update(); item_rect_changed(); - _change_notify(); + notify_property_list_changed(); } int Sprite2D::get_vframes() const { @@ -287,7 +281,7 @@ void Sprite2D::set_hframes(int p_amount) { hframes = p_amount; update(); item_rect_changed(); - _change_notify(); + notify_property_list_changed(); } int Sprite2D::get_hframes() const { diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 33c238d455..d868ebae25 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -165,7 +165,6 @@ void TileMap::_update_quadrant_transform() { void TileMap::set_tileset(const Ref<TileSet> &p_tileset) { if (tile_set.is_valid()) { tile_set->disconnect("changed", callable_mp(this, &TileMap::_recreate_quadrants)); - tile_set->remove_change_receptor(this); } _clear_quadrants(); @@ -173,7 +172,6 @@ void TileMap::set_tileset(const Ref<TileSet> &p_tileset) { if (tile_set.is_valid()) { tile_set->connect("changed", callable_mp(this, &TileMap::_recreate_quadrants)); - tile_set->add_change_receptor(this); } else { clear(); } @@ -1330,7 +1328,7 @@ void TileMap::set_collision_use_parent(bool p_use_parent) { } _recreate_quadrants(); - _change_notify(); + notify_property_list_changed(); update_configuration_warning(); } @@ -1865,21 +1863,11 @@ void TileMap::_bind_methods() { BIND_ENUM_CONSTANT(TILE_ORIGIN_BOTTOM_LEFT); } -void TileMap::_changed_callback(Object *p_changed, const char *p_prop) { - if (tile_set.is_valid() && tile_set.ptr() == p_changed) { - emit_signal("settings_changed"); - } -} - TileMap::TileMap() { set_notify_transform(true); set_notify_local_transform(false); } TileMap::~TileMap() { - if (tile_set.is_valid()) { - tile_set->remove_change_receptor(this); - } - clear(); } diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index cfed4c0743..3bf4587921 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -232,7 +232,6 @@ protected: static void _bind_methods(); virtual void _validate_property(PropertyInfo &property) const override; - virtual void _changed_callback(Object *p_changed, const char *p_prop) override; public: enum { diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index 21a2561dd0..916038a1f3 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -89,8 +89,6 @@ void VisibilityNotifier2D::set_rect(const Rect2 &p_rect) { item_rect_changed(); } } - - _change_notify("rect"); } Rect2 VisibilityNotifier2D::get_rect() const { diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index fa8408ba5b..d420bd6075 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -605,15 +605,11 @@ void AudioStreamPlayer3D::_notification(int p_what) { setseek = setplay; active = true; setplay = -1; - //do not update, this makes it easier to animate (will shut off otherwise) - ///_change_notify("playing"); //update property in editor } //stop playing if no longer active if (!active) { set_physics_process_internal(false); - //do not update, this makes it easier to animate (will shut off otherwise) - //_change_notify("playing"); //update property in editor emit_signal("finished"); } } @@ -776,7 +772,7 @@ void AudioStreamPlayer3D::_validate_property(PropertyInfo &property) const { } void AudioStreamPlayer3D::_bus_layout_changed() { - _change_notify(); + notify_property_list_changed(); } void AudioStreamPlayer3D::set_max_distance(float p_metres) { @@ -809,7 +805,6 @@ void AudioStreamPlayer3D::set_emission_angle(float p_angle) { ERR_FAIL_COND(p_angle < 0 || p_angle > 90); emission_angle = p_angle; update_gizmo(); - _change_notify("emission_angle"); } float AudioStreamPlayer3D::get_emission_angle() const { diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 7c05878710..75907d4a84 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -1302,7 +1302,7 @@ bool BakedLightmap::is_interior() const { void BakedLightmap::set_environment_mode(EnvironmentMode p_mode) { environment_mode = p_mode; - _change_notify(); + notify_property_list_changed(); } BakedLightmap::EnvironmentMode BakedLightmap::get_environment_mode() const { diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp index fa9da6898c..e9e93884a5 100644 --- a/scene/3d/camera_3d.cpp +++ b/scene/3d/camera_3d.cpp @@ -209,7 +209,7 @@ void Camera3D::set_projection(Camera3D::Projection p_mode) { if (p_mode == PROJECTION_PERSPECTIVE || p_mode == PROJECTION_ORTHOGONAL || p_mode == PROJECTION_FRUSTUM) { mode = p_mode; _update_camera_mode(); - _change_notify(); + notify_property_list_changed(); } } @@ -432,7 +432,7 @@ void Camera3D::set_keep_aspect_mode(KeepAspect p_aspect) { keep_aspect = p_aspect; RenderingServer::get_singleton()->camera_set_use_vertical_aspect(camera, p_aspect == KEEP_WIDTH); _update_camera_mode(); - _change_notify(); + notify_property_list_changed(); } Camera3D::KeepAspect Camera3D::get_keep_aspect_mode() const { @@ -562,14 +562,12 @@ void Camera3D::set_fov(float p_fov) { ERR_FAIL_COND(p_fov < 1 || p_fov > 179); fov = p_fov; _update_camera_mode(); - _change_notify("fov"); } void Camera3D::set_size(float p_size) { ERR_FAIL_COND(p_size < 0.1 || p_size > 16384); size = p_size; _update_camera_mode(); - _change_notify("size"); } void Camera3D::set_near(float p_near) { diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index 3c37ee5e5e..7825119e6e 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -372,7 +372,7 @@ void CPUParticles3D::set_particle_flag(ParticleFlags p_particle_flag, bool p_ena ERR_FAIL_INDEX(p_particle_flag, PARTICLE_FLAG_MAX); particle_flags[p_particle_flag] = p_enable; if (p_particle_flag == PARTICLE_FLAG_DISABLE_Z) { - _change_notify(); + notify_property_list_changed(); } } @@ -575,7 +575,7 @@ void CPUParticles3D::_particles_process(float p_delta) { cycle++; if (one_shot && cycle > 0) { set_emitting(false); - _change_notify(); + notify_property_list_changed(); } } diff --git a/scene/3d/decal.cpp b/scene/3d/decal.cpp index 1cdea37dad..0f10f2b85f 100644 --- a/scene/3d/decal.cpp +++ b/scene/3d/decal.cpp @@ -34,7 +34,6 @@ void Decal::set_extents(const Vector3 &p_extents) { extents = p_extents; RS::get_singleton()->decal_set_extents(decal, p_extents); update_gizmo(); - _change_notify("extents"); } Vector3 Decal::get_extents() const { diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 9484099506..942996ca14 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -323,7 +323,6 @@ GIProbe::Subdiv GIProbe::get_subdiv() const { void GIProbe::set_extents(const Vector3 &p_extents) { extents = p_extents; update_gizmo(); - _change_notify("extents"); } Vector3 GIProbe::get_extents() const { @@ -486,7 +485,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) { bake_end_function(); } - _change_notify(); //bake property may have changed + notify_property_list_changed(); //bake property may have changed } void GIProbe::_debug_bake() { diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index 7d77578b01..17a61b3e4d 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -100,7 +100,6 @@ void GPUParticles3D::set_visibility_aabb(const AABB &p_aabb) { visibility_aabb = p_aabb; RS::get_singleton()->particles_set_custom_aabb(particles, visibility_aabb); update_gizmo(); - _change_notify("visibility_aabb"); } void GPUParticles3D::set_use_local_coordinates(bool p_enable) { @@ -190,7 +189,7 @@ void GPUParticles3D::set_draw_passes(int p_count) { ERR_FAIL_COND(p_count < 1); draw_passes.resize(p_count); RS::get_singleton()->particles_set_draw_passes(particles, p_count); - _change_notify(); + notify_property_list_changed(); } int GPUParticles3D::get_draw_passes() const { @@ -353,7 +352,7 @@ void GPUParticles3D::_notification(int p_what) { // the shot ends the editor can properly update if (p_what == NOTIFICATION_INTERNAL_PROCESS) { if (one_shot && !is_emitting()) { - _change_notify(); + notify_property_list_changed(); set_process_internal(false); } } diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index e6e23b927a..b0a10b5547 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -48,11 +48,7 @@ void Light3D::set_param(Param p_param, float p_value) { update_gizmo(); if (p_param == PARAM_SPOT_ANGLE) { - _change_notify("spot_angle"); update_configuration_warning(); - } else if (p_param == PARAM_RANGE) { - _change_notify("omni_range"); - _change_notify("spot_range"); } } } @@ -184,8 +180,6 @@ void Light3D::_update_visibility() { #endif RS::get_singleton()->instance_set_visible(get_instance(), is_visible_in_tree() && editor_ok); - - _change_notify("geometry/visible"); } void Light3D::_notification(int p_what) { diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp index 9029b5b028..775757dc9f 100644 --- a/scene/3d/mesh_instance_3d.cpp +++ b/scene/3d/mesh_instance_3d.cpp @@ -135,7 +135,7 @@ void MeshInstance3D::set_mesh(const Ref<Mesh> &p_mesh) { update_gizmo(); - _change_notify(); + notify_property_list_changed(); } Ref<Mesh> MeshInstance3D::get_mesh() const { @@ -152,7 +152,7 @@ void MeshInstance3D::_resolve_skeleton_path() { if (skin_internal.is_null()) { //a skin was created for us skin_internal = new_skin_reference->get_skin(); - _change_notify(); + notify_property_list_changed(); } } } diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index a9acaefc65..19bde94222 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -124,13 +124,13 @@ void NavigationRegion3D::set_navigation_mesh(const Ref<NavigationMesh> &p_navmes } if (navmesh.is_valid()) { - navmesh->remove_change_receptor(this); + navmesh->disconnect("changed", callable_mp(this, &NavigationRegion3D::_navigation_changed)); } navmesh = p_navmesh; if (navmesh.is_valid()) { - navmesh->add_change_receptor(this); + navmesh->connect("changed", callable_mp(this, &NavigationRegion3D::_navigation_changed)); } NavigationServer3D::get_singleton()->region_set_navmesh(region, p_navmesh); @@ -230,7 +230,7 @@ void NavigationRegion3D::_bind_methods() { ADD_SIGNAL(MethodInfo("bake_finished")); } -void NavigationRegion3D::_changed_callback(Object *p_changed, const char *p_prop) { +void NavigationRegion3D::_navigation_changed() { update_gizmo(); update_configuration_warning(); } @@ -242,7 +242,7 @@ NavigationRegion3D::NavigationRegion3D() { NavigationRegion3D::~NavigationRegion3D() { if (navmesh.is_valid()) { - navmesh->remove_change_receptor(this); + navmesh->disconnect("changed", callable_mp(this, &NavigationRegion3D::_navigation_changed)); } NavigationServer3D::get_singleton()->free(region); } diff --git a/scene/3d/navigation_region_3d.h b/scene/3d/navigation_region_3d.h index e966523b64..6ae15c9360 100644 --- a/scene/3d/navigation_region_3d.h +++ b/scene/3d/navigation_region_3d.h @@ -48,10 +48,11 @@ class NavigationRegion3D : public Node3D { Node *debug_view = nullptr; Thread bake_thread; + void _navigation_changed(); + protected: void _notification(int p_what); static void _bind_methods(); - void _changed_callback(Object *p_changed, const char *p_prop) override; public: void set_enabled(bool p_enabled); diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp index 57bead022b..3b1fb830e3 100644 --- a/scene/3d/node_3d.cpp +++ b/scene/3d/node_3d.cpp @@ -226,10 +226,6 @@ void Node3D::_notification(int p_what) { void Node3D::set_transform(const Transform &p_transform) { data.local_transform = p_transform; data.dirty |= DIRTY_VECTORS; - _change_notify("translation"); - _change_notify("rotation"); - _change_notify("rotation_degrees"); - _change_notify("scale"); _propagate_transform_changed(this); if (data.notify_local_transform) { notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED); @@ -307,7 +303,6 @@ Transform Node3D::get_relative_transform(const Node *p_parent) const { void Node3D::set_translation(const Vector3 &p_translation) { data.local_transform.origin = p_translation; - _change_notify("transform"); _propagate_transform_changed(this); if (data.notify_local_transform) { notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED); @@ -322,7 +317,6 @@ void Node3D::set_rotation(const Vector3 &p_euler_rad) { data.rotation = p_euler_rad; data.dirty |= DIRTY_LOCAL; - _change_notify("transform"); _propagate_transform_changed(this); if (data.notify_local_transform) { notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED); @@ -341,7 +335,6 @@ void Node3D::set_scale(const Vector3 &p_scale) { data.scale = p_scale; data.dirty |= DIRTY_LOCAL; - _change_notify("transform"); _propagate_transform_changed(this); if (data.notify_local_transform) { notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED); @@ -495,7 +488,6 @@ Ref<World3D> Node3D::get_world_3d() const { void Node3D::_propagate_visibility_changed() { notification(NOTIFICATION_VISIBILITY_CHANGED); emit_signal(SceneStringNames::get_singleton()->visibility_changed); - _change_notify("visible"); #ifdef TOOLS_ENABLED if (data.gizmo.is_valid()) { _update_gizmo(); diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp index 3f048beb71..7e2601902b 100644 --- a/scene/3d/path_3d.cpp +++ b/scene/3d/path_3d.cpp @@ -323,8 +323,6 @@ void PathFollow3D::set_offset(float p_offset) { _update_transform(); } - _change_notify("offset"); - _change_notify("unit_offset"); } void PathFollow3D::set_h_offset(float p_h_offset) { diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index 404799acb2..6d135c8283 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -2327,7 +2327,7 @@ void PhysicalBone3D::set_joint_type(JointType p_joint_type) { _reload_joint(); #ifdef TOOLS_ENABLED - _change_notify(); + notify_property_list_changed(); if (get_gizmo().is_valid()) { get_gizmo()->redraw(); } @@ -2342,7 +2342,6 @@ void PhysicalBone3D::set_joint_offset(const Transform &p_offset) { joint_offset = p_offset; _update_joint_offset(); - _change_notify("joint_rotation_degrees"); } const Transform &PhysicalBone3D::get_joint_offset() const { @@ -2353,7 +2352,6 @@ void PhysicalBone3D::set_joint_rotation(const Vector3 &p_euler_rad) { joint_offset.basis.set_euler_scale(p_euler_rad, joint_offset.basis.get_scale()); _update_joint_offset(); - _change_notify("joint_offset"); } Vector3 PhysicalBone3D::get_joint_rotation() const { diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp index 74f7fe2b52..ad24f39bce 100644 --- a/scene/3d/reflection_probe.cpp +++ b/scene/3d/reflection_probe.cpp @@ -42,7 +42,7 @@ float ReflectionProbe::get_intensity() const { void ReflectionProbe::set_ambient_mode(AmbientMode p_mode) { ambient_mode = p_mode; RS::get_singleton()->reflection_probe_set_ambient_mode(probe, RS::ReflectionProbeAmbientMode(p_mode)); - _change_notify(); + notify_property_list_changed(); } ReflectionProbe::AmbientMode ReflectionProbe::get_ambient_mode() const { @@ -95,13 +95,12 @@ void ReflectionProbe::set_extents(const Vector3 &p_extents) { if (extents[i] - 0.01 < ABS(origin_offset[i])) { origin_offset[i] = SGN(origin_offset[i]) * (extents[i] - 0.01); - _change_notify("origin_offset"); } } RS::get_singleton()->reflection_probe_set_extents(probe, extents); RS::get_singleton()->reflection_probe_set_origin_offset(probe, origin_offset); - _change_notify("extents"); + update_gizmo(); } @@ -120,7 +119,6 @@ void ReflectionProbe::set_origin_offset(const Vector3 &p_extents) { RS::get_singleton()->reflection_probe_set_extents(probe, extents); RS::get_singleton()->reflection_probe_set_origin_offset(probe, origin_offset); - _change_notify("origin_offset"); update_gizmo(); } diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp index 28207ab992..2d8f22ab37 100644 --- a/scene/3d/soft_body_3d.cpp +++ b/scene/3d/soft_body_3d.cpp @@ -245,13 +245,11 @@ bool SoftBody3D::_get_property_pinned_points(int p_item, const String &p_what, V return true; } -void SoftBody3D::_changed_callback(Object *p_changed, const char *p_prop) { +void SoftBody3D::_softbody_changed() { prepare_physics_server(); _reset_points_offsets(); #ifdef TOOLS_ENABLED - if (p_changed == this) { - update_configuration_warning(); - } + update_configuration_warning(); #endif } @@ -259,7 +257,9 @@ void SoftBody3D::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_WORLD: { if (Engine::get_singleton()->is_editor_hint()) { - add_change_receptor(this); + // I have no idea what this is supposed to do, it's really weird + // leaving for upcoming PK work on physics + //add_change_receptor(this); } RID space = get_world_3d()->get_space(); diff --git a/scene/3d/soft_body_3d.h b/scene/3d/soft_body_3d.h index 5e9170b76e..6e24a530bd 100644 --- a/scene/3d/soft_body_3d.h +++ b/scene/3d/soft_body_3d.h @@ -98,6 +98,8 @@ private: void _update_pickable(); + void _softbody_changed(); + protected: bool _set(const StringName &p_name, const Variant &p_value); bool _get(const StringName &p_name, Variant &r_ret) const; @@ -107,8 +109,6 @@ protected: bool _set_property_pinned_points_attachment(int p_item, const String &p_what, const Variant &p_value); bool _get_property_pinned_points(int p_item, const String &p_what, Variant &r_ret) const; - virtual void _changed_callback(Object *p_changed, const char *p_prop) override; - void _notification(int p_what); static void _bind_methods(); diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index f178daad42..c26224d0e3 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -543,8 +543,6 @@ void Sprite3D::set_frame(int p_frame) { _queue_update(); - _change_notify("frame"); - _change_notify("frame_coords"); emit_signal(SceneStringNames::get_singleton()->frame_changed); } @@ -567,7 +565,7 @@ void Sprite3D::set_vframes(int p_amount) { ERR_FAIL_COND(p_amount < 1); vframes = p_amount; _queue_update(); - _change_notify(); + notify_property_list_changed(); } int Sprite3D::get_vframes() const { @@ -578,7 +576,7 @@ void Sprite3D::set_hframes(int p_amount) { ERR_FAIL_COND(p_amount < 1); hframes = p_amount; _queue_update(); - _change_notify(); + notify_property_list_changed(); } int Sprite3D::get_hframes() const { @@ -895,7 +893,6 @@ void AnimatedSprite3D::_notification(int p_what) { } _queue_update(); - _change_notify("frame"); } float to_process = MIN(timeout, remaining); @@ -921,7 +918,7 @@ void AnimatedSprite3D::set_sprite_frames(const Ref<SpriteFrames> &p_frames) { set_frame(frame); } - _change_notify(); + notify_property_list_changed(); _reset_timeout(); _queue_update(); update_configuration_warning(); @@ -954,7 +951,7 @@ void AnimatedSprite3D::set_frame(int p_frame) { frame = p_frame; _reset_timeout(); _queue_update(); - _change_notify("frame"); + emit_signal(SceneStringNames::get_singleton()->frame_changed); } @@ -990,8 +987,6 @@ Rect2 AnimatedSprite3D::get_item_rect() const { void AnimatedSprite3D::_res_changed() { set_frame(frame); - _change_notify("frame"); - _change_notify("animation"); _queue_update(); } @@ -1048,7 +1043,7 @@ void AnimatedSprite3D::set_animation(const StringName &p_animation) { animation = p_animation; _reset_timeout(); set_frame(0); - _change_notify(); + notify_property_list_changed(); _queue_update(); } diff --git a/scene/3d/visibility_notifier_3d.cpp b/scene/3d/visibility_notifier_3d.cpp index 68a275684b..471838b9d1 100644 --- a/scene/3d/visibility_notifier_3d.cpp +++ b/scene/3d/visibility_notifier_3d.cpp @@ -69,7 +69,6 @@ void VisibilityNotifier3D::set_aabb(const AABB &p_aabb) { get_world_3d()->_update_notifier(this, get_global_transform().xform(aabb)); } - _change_notify("aabb"); update_gizmo(); } diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp index 61591cfd10..394c67e873 100644 --- a/scene/3d/visual_instance_3d.cpp +++ b/scene/3d/visual_instance_3d.cpp @@ -43,7 +43,6 @@ void VisualInstance3D::_update_visibility() { return; } - _change_notify("visible"); RS::get_singleton()->instance_set_visible(get_instance(), is_visible_in_tree()); } diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index 91b4ae6ab0..fb16f95379 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -34,7 +34,6 @@ void AnimationNodeAnimation::set_animation(const StringName &p_name) { animation = p_name; - _change_notify("animation"); } StringName AnimationNodeAnimation::get_animation() const { @@ -583,7 +582,6 @@ float AnimationNodeTimeSeek::process(float p_time, bool p_seek) { } else if (seek_pos >= 0) { float ret = blend_input(0, seek_pos, true, 1.0, FILTER_IGNORE, false); set_parameter(this->seek_pos, -1.0); //reset - _change_notify("seek_pos"); return ret; } else { return blend_input(0, p_time, false, 1.0, FILTER_IGNORE, false); diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 362296ef6a..c6fa55b76e 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -969,7 +969,7 @@ Error AnimationPlayer::add_animation(const StringName &p_name, const Ref<Animati } _ref_anim(p_animation); - _change_notify(); + notify_property_list_changed(); return OK; } @@ -981,7 +981,7 @@ void AnimationPlayer::remove_animation(const StringName &p_name) { animation_set.erase(p_name); clear_caches(); - _change_notify(); + notify_property_list_changed(); } void AnimationPlayer::_ref_anim(const Ref<Animation> &p_anim) { @@ -1039,7 +1039,7 @@ void AnimationPlayer::rename_animation(const StringName &p_name, const StringNam } clear_caches(); - _change_notify(); + notify_property_list_changed(); } bool AnimationPlayer::has_animation(const StringName &p_name) const { diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index 73217760ae..c0da35d803 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -1394,7 +1394,7 @@ void AnimationTree::_update_properties() { properties_dirty = false; - _change_notify(); + notify_property_list_changed(); } bool AnimationTree::_set(const StringName &p_name, const Variant &p_value) { @@ -1404,9 +1404,6 @@ bool AnimationTree::_set(const StringName &p_name, const Variant &p_value) { if (property_map.has(p_name)) { property_map[p_name] = p_value; -#ifdef TOOLS_ENABLED - _change_notify(p_name.operator String().utf8().get_data()); -#endif return true; } diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp index 70d00734f4..4f77734b79 100644 --- a/scene/audio/audio_stream_player.cpp +++ b/scene/audio/audio_stream_player.cpp @@ -344,7 +344,7 @@ void AudioStreamPlayer::_validate_property(PropertyInfo &property) const { } void AudioStreamPlayer::_bus_layout_changed() { - _change_notify(); + notify_property_list_changed(); } Ref<AudioStreamPlayback> AudioStreamPlayer::get_stream_playback() { diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index a7a7022b2e..db13b9b11f 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -199,7 +199,6 @@ void BaseButton::set_disabled(bool p_disabled) { status.pressing_inside = false; } update(); - _change_notify("disabled"); } bool BaseButton::is_disabled() const { @@ -213,7 +212,6 @@ void BaseButton::set_pressed(bool p_pressed) { if (status.pressed == p_pressed) { return; } - _change_notify("pressed"); status.pressed = p_pressed; if (p_pressed) { diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index e50b2d7cfe..37bb17b47d 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -338,7 +338,6 @@ void Button::set_text(const String &p_text) { _shape(); update(); - _change_notify("text"); minimum_size_changed(); } } @@ -399,7 +398,6 @@ void Button::set_icon(const Ref<Texture2D> &p_icon) { if (icon != p_icon) { icon = p_icon; update(); - _change_notify("icon"); minimum_size_changed(); } } @@ -424,7 +422,6 @@ void Button::set_flat(bool p_flat) { if (flat != p_flat) { flat = p_flat; update(); - _change_notify("flat"); } } @@ -474,7 +471,7 @@ bool Button::_set(const StringName &p_name, const Variant &p_value) { update(); } } - _change_notify(); + notify_property_list_changed(); return true; } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 6b5d8cb658..cf75365b44 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1275,7 +1275,6 @@ void Control::_size_changed() { } if (pos_changed || size_changed) { item_rect_changed(size_changed); - _change_notify_offsets(); _notify_transform(); } @@ -1315,10 +1314,6 @@ void Control::set_anchor(Side p_side, float p_anchor, bool p_keep_offset, bool p } update(); - _change_notify("anchor_left"); - _change_notify("anchor_right"); - _change_notify("anchor_top"); - _change_notify("anchor_bottom"); } void Control::_set_anchor(Side p_side, float p_anchor) { @@ -1592,16 +1587,6 @@ float Control::get_anchor(Side p_side) const { return data.anchor[p_side]; } -void Control::_change_notify_offsets() { - // this avoids sending the whole object data again on a change - _change_notify("offset_left"); - _change_notify("offset_top"); - _change_notify("offset_right"); - _change_notify("offset_bottom"); - _change_notify("rect_position"); - _change_notify("rect_size"); -} - void Control::set_offset(Side p_side, float p_value) { ERR_FAIL_INDEX((int)p_side, 4); @@ -1699,10 +1684,6 @@ void Control::_set_position(const Size2 &p_point) { void Control::set_position(const Size2 &p_point, bool p_keep_offsets) { if (p_keep_offsets) { _compute_anchors(Rect2(p_point, data.size_cache), data.offset, data.anchor); - _change_notify("anchor_left"); - _change_notify("anchor_right"); - _change_notify("anchor_top"); - _change_notify("anchor_bottom"); } else { _compute_offsets(Rect2(p_point, data.size_cache), data.anchor, data.offset); } @@ -1736,10 +1717,6 @@ void Control::set_size(const Size2 &p_size, bool p_keep_offsets) { if (p_keep_offsets) { _compute_anchors(Rect2(data.pos_cache, new_size), data.offset, data.anchor); - _change_notify("anchor_left"); - _change_notify("anchor_right"); - _change_notify("anchor_top"); - _change_notify("anchor_bottom"); } else { _compute_offsets(Rect2(data.pos_cache, new_size), data.anchor, data.offset); } @@ -2577,7 +2554,6 @@ void Control::set_rotation(float p_radians) { data.rotation = p_radians; update(); _notify_transform(); - _change_notify("rect_rotation"); } float Control::get_rotation() const { @@ -2602,7 +2578,6 @@ void Control::set_pivot_offset(const Vector2 &p_pivot) { data.pivot_offset = p_pivot; update(); _notify_transform(); - _change_notify("rect_pivot_offset"); } Vector2 Control::get_pivot_offset() const { diff --git a/scene/gui/control.h b/scene/gui/control.h index 9f5adf11e3..8b24781287 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -233,7 +233,6 @@ private: void _theme_changed(); - void _change_notify_offsets(); void _update_minimum_size(); void _update_scroll(); diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 0ed3118673..854225af39 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -51,7 +51,7 @@ bool GraphNode::_set(const StringName &p_name, const Variant &p_value) { update(); } } - _change_notify(); + notify_property_list_changed(); return true; } @@ -484,7 +484,6 @@ void GraphNode::set_title(const String &p_title) { _shape(); update(); - _change_notify("title"); minimum_size_changed(); } diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 540d238b74..453ecc802c 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -538,7 +538,6 @@ void Label::set_visible_characters(int p_amount) { if (get_total_character_count() > 0) { percent_visible = (float)p_amount / (float)get_total_character_count(); } - _change_notify("percent_visible"); update(); } @@ -555,7 +554,6 @@ void Label::set_percent_visible(float p_percent) { visible_chars = get_total_character_count() * p_percent; percent_visible = p_percent; } - _change_notify("visible_chars"); update(); } @@ -610,7 +608,7 @@ bool Label::_set(const StringName &p_name, const Variant &p_value) { update(); } } - _change_notify(); + notify_property_list_changed(); return true; } diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 087d33cd94..bbe09af3aa 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1958,7 +1958,6 @@ void LineEdit::_text_changed() { void LineEdit::_emit_text_change() { emit_signal("text_changed", text); - _change_notify("text"); text_changed_dirty = false; } @@ -2091,7 +2090,7 @@ bool LineEdit::_set(const StringName &p_name, const Variant &p_value) { update(); } } - _change_notify(); + notify_property_list_changed(); return true; } diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp index cbcea13897..c6706aba68 100644 --- a/scene/gui/link_button.cpp +++ b/scene/gui/link_button.cpp @@ -231,7 +231,7 @@ bool LinkButton::_set(const StringName &p_name, const Variant &p_value) { update(); } } - _change_notify(); + notify_property_list_changed(); return true; } diff --git a/scene/gui/nine_patch_rect.cpp b/scene/gui/nine_patch_rect.cpp index 64fff5c031..29a38ad5e3 100644 --- a/scene/gui/nine_patch_rect.cpp +++ b/scene/gui/nine_patch_rect.cpp @@ -98,7 +98,6 @@ void NinePatchRect::set_texture(const Ref<Texture2D> &p_tex) { */ minimum_size_changed(); emit_signal("texture_changed"); - _change_notify("texture"); } Ref<Texture2D> NinePatchRect::get_texture() const { @@ -110,20 +109,6 @@ void NinePatchRect::set_patch_margin(Side p_side, int p_size) { margin[p_side] = p_size; update(); minimum_size_changed(); - switch (p_side) { - case SIDE_LEFT: - _change_notify("patch_margin_left"); - break; - case SIDE_TOP: - _change_notify("patch_margin_top"); - break; - case SIDE_RIGHT: - _change_notify("patch_margin_right"); - break; - case SIDE_BOTTOM: - _change_notify("patch_margin_bottom"); - break; - } } int NinePatchRect::get_patch_margin(Side p_side) const { @@ -139,7 +124,6 @@ void NinePatchRect::set_region_rect(const Rect2 &p_region_rect) { region_rect = p_region_rect; item_rect_changed(); - _change_notify("region_rect"); } Rect2 NinePatchRect::get_region_rect() const { diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 86dc583f85..86b775e795 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -47,7 +47,6 @@ void Range::_value_changed_notify() { _value_changed(shared->val); emit_signal("value_changed", shared->val); update(); - _change_notify("value"); } void Range::Shared::emit_value_changed() { @@ -63,7 +62,6 @@ void Range::Shared::emit_value_changed() { void Range::_changed_notify(const char *p_what) { emit_signal("changed"); update(); - _change_notify(p_what); } void Range::Shared::emit_changed(const char *p_what) { diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 158f433967..f9f8f4f78a 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -3722,7 +3722,6 @@ void RichTextLabel::set_percent_visible(float p_percent) { } main->first_invalid_line = 0; //invalidate ALL _validate_line_caches(main); - _change_notify("visible_characters"); update(); } } @@ -3948,7 +3947,6 @@ void RichTextLabel::set_visible_characters(int p_visible) { percent_visible = (float)p_visible / (float)total_char_count; } } - _change_notify("percent_visible"); update(); } diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp index 1a7bd8304e..d43e195df1 100644 --- a/scene/gui/split_container.cpp +++ b/scene/gui/split_container.cpp @@ -102,7 +102,7 @@ void SplitContainer::_resort() { middle_sep += clamped_split_offset; if (should_clamp_split_offset) { split_offset = clamped_split_offset; - _change_notify("split_offset"); + should_clamp_split_offset = false; } } diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index 3377ac62e6..861f66628d 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -747,8 +747,6 @@ void TabContainer::set_current_tab(int p_current) { _repaint(); - _change_notify("current_tab"); - if (pending_previous == current) { emit_signal("tab_selected", current); } else { @@ -967,8 +965,6 @@ void TabContainer::set_tab_align(TabAlign p_align) { ERR_FAIL_INDEX(p_align, 3); align = p_align; update(); - - _change_notify("tab_align"); } TabContainer::TabAlign TabContainer::get_tab_align() const { diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index 2ad743e7b4..66f04e5569 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -481,7 +481,6 @@ void Tabs::set_current_tab(int p_current) { previous = current; current = p_current; - _change_notify("current_tab"); _update_cache(); update(); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 44c32d4e42..d31d00675e 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -6906,7 +6906,7 @@ bool TextEdit::_set(const StringName &p_name, const Variant &p_value) { update(); } } - _change_notify(); + notify_property_list_changed(); return true; } diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index efef49fbf0..90bc99a941 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -203,7 +203,7 @@ CanvasItemMaterial::LightMode CanvasItemMaterial::get_light_mode() const { void CanvasItemMaterial::set_particles_animation(bool p_particles_anim) { particles_animation = p_particles_anim; _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } bool CanvasItemMaterial::get_particles_animation() const { @@ -387,7 +387,6 @@ void CanvasItem::show() { } _propagate_visibility_changed(true); - _change_notify("visible"); } void CanvasItem::hide() { @@ -403,7 +402,6 @@ void CanvasItem::hide() { } _propagate_visibility_changed(false); - _change_notify("visible"); } CanvasItem *CanvasItem::current_item_drawn = nullptr; @@ -1035,7 +1033,7 @@ void CanvasItem::set_material(const Ref<Material> &p_material) { rid = material->get_rid(); } RS::get_singleton()->canvas_item_set_material(canvas_item, rid); - _change_notify(); //properties for material exposed + notify_property_list_changed(); //properties for material exposed } void CanvasItem::set_use_parent_material(bool p_use_parent_material) { @@ -1341,7 +1339,7 @@ void CanvasItem::set_texture_filter(TextureFilter p_texture_filter) { } texture_filter = p_texture_filter; _update_texture_filter_changed(true); - _change_notify(); + notify_property_list_changed(); } CanvasItem::TextureFilter CanvasItem::get_texture_filter() const { @@ -1381,7 +1379,7 @@ void CanvasItem::set_texture_repeat(TextureRepeat p_texture_repeat) { } texture_repeat = p_texture_repeat; _update_texture_repeat_changed(true); - _change_notify(); + notify_property_list_changed(); } void CanvasItem::set_clip_children(bool p_enabled) { diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 0c01516032..071a0eb40d 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -367,8 +367,6 @@ void Node::set_physics_process(bool p_process) { } else { remove_from_group("physics_process"); } - - _change_notify("physics_process"); } bool Node::is_physics_processing() const { @@ -387,8 +385,6 @@ void Node::set_physics_process_internal(bool p_process_internal) { } else { remove_from_group("physics_process_internal"); } - - _change_notify("physics_process_internal"); } bool Node::is_physics_processing_internal() const { @@ -863,8 +859,6 @@ void Node::set_process(bool p_process) { } else { remove_from_group("process"); } - - _change_notify("process"); } bool Node::is_processing() const { @@ -883,8 +877,6 @@ void Node::set_process_internal(bool p_process_internal) { } else { remove_from_group("process_internal"); } - - _change_notify("process_internal"); } bool Node::is_processing_internal() const { diff --git a/scene/resources/box_shape_3d.cpp b/scene/resources/box_shape_3d.cpp index fadbf21e43..6e7adc0bd7 100644 --- a/scene/resources/box_shape_3d.cpp +++ b/scene/resources/box_shape_3d.cpp @@ -60,7 +60,6 @@ void BoxShape3D::set_size(const Vector3 &p_size) { size = p_size; _update_shape(); notify_change_to_owners(); - _change_notify("size"); } Vector3 BoxShape3D::get_size() const { diff --git a/scene/resources/camera_effects.cpp b/scene/resources/camera_effects.cpp index 695b14939f..4038338e1e 100644 --- a/scene/resources/camera_effects.cpp +++ b/scene/resources/camera_effects.cpp @@ -41,7 +41,7 @@ RID CameraEffects::get_rid() const { void CameraEffects::set_dof_blur_far_enabled(bool p_enabled) { dof_blur_far_enabled = p_enabled; _update_dof_blur(); - _change_notify(); + notify_property_list_changed(); } bool CameraEffects::is_dof_blur_far_enabled() const { @@ -69,7 +69,7 @@ float CameraEffects::get_dof_blur_far_transition() const { void CameraEffects::set_dof_blur_near_enabled(bool p_enabled) { dof_blur_near_enabled = p_enabled; _update_dof_blur(); - _change_notify(); + notify_property_list_changed(); } bool CameraEffects::is_dof_blur_near_enabled() const { diff --git a/scene/resources/capsule_shape_3d.cpp b/scene/resources/capsule_shape_3d.cpp index 3f937cdc7a..226fe1ecd2 100644 --- a/scene/resources/capsule_shape_3d.cpp +++ b/scene/resources/capsule_shape_3d.cpp @@ -82,7 +82,6 @@ void CapsuleShape3D::set_radius(float p_radius) { radius = p_radius; _update_shape(); notify_change_to_owners(); - _change_notify("radius"); } float CapsuleShape3D::get_radius() const { @@ -93,7 +92,6 @@ void CapsuleShape3D::set_height(float p_height) { height = p_height; _update_shape(); notify_change_to_owners(); - _change_notify("height"); } float CapsuleShape3D::get_height() const { diff --git a/scene/resources/cylinder_shape_3d.cpp b/scene/resources/cylinder_shape_3d.cpp index bd256d4bef..63bdc8d26d 100644 --- a/scene/resources/cylinder_shape_3d.cpp +++ b/scene/resources/cylinder_shape_3d.cpp @@ -75,7 +75,6 @@ void CylinderShape3D::set_radius(float p_radius) { radius = p_radius; _update_shape(); notify_change_to_owners(); - _change_notify("radius"); } float CylinderShape3D::get_radius() const { @@ -86,7 +85,6 @@ void CylinderShape3D::set_height(float p_height) { height = p_height; _update_shape(); notify_change_to_owners(); - _change_notify("height"); } float CylinderShape3D::get_height() const { diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 3b7de49962..6f6af93848 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -44,7 +44,7 @@ RID Environment::get_rid() const { void Environment::set_background(BGMode p_bg) { bg_mode = p_bg; RS::get_singleton()->environment_set_background(environment, RS::EnvironmentBG(p_bg)); - _change_notify(); + notify_property_list_changed(); if (bg_mode != BG_SKY) { set_fog_aerial_perspective(0.0); } @@ -138,7 +138,7 @@ Color Environment::get_ambient_light_color() const { void Environment::set_ambient_source(AmbientSource p_source) { ambient_source = p_source; _update_ambient_light(); - _change_notify(); + notify_property_list_changed(); } Environment::AmbientSource Environment::get_ambient_source() const { @@ -166,7 +166,7 @@ float Environment::get_ambient_light_sky_contribution() const { void Environment::set_reflection_source(ReflectionSource p_source) { reflection_source = p_source; _update_ambient_light(); - _change_notify(); + notify_property_list_changed(); } Environment::ReflectionSource Environment::get_reflection_source() const { @@ -224,7 +224,7 @@ float Environment::get_tonemap_white() const { void Environment::set_tonemap_auto_exposure_enabled(bool p_enabled) { tonemap_auto_exposure_enabled = p_enabled; _update_tonemap(); - _change_notify(); + notify_property_list_changed(); } bool Environment::is_tonemap_auto_exposure_enabled() const { @@ -285,7 +285,7 @@ void Environment::_update_tonemap() { void Environment::set_ssr_enabled(bool p_enabled) { ssr_enabled = p_enabled; _update_ssr(); - _change_notify(); + notify_property_list_changed(); } bool Environment::is_ssr_enabled() const { @@ -343,7 +343,7 @@ void Environment::_update_ssr() { void Environment::set_ssao_enabled(bool p_enabled) { ssao_enabled = p_enabled; _update_ssao(); - _change_notify(); + notify_property_list_changed(); } bool Environment::is_ssao_enabled() const { @@ -458,8 +458,6 @@ Environment::SDFGICascades Environment::get_sdfgi_cascades() const { void Environment::set_sdfgi_min_cell_size(float p_size) { sdfgi_min_cell_size = p_size; - _change_notify("sdfgi_max_distance"); - _change_notify("sdfgi_cascade0_distance"); _update_sdfgi(); } @@ -475,8 +473,6 @@ void Environment::set_sdfgi_max_distance(float p_distance) { p_distance *= 0.5; //halve for each cascade } sdfgi_min_cell_size = p_distance; - _change_notify("sdfgi_min_cell_size"); - _change_notify("sdfgi_cascade0_distance"); _update_sdfgi(); } @@ -493,8 +489,6 @@ float Environment::get_sdfgi_max_distance() const { void Environment::set_sdfgi_cascade0_distance(float p_distance) { sdfgi_min_cell_size = p_distance / 64.0; - _change_notify("sdfgi_min_cell_size"); - _change_notify("sdfgi_max_distance"); _update_sdfgi(); } @@ -584,7 +578,7 @@ void Environment::_update_sdfgi() { void Environment::set_glow_enabled(bool p_enabled) { glow_enabled = p_enabled; _update_glow(); - _change_notify(); + notify_property_list_changed(); } bool Environment::is_glow_enabled() const { @@ -654,7 +648,7 @@ float Environment::get_glow_bloom() const { void Environment::set_glow_blend_mode(GlowBlendMode p_mode) { glow_blend_mode = p_mode; _update_glow(); - _change_notify(); + notify_property_list_changed(); } Environment::GlowBlendMode Environment::get_glow_blend_mode() const { @@ -722,7 +716,7 @@ void Environment::_update_glow() { void Environment::set_fog_enabled(bool p_enabled) { fog_enabled = p_enabled; _update_fog(); - _change_notify(); + notify_property_list_changed(); } bool Environment::is_fog_enabled() const { @@ -802,7 +796,7 @@ void Environment::_update_volumetric_fog() { void Environment::set_volumetric_fog_enabled(bool p_enable) { volumetric_fog_enabled = p_enable; _update_volumetric_fog(); - _change_notify(); + notify_property_list_changed(); } bool Environment::is_volumetric_fog_enabled() const { @@ -874,7 +868,7 @@ float Environment::get_volumetric_fog_temporal_reprojection_amount() const { void Environment::set_adjustment_enabled(bool p_enabled) { adjustment_enabled = p_enabled; _update_adjustment(); - _change_notify(); + notify_property_list_changed(); } bool Environment::is_adjustment_enabled() const { @@ -1427,7 +1421,7 @@ Environment::Environment() { _update_fog(); _update_adjustment(); _update_volumetric_fog(); - _change_notify(); + notify_property_list_changed(); } Environment::~Environment() { diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 1c06d7b519..3d610fd708 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -509,7 +509,7 @@ void Font::_data_changed() { cache_wrap.clear(); emit_changed(); - _change_notify(); + notify_property_list_changed(); } bool Font::_set(const StringName &p_name, const Variant &p_value) { @@ -600,7 +600,7 @@ void Font::add_data(const Ref<FontData> &p_data) { cache_wrap.clear(); emit_changed(); - _change_notify(); + notify_property_list_changed(); } void Font::set_data(int p_idx, const Ref<FontData> &p_data) { @@ -621,7 +621,7 @@ void Font::set_data(int p_idx, const Ref<FontData> &p_data) { cache_wrap.clear(); emit_changed(); - _change_notify(); + notify_property_list_changed(); } int Font::get_data_count() const { @@ -646,7 +646,7 @@ void Font::remove_data(int p_idx) { cache_wrap.clear(); emit_changed(); - _change_notify(); + notify_property_list_changed(); } Dictionary Font::get_feature_list() const { @@ -718,7 +718,7 @@ void Font::set_spacing(int p_type, int p_value) { } emit_changed(); - _change_notify(); + notify_property_list_changed(); } // Drawing string and string sizes, cached. diff --git a/scene/resources/height_map_shape_3d.cpp b/scene/resources/height_map_shape_3d.cpp index 33a581cc5e..5593bb766f 100644 --- a/scene/resources/height_map_shape_3d.cpp +++ b/scene/resources/height_map_shape_3d.cpp @@ -107,8 +107,6 @@ void HeightMapShape3D::set_map_width(int p_new) { _update_shape(); notify_change_to_owners(); - _change_notify("map_width"); - _change_notify("map_data"); } } @@ -133,8 +131,6 @@ void HeightMapShape3D::set_map_depth(int p_new) { _update_shape(); notify_change_to_owners(); - _change_notify("map_depth"); - _change_notify("map_data"); } } @@ -171,7 +167,6 @@ void HeightMapShape3D::set_map_data(PackedFloat32Array p_new) { _update_shape(); notify_change_to_owners(); - _change_notify("map_data"); } PackedFloat32Array HeightMapShape3D::get_map_data() const { diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index e043c4ad24..062d921855 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -192,7 +192,7 @@ Variant ShaderMaterial::property_get_revert(const String &p_name) { void ShaderMaterial::set_shader(const Ref<Shader> &p_shader) { // Only connect/disconnect the signal when running in the editor. - // This can be a slow operation, and `_change_notify()` (which is called by `_shader_changed()`) + // This can be a slow operation, and `notify_property_list_changed()` (which is called by `_shader_changed()`) // does nothing in non-editor builds anyway. See GH-34741 for details. if (shader.is_valid() && Engine::get_singleton()->is_editor_hint()) { shader->disconnect("changed", callable_mp(this, &ShaderMaterial::_shader_changed)); @@ -210,7 +210,7 @@ void ShaderMaterial::set_shader(const Ref<Shader> &p_shader) { } RS::get_singleton()->material_set_shader(_get_material(), rid); - _change_notify(); //properties for shader exposed + notify_property_list_changed(); //properties for shader exposed emit_changed(); } @@ -227,7 +227,7 @@ Variant ShaderMaterial::get_shader_param(const StringName &p_param) const { } void ShaderMaterial::_shader_changed() { - _change_notify(); //update all properties + notify_property_list_changed(); //update all properties } void ShaderMaterial::_bind_methods() { @@ -1489,7 +1489,7 @@ void BaseMaterial3D::set_transparency(Transparency p_transparency) { transparency = p_transparency; _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } BaseMaterial3D::Transparency BaseMaterial3D::get_transparency() const { @@ -1503,7 +1503,7 @@ void BaseMaterial3D::set_alpha_antialiasing(AlphaAntiAliasing p_alpha_aa) { alpha_antialiasing_mode = p_alpha_aa; _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } BaseMaterial3D::AlphaAntiAliasing BaseMaterial3D::get_alpha_antialiasing() const { @@ -1517,7 +1517,7 @@ void BaseMaterial3D::set_shading_mode(ShadingMode p_shading_mode) { shading_mode = p_shading_mode; _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } BaseMaterial3D::ShadingMode BaseMaterial3D::get_shading_mode() const { @@ -1585,7 +1585,7 @@ void BaseMaterial3D::set_flag(Flags p_flag, bool p_enabled) { flags[p_flag] = p_enabled; if (p_flag == FLAG_USE_SHADOW_TO_OPACITY || p_flag == FLAG_USE_TEXTURE_REPEAT || p_flag == FLAG_SUBSURFACE_MODE_SKIN) { - _change_notify(); + notify_property_list_changed(); } _queue_shader_change(); } @@ -1602,7 +1602,7 @@ void BaseMaterial3D::set_feature(Feature p_feature, bool p_enabled) { } features[p_feature] = p_enabled; - _change_notify(); + notify_property_list_changed(); _queue_shader_change(); } @@ -1620,7 +1620,7 @@ void BaseMaterial3D::set_texture(TextureParam p_param, const Ref<Texture2D> &p_t RS::get_singleton()->material_set_param(_get_material(), shader_names->albedo_texture_size, Vector2i(p_texture->get_width(), p_texture->get_height())); } - _change_notify(); + notify_property_list_changed(); _queue_shader_change(); } @@ -1860,7 +1860,7 @@ float BaseMaterial3D::get_uv2_triplanar_blend_sharpness() const { void BaseMaterial3D::set_billboard_mode(BillboardMode p_mode) { billboard_mode = p_mode; _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } BaseMaterial3D::BillboardMode BaseMaterial3D::get_billboard_mode() const { @@ -1897,7 +1897,7 @@ bool BaseMaterial3D::get_particles_anim_loop() const { void BaseMaterial3D::set_heightmap_deep_parallax(bool p_enable) { deep_parallax = p_enable; _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } bool BaseMaterial3D::is_heightmap_deep_parallax_enabled() const { @@ -1943,7 +1943,7 @@ bool BaseMaterial3D::get_heightmap_deep_parallax_flip_binormal() const { void BaseMaterial3D::set_grow_enabled(bool p_enable) { grow_enabled = p_enable; _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } bool BaseMaterial3D::is_grow_enabled() const { @@ -2093,7 +2093,7 @@ void BaseMaterial3D::set_on_top_of_alpha() { void BaseMaterial3D::set_proximity_fade(bool p_enable) { proximity_fade_enabled = p_enable; _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } bool BaseMaterial3D::is_proximity_fade_enabled() const { @@ -2112,7 +2112,7 @@ float BaseMaterial3D::get_proximity_fade_distance() const { void BaseMaterial3D::set_distance_fade(DistanceFadeMode p_mode) { distance_fade = p_mode; _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } BaseMaterial3D::DistanceFadeMode BaseMaterial3D::get_distance_fade() const { diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index fc23a8e65b..81dbb36288 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -1156,7 +1156,7 @@ void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const RenderingServer::get_singleton()->mesh_add_surface(mesh, sd); clear_cache(); - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -1278,7 +1278,6 @@ void ArrayMesh::surface_set_material(int p_idx, const Ref<Material> &p_material) surfaces.write[p_idx].material = p_material; RenderingServer::get_singleton()->mesh_surface_set_material(mesh, p_idx, p_material.is_null() ? RID() : p_material->get_rid()); - _change_notify("material"); emit_changed(); } @@ -1633,7 +1632,7 @@ void ArrayMesh::reload_from_file() { Resource::reload_from_file(); - _change_notify(); + notify_property_list_changed(); } ArrayMesh::ArrayMesh() { diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp index 96d3a5750e..84da0feab0 100644 --- a/scene/resources/mesh_library.cpp +++ b/scene/resources/mesh_library.cpp @@ -109,14 +109,14 @@ void MeshLibrary::create_item(int p_item) { ERR_FAIL_COND(p_item < 0); ERR_FAIL_COND(item_map.has(p_item)); item_map[p_item] = Item(); - _change_notify(); + notify_property_list_changed(); } void MeshLibrary::set_item_name(int p_item, const String &p_name) { ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'."); item_map[p_item].name = p_name; emit_changed(); - _change_notify(); + notify_property_list_changed(); } void MeshLibrary::set_item_mesh(int p_item, const Ref<Mesh> &p_mesh) { @@ -124,25 +124,25 @@ void MeshLibrary::set_item_mesh(int p_item, const Ref<Mesh> &p_mesh) { item_map[p_item].mesh = p_mesh; notify_change_to_owners(); emit_changed(); - _change_notify(); + notify_property_list_changed(); } void MeshLibrary::set_item_shapes(int p_item, const Vector<ShapeData> &p_shapes) { ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'."); item_map[p_item].shapes = p_shapes; - _change_notify(); + notify_property_list_changed(); notify_change_to_owners(); emit_changed(); - _change_notify(); + notify_property_list_changed(); } void MeshLibrary::set_item_navmesh(int p_item, const Ref<NavigationMesh> &p_navmesh) { ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'."); item_map[p_item].navmesh = p_navmesh; - _change_notify(); + notify_property_list_changed(); notify_change_to_owners(); emit_changed(); - _change_notify(); + notify_property_list_changed(); } void MeshLibrary::set_item_navmesh_transform(int p_item, const Transform &p_transform) { @@ -150,14 +150,14 @@ void MeshLibrary::set_item_navmesh_transform(int p_item, const Transform &p_tran item_map[p_item].navmesh_transform = p_transform; notify_change_to_owners(); emit_changed(); - _change_notify(); + notify_property_list_changed(); } void MeshLibrary::set_item_preview(int p_item, const Ref<Texture2D> &p_preview) { ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'."); item_map[p_item].preview = p_preview; emit_changed(); - _change_notify(); + notify_property_list_changed(); } String MeshLibrary::get_item_name(int p_item) const { @@ -198,14 +198,14 @@ void MeshLibrary::remove_item(int p_item) { ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'."); item_map.erase(p_item); notify_change_to_owners(); - _change_notify(); + notify_property_list_changed(); emit_changed(); } void MeshLibrary::clear() { item_map.clear(); notify_change_to_owners(); - _change_notify(); + notify_property_list_changed(); emit_changed(); } diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp index a7449fa74f..84f3c23f77 100644 --- a/scene/resources/navigation_mesh.cpp +++ b/scene/resources/navigation_mesh.cpp @@ -74,7 +74,7 @@ int NavigationMesh::get_sample_partition_type() const { void NavigationMesh::set_parsed_geometry_type(int p_value) { ERR_FAIL_COND(p_value >= PARSED_GEOMETRY_MAX); parsed_geometry_type = static_cast<ParsedGeometryType>(p_value); - _change_notify(); + notify_property_list_changed(); } int NavigationMesh::get_parsed_geometry_type() const { @@ -106,7 +106,7 @@ bool NavigationMesh::get_collision_mask_bit(int p_bit) const { void NavigationMesh::set_source_geometry_mode(int p_geometry_mode) { ERR_FAIL_INDEX(p_geometry_mode, SOURCE_GEOMETRY_MAX); source_geometry_mode = static_cast<SourceGeometryMode>(p_geometry_mode); - _change_notify(); + notify_property_list_changed(); } int NavigationMesh::get_source_geometry_mode() const { @@ -251,7 +251,7 @@ bool NavigationMesh::get_filter_walkable_low_height_spans() const { void NavigationMesh::set_vertices(const Vector<Vector3> &p_vertices) { vertices = p_vertices; - _change_notify(); + notify_property_list_changed(); } Vector<Vector3> NavigationMesh::get_vertices() const { @@ -263,7 +263,7 @@ void NavigationMesh::_set_polygons(const Array &p_array) { for (int i = 0; i < p_array.size(); i++) { polygons.write[i].indices = p_array[i]; } - _change_notify(); + notify_property_list_changed(); } Array NavigationMesh::_get_polygons() const { @@ -280,7 +280,7 @@ void NavigationMesh::add_polygon(const Vector<int> &p_polygon) { Polygon polygon; polygon.indices = p_polygon; polygons.push_back(polygon); - _change_notify(); + notify_property_list_changed(); } int NavigationMesh::get_polygon_count() const { diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp index 99d93c0e43..167540eb77 100644 --- a/scene/resources/particles_material.cpp +++ b/scene/resources/particles_material.cpp @@ -911,7 +911,7 @@ void ParticlesMaterial::set_color_ramp(const Ref<Texture2D> &p_texture) { color_ramp = p_texture; RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->color_ramp, p_texture); _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } Ref<Texture2D> ParticlesMaterial::get_color_ramp() const { @@ -923,7 +923,7 @@ void ParticlesMaterial::set_particle_flag(ParticleFlags p_particle_flag, bool p_ particle_flags[p_particle_flag] = p_enable; _queue_shader_change(); if (p_particle_flag == PARTICLE_FLAG_DISABLE_Z) { - _change_notify(); + notify_property_list_changed(); } } @@ -935,7 +935,7 @@ bool ParticlesMaterial::get_particle_flag(ParticleFlags p_particle_flag) const { void ParticlesMaterial::set_emission_shape(EmissionShape p_shape) { ERR_FAIL_INDEX(p_shape, EMISSION_SHAPE_MAX); emission_shape = p_shape; - _change_notify(); + notify_property_list_changed(); _queue_shader_change(); } @@ -1066,7 +1066,7 @@ void ParticlesMaterial::_validate_property(PropertyInfo &property) const { void ParticlesMaterial::set_sub_emitter_mode(SubEmitterMode p_sub_emitter_mode) { sub_emitter_mode = p_sub_emitter_mode; _queue_shader_change(); - _change_notify(); + notify_property_list_changed(); } ParticlesMaterial::SubEmitterMode ParticlesMaterial::get_sub_emitter_mode() const { diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp index 2701198b64..ba6c4591c9 100644 --- a/scene/resources/primitive_meshes.cpp +++ b/scene/resources/primitive_meshes.cpp @@ -214,7 +214,7 @@ void PrimitiveMesh::set_material(const Ref<Material> &p_material) { if (!pending_request) { // just apply it, else it'll happen when _update is called. RenderingServer::get_singleton()->mesh_surface_set_material(mesh, 0, material.is_null() ? RID() : material->get_rid()); - _change_notify(); + notify_property_list_changed(); emit_changed(); }; } diff --git a/scene/resources/ray_shape_3d.cpp b/scene/resources/ray_shape_3d.cpp index e0cecdfc92..5446b4daab 100644 --- a/scene/resources/ray_shape_3d.cpp +++ b/scene/resources/ray_shape_3d.cpp @@ -56,7 +56,6 @@ void RayShape3D::set_length(float p_length) { length = p_length; _update_shape(); notify_change_to_owners(); - _change_notify("length"); } float RayShape3D::get_length() const { @@ -67,7 +66,6 @@ void RayShape3D::set_slips_on_slope(bool p_active) { slips_on_slope = p_active; _update_shape(); notify_change_to_owners(); - _change_notify("slips_on_slope"); } bool RayShape3D::get_slips_on_slope() const { @@ -90,6 +88,4 @@ RayShape3D::RayShape3D() : /* Code copied from setters to prevent the use of uninitialized variables */ _update_shape(); notify_change_to_owners(); - _change_notify("length"); - _change_notify("slips_on_slope"); } diff --git a/scene/resources/skin.cpp b/scene/resources/skin.cpp index 95b63194ed..56c1dab4be 100644 --- a/scene/resources/skin.cpp +++ b/scene/resources/skin.cpp @@ -58,7 +58,7 @@ void Skin::set_bind_name(int p_index, const StringName &p_name) { binds_ptr[p_index].name = p_name; emit_changed(); if (notify_change) { - _change_notify(); + notify_property_list_changed(); } } diff --git a/scene/resources/sphere_shape_3d.cpp b/scene/resources/sphere_shape_3d.cpp index 008cb3e1d6..e4b4398063 100644 --- a/scene/resources/sphere_shape_3d.cpp +++ b/scene/resources/sphere_shape_3d.cpp @@ -66,7 +66,6 @@ void SphereShape3D::set_radius(float p_radius) { radius = p_radius; _update_shape(); notify_change_to_owners(); - _change_notify("radius"); } float SphereShape3D::get_radius() const { diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index d091af8ac9..8e47c1c15c 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -123,7 +123,6 @@ void StyleBoxTexture::set_texture(Ref<Texture2D> p_texture) { } emit_signal("texture_changed"); emit_changed(); - _change_notify("texture"); } Ref<Texture2D> StyleBoxTexture::get_texture() const { @@ -135,13 +134,6 @@ void StyleBoxTexture::set_margin_size(Side p_side, float p_size) { margin[p_side] = p_size; emit_changed(); - static const char *margin_prop[4] = { - "content_margin_left", - "content_margin_top", - "content_margin_right", - "content_margin_bottom", - }; - _change_notify(margin_prop[p_side]); } float StyleBoxTexture::get_margin_size(Side p_side) const { @@ -228,7 +220,6 @@ void StyleBoxTexture::set_region_rect(const Rect2 &p_region_rect) { region_rect = p_region_rect; emit_changed(); - _change_notify("region"); } Rect2 StyleBoxTexture::get_region_rect() const { diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 0d3fa09ba8..1ecc968176 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -94,7 +94,7 @@ void ImageTexture::reload_from_file() { create_from_image(img); } else { Resource::reload_from_file(); - _change_notify(); + notify_property_list_changed(); emit_changed(); } } @@ -146,7 +146,7 @@ void ImageTexture::_reload_hook(const RID &p_hook) { RID new_texture = RenderingServer::get_singleton()->texture_2d_create(img); RenderingServer::get_singleton()->texture_replace(texture, new_texture); - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -163,7 +163,7 @@ void ImageTexture::create_from_image(const Ref<Image> &p_image) { RID new_texture = RenderingServer::get_singleton()->texture_2d_create(p_image); RenderingServer::get_singleton()->texture_replace(texture, new_texture); } - _change_notify(); + notify_property_list_changed(); emit_changed(); image_stored = true; @@ -189,7 +189,7 @@ void ImageTexture::update(const Ref<Image> &p_image, bool p_immediate) { RenderingServer::get_singleton()->texture_2d_update(texture, p_image); } - _change_notify(); + notify_property_list_changed(); emit_changed(); alpha_cache.unref(); @@ -612,7 +612,7 @@ Error StreamTexture2D::load(const String &p_path) { } #endif - _change_notify(); + notify_property_list_changed(); emit_changed(); return OK; } @@ -959,7 +959,7 @@ Error StreamTexture3D::load(const String &p_path) { RenderingServer::get_singleton()->texture_set_path(texture, p_path); } - _change_notify(); + notify_property_list_changed(); emit_changed(); return OK; } @@ -1110,7 +1110,6 @@ void AtlasTexture::set_atlas(const Ref<Texture2D> &p_atlas) { } atlas = p_atlas; emit_changed(); - _change_notify("atlas"); } Ref<Texture2D> AtlasTexture::get_atlas() const { @@ -1123,7 +1122,6 @@ void AtlasTexture::set_region(const Rect2 &p_region) { } region = p_region; emit_changed(); - _change_notify("region"); } Rect2 AtlasTexture::get_region() const { @@ -1136,7 +1134,6 @@ void AtlasTexture::set_margin(const Rect2 &p_margin) { } margin = p_margin; emit_changed(); - _change_notify("margin"); } Rect2 AtlasTexture::get_margin() const { @@ -1146,7 +1143,6 @@ Rect2 AtlasTexture::get_margin() const { void AtlasTexture::set_filter_clip(const bool p_enable) { filter_clip = p_enable; emit_changed(); - _change_notify("filter_clip"); } bool AtlasTexture::has_filter_clip() const { @@ -1904,7 +1900,7 @@ void AnimatedTexture::_update_proxy() { } } time -= frame_limit; - _change_notify("current_frame"); + } else { break; } @@ -2355,7 +2351,7 @@ Error StreamTextureLayered::load(const String &p_path) { RenderingServer::get_singleton()->texture_set_path(texture, p_path); } - _change_notify(); + notify_property_list_changed(); emit_changed(); return OK; } @@ -2554,7 +2550,7 @@ Ref<Image> CameraTexture::get_data() const { void CameraTexture::set_camera_feed_id(int p_new_id) { camera_feed_id = p_new_id; - _change_notify(); + notify_property_list_changed(); } int CameraTexture::get_camera_feed_id() const { @@ -2563,7 +2559,7 @@ int CameraTexture::get_camera_feed_id() const { void CameraTexture::set_which_feed(CameraServer::FeedImage p_which) { which_feed = p_which; - _change_notify(); + notify_property_list_changed(); } CameraServer::FeedImage CameraTexture::get_which_feed() const { @@ -2574,7 +2570,7 @@ void CameraTexture::set_camera_active(bool p_active) { Ref<CameraFeed> feed = CameraServer::get_singleton()->get_feed_by_id(camera_feed_id); if (feed.is_valid()) { feed->set_active(p_active); - _change_notify(); + notify_property_list_changed(); } } diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index 5279f59d77..a6e261000f 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -358,7 +358,7 @@ void Theme::set_default_theme_font(const Ref<Font> &p_default_font) { default_theme_font->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(), CONNECT_REFERENCE_COUNTED); } - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -373,7 +373,7 @@ void Theme::set_default_theme_font_size(int p_font_size) { default_theme_font_size = p_font_size; - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -436,7 +436,7 @@ void Theme::set_icon(const StringName &p_name, const StringName &p_node_type, co } if (new_value) { - _change_notify(); + notify_property_list_changed(); emit_changed(); } } @@ -463,7 +463,7 @@ void Theme::clear_icon(const StringName &p_name, const StringName &p_node_type) icon_map[p_node_type].erase(p_name); - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -506,7 +506,7 @@ void Theme::set_stylebox(const StringName &p_name, const StringName &p_node_type } if (new_value) { - _change_notify(); + notify_property_list_changed(); } emit_changed(); } @@ -533,7 +533,7 @@ void Theme::clear_stylebox(const StringName &p_name, const StringName &p_node_ty style_map[p_node_type].erase(p_name); - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -576,7 +576,7 @@ void Theme::set_font(const StringName &p_name, const StringName &p_node_type, co } if (new_value) { - _change_notify(); + notify_property_list_changed(); emit_changed(); } } @@ -604,7 +604,7 @@ void Theme::clear_font(const StringName &p_name, const StringName &p_node_type) } font_map[p_node_type].erase(p_name); - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -637,7 +637,7 @@ void Theme::set_font_size(const StringName &p_name, const StringName &p_node_typ font_size_map[p_node_type][p_name] = p_font_size; if (new_value) { - _change_notify(); + notify_property_list_changed(); emit_changed(); } } @@ -661,7 +661,7 @@ void Theme::clear_font_size(const StringName &p_name, const StringName &p_node_t ERR_FAIL_COND(!font_size_map[p_node_type].has(p_name)); font_size_map[p_node_type].erase(p_name); - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -685,7 +685,7 @@ void Theme::set_color(const StringName &p_name, const StringName &p_node_type, c color_map[p_node_type][p_name] = p_color; if (new_value) { - _change_notify(); + notify_property_list_changed(); emit_changed(); } } @@ -707,7 +707,7 @@ void Theme::clear_color(const StringName &p_name, const StringName &p_node_type) ERR_FAIL_COND(!color_map[p_node_type].has(p_name)); color_map[p_node_type].erase(p_name); - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -739,7 +739,7 @@ void Theme::set_constant(const StringName &p_name, const StringName &p_node_type constant_map[p_node_type][p_name] = p_constant; if (new_value) { - _change_notify(); + notify_property_list_changed(); emit_changed(); } } @@ -761,7 +761,7 @@ void Theme::clear_constant(const StringName &p_name, const StringName &p_node_ty ERR_FAIL_COND(!constant_map[p_node_type].has(p_name)); constant_map[p_node_type].erase(p_name); - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -835,7 +835,7 @@ void Theme::clear() { color_map.clear(); constant_map.clear(); - _change_notify(); + notify_property_list_changed(); emit_changed(); } @@ -887,7 +887,7 @@ void Theme::copy_theme(const Ref<Theme> &p_other) { color_map = p_other->color_map; constant_map = p_other->constant_map; - _change_notify(); + notify_property_list_changed(); emit_changed(); } diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index ae536a2928..406137b387 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -369,14 +369,14 @@ void TileSet::create_tile(int p_id) { ERR_FAIL_COND(tile_map.has(p_id)); tile_map[p_id] = TileData(); tile_map[p_id].autotile_data = AutotileData(); - _change_notify(""); + notify_property_list_changed(); emit_changed(); } void TileSet::autotile_set_bitmask_mode(int p_id, BitmaskMode p_mode) { ERR_FAIL_COND(!tile_map.has(p_id)); tile_map[p_id].autotile_data.bitmask_mode = p_mode; - _change_notify(""); + notify_property_list_changed(); emit_changed(); } @@ -389,7 +389,6 @@ void TileSet::tile_set_texture(int p_id, const Ref<Texture2D> &p_texture) { ERR_FAIL_COND(!tile_map.has(p_id)); tile_map[p_id].texture = p_texture; emit_changed(); - _change_notify("texture"); } Ref<Texture2D> TileSet::tile_get_texture(int p_id) const { @@ -412,7 +411,6 @@ void TileSet::tile_set_modulate(int p_id, const Color &p_modulate) { ERR_FAIL_COND(!tile_map.has(p_id)); tile_map[p_id].modulate = p_modulate; emit_changed(); - _change_notify("modulate"); } Color TileSet::tile_get_modulate(int p_id) const { @@ -435,7 +433,6 @@ void TileSet::tile_set_region(int p_id, const Rect2 &p_region) { ERR_FAIL_COND(!tile_map.has(p_id)); tile_map[p_id].region = p_region; emit_changed(); - _change_notify("region"); } Rect2 TileSet::tile_get_region(int p_id) const { @@ -447,7 +444,6 @@ void TileSet::tile_set_tile_mode(int p_id, TileMode p_tile_mode) { ERR_FAIL_COND(!tile_map.has(p_id)); tile_map[p_id].tile_mode = p_tile_mode; emit_changed(); - _change_notify("tile_mode"); } TileSet::TileMode TileSet::tile_get_tile_mode(int p_id) const { @@ -669,7 +665,6 @@ void TileSet::tile_set_name(int p_id, const String &p_name) { ERR_FAIL_COND(!tile_map.has(p_id)); tile_map[p_id].name = p_name; emit_changed(); - _change_notify("name"); } String TileSet::tile_get_name(int p_id) const { @@ -1060,7 +1055,7 @@ bool TileSet::is_tile_bound(int p_drawn_id, int p_neighbor_id) { void TileSet::remove_tile(int p_id) { ERR_FAIL_COND(!tile_map.has(p_id)); tile_map.erase(p_id); - _change_notify(""); + notify_property_list_changed(); emit_changed(); } @@ -1083,7 +1078,7 @@ int TileSet::find_tile_by_name(const String &p_name) const { void TileSet::clear() { tile_map.clear(); - _change_notify(""); + notify_property_list_changed(); emit_changed(); } diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 72724d5ee1..73fd01fb00 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -730,7 +730,7 @@ void VisualShader::set_mode(Mode p_mode) { } _queue_update(); - _change_notify(); + notify_property_list_changed(); } void VisualShader::set_graph_offset(const Vector2 &p_offset) { diff --git a/scene/resources/world_margin_shape_3d.cpp b/scene/resources/world_margin_shape_3d.cpp index 79cbb3bbe0..28d50e1921 100644 --- a/scene/resources/world_margin_shape_3d.cpp +++ b/scene/resources/world_margin_shape_3d.cpp @@ -69,7 +69,6 @@ void WorldMarginShape3D::set_plane(Plane p_plane) { plane = p_plane; _update_shape(); notify_change_to_owners(); - _change_notify("plane"); } Plane WorldMarginShape3D::get_plane() const { |