Animation: make `FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN` C++ compatible

Add an explicit cast from `void *` to `bPoseChannel *` so that the macro
can be used in C++ code as well.
This commit is contained in:
Sybren A. Stüvel 2023-06-19 15:21:40 +02:00
parent 83990475a7
commit 8179a0da84
1 changed files with 3 additions and 1 deletions

View File

@ -559,7 +559,9 @@ void BKE_pchan_bbone_deform_segment_index(const struct bPoseChannel *pchan,
/* context.selected_pose_bones */
#define FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN(_ob, _pchan) \
for (bPoseChannel *_pchan = (_ob)->pose->chanbase.first; _pchan; _pchan = _pchan->next) { \
for (bPoseChannel *_pchan = (bPoseChannel *)(_ob)->pose->chanbase.first; _pchan; \
_pchan = _pchan->next) \
{ \
if (PBONE_VISIBLE(((bArmature *)(_ob)->data), (_pchan)->bone) && \
((_pchan)->bone->flag & BONE_SELECTED)) \
{