Merge pull request #60759 from lawnjelly/fti_warnings_nodepath

This commit is contained in:
Rémi Verschelde 2022-05-04 20:37:16 +02:00 committed by GitHub
commit 912e22821d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View File

@ -360,7 +360,7 @@ void RasterizerStorage::multimesh_instance_set_transform(RID p_multimesh, int p_
static int32_t warn_count = 0;
warn_count++;
if (((warn_count % 2048) == 0) && GLOBAL_GET("debug/settings/physics_interpolation/enable_warnings")) {
WARN_PRINT("Interpolated MultiMesh transform should usually be set during physics process (possibly benign).");
WARN_PRINT("[Physics interpolation] MultiMesh interpolation is being triggered from outside physics process, this might lead to issues (possibly benign).");
}
}
#endif
@ -517,7 +517,7 @@ void RasterizerStorage::multimesh_set_as_bulk_array_interpolated(RID p_multimesh
static int32_t warn_count = 0;
warn_count++;
if (((warn_count % 2048) == 0) && GLOBAL_GET("debug/settings/physics_interpolation/enable_warnings")) {
WARN_PRINT("Interpolated MultiMesh transform should usually be set during physics process (possibly benign).");
WARN_PRINT("[Physics interpolation] MultiMesh interpolation is being triggered from outside physics process, this might lead to issues (possibly benign).");
}
}
#endif
@ -535,7 +535,7 @@ void RasterizerStorage::multimesh_set_as_bulk_array(RID p_multimesh, const PoolV
static int32_t warn_count = 0;
warn_count++;
if (((warn_count % 2048) == 0) && GLOBAL_GET("debug/settings/physics_interpolation/enable_warnings")) {
WARN_PRINT("Interpolated MultiMesh transform should usually be set during physics process (possibly benign).");
WARN_PRINT("[Physics interpolation] MultiMesh interpolation is being triggered from outside physics process, this might lead to issues (possibly benign).");
}
}
#endif

View File

@ -118,7 +118,7 @@ void VisualServerScene::camera_set_transform(RID p_camera, const Transform &p_tr
// Effectively a WARN_PRINT_ONCE but after a certain number of occurrences.
static int32_t warn_count = -256;
if ((warn_count == 0) && GLOBAL_GET("debug/settings/physics_interpolation/enable_warnings")) {
WARN_PRINT("Interpolated Camera transform should usually be set during physics process (possibly benign).");
WARN_PRINT("[Physics interpolation] Camera interpolation is being triggered from outside physics process, this might lead to issues (possibly benign).");
}
warn_count++;
}
@ -128,7 +128,7 @@ void VisualServerScene::camera_set_transform(RID p_camera, const Transform &p_tr
if (Engine::get_singleton()->is_in_physics_frame()) {
static int32_t warn_count = -256;
if ((warn_count == 0) && GLOBAL_GET("debug/settings/physics_interpolation/enable_warnings")) {
WARN_PRINT("Non-interpolated Camera transform should not usually be set during physics process (possibly benign).");
WARN_PRINT("[Physics interpolation] Non-interpolated Camera is being triggered from physics process, this might lead to issues (possibly benign).");
}
warn_count++;
}
@ -842,15 +842,15 @@ void VisualServerScene::instance_set_transform(RID p_instance, const Transform &
if (id != 0) {
if (ObjectDB::get_instance(id)) {
Node *node = Object::cast_to<Node>(ObjectDB::get_instance(id));
if (node) {
node_name = "\"" + node->get_name() + "\"";
if (node && node->is_inside_tree()) {
node_name = "\"" + String(node->get_path()) + "\"";
} else {
node_name = "\"unknown\"";
}
}
}
WARN_PRINT("Non-interpolated Instance " + node_name + " transform should usually not be set during physics process (possibly benign).");
WARN_PRINT("[Physics interpolation] Non-interpolated Instance is being triggered from physics process, this might lead to issues: " + node_name + " (possibly benign).");
}
}
#endif
@ -919,15 +919,15 @@ void VisualServerScene::instance_set_transform(RID p_instance, const Transform &
if (id != 0) {
if (ObjectDB::get_instance(id)) {
Node *node = Object::cast_to<Node>(ObjectDB::get_instance(id));
if (node) {
node_name = "\"" + node->get_name() + "\"";
if (node && node->is_inside_tree()) {
node_name = "\"" + String(node->get_path()) + "\"";
} else {
node_name = "\"unknown\"";
}
}
}
WARN_PRINT("Interpolated Instance " + node_name + " transform should usually be set during physics process (possibly benign).");
WARN_PRINT("[Physics interpolation] Instance interpolation is being triggered from outside physics process, this might lead to issues: " + node_name + " (possibly benign).");
}
}
#endif