Fix #129530: ANIM: FPS drop due to invalid RNA paths

The playback FPS drop was caused by a debug `printf()` call. Its' been
replaced with a call to `CLOG_INFO()` with a log level of `4`, so that it's
available when necessary but no longer eats up performance due to the I/O.

Pull Request: https://projects.blender.org/blender/blender/pulls/129685
This commit is contained in:
Sybren A. Stüvel
2024-11-01 16:31:22 +01:00
parent 16b7e5c7dd
commit bb0be5e4dc

View File

@@ -11,8 +11,12 @@
#include "BLI_map.hh"
#include "CLG_log.h"
#include "evaluation_internal.hh"
static CLG_LogRef LOG = {"animrig.evaluation"};
namespace blender::animrig {
using namespace internal;
@@ -153,10 +157,14 @@ static EvaluationResult evaluate_keyframe_data(PointerRNA &animated_id_ptr,
if (!BKE_animsys_rna_path_resolve(
&animated_id_ptr, fcu->rna_path, fcu->array_index, &anim_rna))
{
printf("Cannot resolve RNA path %s[%d] on ID %s\n",
fcu->rna_path,
fcu->array_index,
animated_id_ptr.owner_id->name);
/* Log this at quite a high level, because it can get _very_ noisy when playing back
* animation. */
CLOG_INFO(&LOG,
4,
"Cannot resolve RNA path %s[%d] on ID %s\n",
fcu->rna_path,
fcu->array_index,
animated_id_ptr.owner_id->name);
continue;
}