Blender V4.3
action_bones.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include "BKE_action.hh"
10
11#include "BLI_listbase.h"
12#include "BLI_string.h"
13
14#include "DNA_action_types.h"
15#include "DNA_anim_types.h"
16#include "DNA_armature_types.h"
17
18#include "MEM_guardedalloc.h"
19
20namespace blender::bke {
21
23{
24 LISTBASE_FOREACH (FCurve *, fcu, &action->curves) {
25 char bone_name[MAXBONENAME];
26 if (!BLI_str_quoted_substr(fcu->rna_path, "pose.bones[", bone_name, sizeof(bone_name))) {
27 continue;
28 }
29 callback(fcu, bone_name);
30 }
31}
32
33} // namespace blender::bke
Blender kernel action and pose functionality.
#define LISTBASE_FOREACH(type, var, list)
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxncpy)
Definition string.c:517
#define MAXBONENAME
Read Guarded memory(de)allocation.
DEGForeachIDComponentCallback callback
void BKE_action_find_fcurves_with_bones(const bAction *action, FoundFCurveCallback callback)
ListBase curves