Blender
V5.3
source
blender
blenkernel
BKE_pose.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2026 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
BLI_array.hh
"
8
#include "
BLI_assert.hh
"
9
#include "
BLI_map.hh
"
10
#include "
BLI_string_ref.hh
"
11
12
#include <concepts>
13
#include <type_traits>
14
20
21
namespace
blender
{
22
struct
bArmature
;
23
struct
Bone
;
24
struct
bPoseChannel
;
25
}
// namespace blender
26
27
namespace
blender::bke
{
28
30
struct
bPoseRuntime
{
36
Map<StringRef, bPoseChannel *>
chanhash
;
37
42
Array<bPoseChannel *>
chan_array
;
43
45
void
*
ikdata
=
nullptr
;
46
};
47
60
template
<
typename
PoseChannelT,
typename
BoneT>
struct
PChanBoneT
{
61
PoseChannelT *
pchan
;
62
BoneT *
bone
;
63
64
PChanBoneT
(PoseChannelT *
pchan
, BoneT *
bone
) :
pchan
(
pchan
),
bone
(
bone
)
65
{
66
BLI_assert_msg
((
pchan
==
nullptr
) == (
bone
==
nullptr
),
67
"either both pointers should be nil, or none of them should be"
);
68
}
69
75
PChanBoneT
() :
pchan
(
nullptr
),
bone
(
nullptr
) {}
76
77
/* Implicit conversion from the non-const variant to the const variant.
78
* Enabled only when that direction actually adds const, so the reverse
79
* (const -> non-const) remains forbidden. */
80
template
<
typename
OtherPChan,
typename
OtherBone>
81
requires
std::convertible_to<OtherPChan *, PoseChannelT *> &&
82
std::convertible_to<OtherBone *, BoneT *>
83
PChanBoneT
(
const
PChanBoneT<OtherPChan, OtherBone>
&other) :
pchan
(other.
pchan
),
bone
(other.
bone
)
84
{
85
}
86
};
87
88
using
PChanBone
=
PChanBoneT<bPoseChannel, Bone>
;
89
using
PChanBoneConst
=
PChanBoneT<const bPoseChannel, const Bone>
;
90
91
}
// namespace blender::bke
BLI_array.hh
BLI_assert.hh
BLI_map.hh
BLI_string_ref.hh
BLI_assert_msg
#define BLI_assert_msg(a, msg)
blender::Array
Definition
BLI_array.hh:50
blender::Map
Definition
BLI_map.hh:129
blender::bke
Definition
AS_asset_library.hh:32
blender::bke::PChanBone
PChanBoneT< bPoseChannel, Bone > PChanBone
Definition
BKE_pose.hh:88
blender::bke::PChanBoneConst
PChanBoneT< const bPoseChannel, const Bone > PChanBoneConst
Definition
BKE_pose.hh:89
blender
BMesh Iterators.
Definition
ANIM_action.hh:30
blender::nullptr
return nullptr
Definition
bmesh_operator_api_inline.hh:212
blender::Bone
Definition
DNA_armature_types.h:302
blender::bArmature
Definition
DNA_armature_types.h:403
blender::bPoseChannel
Definition
DNA_action_types.h:732
blender::bke::PChanBoneT
Definition
BKE_pose.hh:60
blender::bke::PChanBoneT::PChanBoneT
PChanBoneT(const PChanBoneT< OtherPChan, OtherBone > &other)
Definition
BKE_pose.hh:83
blender::bke::PChanBoneT< bPoseChannel, Bone >::pchan
bPoseChannel * pchan
Definition
BKE_pose.hh:61
blender::bke::PChanBoneT::PChanBoneT
PChanBoneT(PoseChannelT *pchan, BoneT *bone)
Definition
BKE_pose.hh:64
blender::bke::PChanBoneT< bPoseChannel, Bone >::bone
Bone * bone
Definition
BKE_pose.hh:62
blender::bke::PChanBoneT::PChanBoneT
PChanBoneT()
Definition
BKE_pose.hh:75
blender::bke::bPoseRuntime
Definition
BKE_pose.hh:30
blender::bke::bPoseRuntime::chanhash
Map< StringRef, bPoseChannel * > chanhash
Definition
BKE_pose.hh:36
blender::bke::bPoseRuntime::ikdata
void * ikdata
Definition
BKE_pose.hh:45
blender::bke::bPoseRuntime::chan_array
Array< bPoseChannel * > chan_array
Definition
BKE_pose.hh:42
Generated on
for Blender by
doxygen
1.18.0