Skip to content

Commit

Permalink
Merge pull request #68033 from MewPurPur/auto-light3d-warning-updates
Browse files Browse the repository at this point in the history
Show Light3D's scale warning immediately when a user edits the property.
  • Loading branch information
clayjohn authored May 2, 2023
2 parents 68724aa + 818d57b commit 2a0aef5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 21 deletions.
4 changes: 1 addition & 3 deletions scene/2d/physics_body_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,7 @@ void RigidBody2D::_notification(int p_what) {
} break;

case NOTIFICATION_LOCAL_TRANSFORM_CHANGED: {
if (Engine::get_singleton()->is_editor_hint()) {
update_configuration_warnings();
}
update_configuration_warnings();
} break;
}
#endif
Expand Down
6 changes: 1 addition & 5 deletions scene/3d/collision_object_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,9 @@ void CollisionObject3D::_notification(int p_what) {
_update_pickable();
} break;

#ifdef TOOLS_ENABLED
case NOTIFICATION_LOCAL_TRANSFORM_CHANGED: {
if (Engine::get_singleton()->is_editor_hint()) {
update_configuration_warnings();
}
update_configuration_warnings();
} break;
#endif

case NOTIFICATION_TRANSFORM_CHANGED: {
if (only_update_transform_changes) {
Expand Down
6 changes: 1 addition & 5 deletions scene/3d/collision_polygon_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ void CollisionPolygon3D::_notification(int p_what) {
if (parent) {
_update_in_shape_owner(true);
}
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
update_configuration_warnings();
}
#endif
update_configuration_warnings();
} break;

case NOTIFICATION_UNPARENTED: {
Expand Down
6 changes: 1 addition & 5 deletions scene/3d/collision_shape_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,7 @@ void CollisionShape3D::_notification(int p_what) {
if (parent) {
_update_in_shape_owner(true);
}
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
update_configuration_warnings();
}
#endif
update_configuration_warnings();
} break;

case NOTIFICATION_UNPARENTED: {
Expand Down
3 changes: 3 additions & 0 deletions scene/3d/light_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ void Light3D::_update_visibility() {

void Light3D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_TRANSFORM_CHANGED: {
update_configuration_warnings();
} break;
case NOTIFICATION_VISIBILITY_CHANGED:
case NOTIFICATION_ENTER_TREE: {
_update_visibility();
Expand Down
4 changes: 1 addition & 3 deletions scene/3d/physics_body_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,7 @@ void RigidBody3D::_notification(int p_what) {
} break;

case NOTIFICATION_LOCAL_TRANSFORM_CHANGED: {
if (Engine::get_singleton()->is_editor_hint()) {
update_configuration_warnings();
}
update_configuration_warnings();
} break;
}
#endif
Expand Down

0 comments on commit 2a0aef5

Please sign in to comment.