2022-02-11 09:07:11 +11:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
* Copyright 2001-2002 NaN Holding BV. All rights reserved. */
|
2021-07-20 16:13:14 +02:00
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
|
* \ingroup bke
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "BKE_action.hh"
|
|
|
|
|
|
|
|
|
|
#include "BLI_listbase.h"
|
|
|
|
|
#include "BLI_string.h"
|
|
|
|
|
|
|
|
|
|
#include "DNA_action_types.h"
|
|
|
|
|
#include "DNA_anim_types.h"
|
2021-09-04 14:22:44 +10:00
|
|
|
#include "DNA_armature_types.h"
|
2021-07-20 16:13:14 +02:00
|
|
|
|
|
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
|
|
|
|
|
|
namespace blender::bke {
|
|
|
|
|
|
|
|
|
|
void BKE_action_find_fcurves_with_bones(const bAction *action, FoundFCurveCallback callback)
|
|
|
|
|
{
|
|
|
|
|
LISTBASE_FOREACH (FCurve *, fcu, &action->curves) {
|
2021-09-04 14:22:44 +10:00
|
|
|
char bone_name[MAXBONENAME];
|
|
|
|
|
if (!BLI_str_quoted_substr(fcu->rna_path, "pose.bones[", bone_name, sizeof(bone_name))) {
|
2021-07-20 16:13:14 +02:00
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
callback(fcu, bone_name);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace blender::bke
|