diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-07 11:27:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-07 11:27:09 +0400 |
commit | 1a9f930514719eee65609d7499bd184147580b55 (patch) | |
tree | 27cb3effcebd61ae3dc12fd7cdc16ab9d30dc803 /source/blender/blenkernel/BKE_armature.h | |
parent | 89a415a49d0e96bd6bf63b5e6e9d5bfe2f87bc49 (diff) |
add type checking for more error prone macros.
Diffstat (limited to 'source/blender/blenkernel/BKE_armature.h')
-rw-r--r-- | source/blender/blenkernel/BKE_armature.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index a3f3beefbaf..6b9de47836e 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -131,8 +131,14 @@ typedef struct Mat4 { Mat4 *b_bone_spline_setup(struct bPoseChannel *pchan, int rest); /* like EBONE_VISIBLE */ -#define PBONE_VISIBLE(arm, bone) (((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P)) -#define PBONE_SELECTABLE(arm, bone) (PBONE_VISIBLE(arm, bone) && !((bone)->flag & BONE_UNSELECTABLE)) +#define PBONE_VISIBLE(arm, bone) ( \ + CHECK_TYPE_INLINE(arm, bArmature), \ + CHECK_TYPE_INLINE(bone, Bone), \ + (((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P)) \ + ) + +#define PBONE_SELECTABLE(arm, bone) \ + (PBONE_VISIBLE(arm, bone) && !((bone)->flag & BONE_UNSELECTABLE)) #ifdef __cplusplus } |