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