Blender
V5.0
source
blender
animrig
ANIM_armature_iter.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11
#pragma once
12
13
#ifndef __cplusplus
14
# error This is a C++ header.
15
#endif
16
17
#include "
DNA_armature_types.h
"
18
19
#include "
BLI_listbase_wrapper.hh
"
20
21
namespace
blender::animrig
{
30
template
<
typename
CB>
static
void
ANIM_armature_foreach_bone
(
ListBase
/*Bone*/
*bones,
CB
callback)
31
{
32
for
(
Bone
*bone :
blender::ListBaseWrapper<Bone>
(bones)) {
33
callback(bone);
34
ANIM_armature_foreach_bone
(&bone->childbase, callback);
35
}
36
}
37
46
template
<
typename
CB>
47
static
void
ANIM_armature_foreach_bone
(
const
ListBase
/*Bone*/
*bones,
CB
callback)
48
{
49
for
(
const
Bone
*bone :
blender::ConstListBaseWrapper<Bone>
(bones)) {
50
callback(bone);
51
ANIM_armature_foreach_bone
(&bone->childbase, callback);
52
}
53
}
54
55
};
// namespace blender::animrig
BLI_listbase_wrapper.hh
DNA_armature_types.h
CB
#define CB(a)
blender::animrig
Definition
ANIM_action.hh:36
blender::animrig::ANIM_armature_foreach_bone
static void ANIM_armature_foreach_bone(ListBase *bones, CB callback)
Definition
ANIM_armature_iter.hh:30
blender::ConstListBaseWrapper
ListBaseWrapperTemplate< const ListBase, const T > ConstListBaseWrapper
Definition
BLI_listbase_wrapper.hh:100
blender::ListBaseWrapper
ListBaseWrapperTemplate< ListBase, T > ListBaseWrapper
Definition
BLI_listbase_wrapper.hh:99
Bone
Definition
DNA_armature_types.h:67
ListBase
Definition
DNA_listBase.h:32
Generated on
for Blender by
doxygen
1.16.1