diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-03-23 16:54:41 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-03-29 16:01:45 +0300 |
commit | fa8269cc4ef546987f1cd068100027a2ccbdf31e (patch) | |
tree | bce5d3dcb21e40602309d172e9ee5f15ffad04fa /source/blender/blenkernel/BKE_armature.h | |
parent | 4d3a2ba6a91833c84f58ca8d44b6f0538c560902 (diff) |
Animation: add `PBONE_SELECTED` macro
Add `PBONE_SELECTED` macro to determine selection state of bones, while
also taking visibility into account.
Diffstat (limited to 'source/blender/blenkernel/BKE_armature.h')
-rw-r--r-- | source/blender/blenkernel/BKE_armature.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index a0ba1415b41..0bd817f0da1 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -342,6 +342,8 @@ void BKE_pchan_bbone_deform_segment_index(const struct bPoseChannel *pchan, #define PBONE_SELECTABLE(arm, bone) \ (PBONE_VISIBLE(arm, bone) && !((bone)->flag & BONE_UNSELECTABLE)) +#define PBONE_SELECTED(arm, bone) (((bone)->flag & BONE_SELECTED) & PBONE_VISIBLE(arm, bone)) + /* context.selected_pose_bones */ #define FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN(_ob, _pchan) \ for (bPoseChannel *_pchan = (_ob)->pose->chanbase.first; _pchan; _pchan = _pchan->next) { \ |