diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-09-21 16:49:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-09-21 16:57:08 +0300 |
commit | 84b074baedd9d472ff2f52759b15f119de4f69c2 (patch) | |
tree | 21b4b9c5f1dbb56c47a5cab796207526e2eaaee8 /source/blender/makesdna/DNA_action_types.h | |
parent | 0dbde559cfff511e75ab44e2c3d7efe8321dc309 (diff) |
Armature drawing: custom shape scale options
- Custom scale:
Avoids having multiple custom-shapes at different sizes.
- Option not to use bones length:
So changes in edit-mode don't resize the custom-shape.
Diffstat (limited to 'source/blender/makesdna/DNA_action_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_action_types.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index b8688e5e12a..d574694c70d 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -198,7 +198,8 @@ typedef struct bPoseChannel { short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */ char constflag; /* for quick detecting which constraints affect this channel */ char selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */ - char pad0[6]; + char drawflag; + char pad0[5]; struct Bone *bone; /* set on read file or rebuild pose */ struct bPoseChannel *parent; /* set on read file or rebuild pose */ @@ -212,6 +213,9 @@ typedef struct bPoseChannel { struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform. * needed in rare cases for advanced rigs, * since the alternative is highly complicated - campbell */ + float custom_scale; + + char pad1[4]; /* transforms - written in by actions or transform */ float loc[3]; @@ -306,6 +310,14 @@ typedef enum ePchan_IkFlag { BONE_IK_NO_ZDOF_TEMP = (1 << 12) } ePchan_IkFlag; +/* PoseChannel->drawflag */ +typedef enum ePchan_DrawFlag { + PCHAN_DRAW_NO_CUSTOM_BONE_SIZE = (1 << 0), +} ePchan_DrawFlag; + +#define PCHAN_CUSTOM_DRAW_SIZE(pchan) \ + (pchan)->custom_scale * (((pchan)->drawflag & PCHAN_DRAW_NO_CUSTOM_BONE_SIZE) ? 1.0f : (pchan)->bone->length) + /* PoseChannel->rotmode and Object->rotmode */ typedef enum eRotationModes { /* quaternion rotations (default, and for older Blender versions) */ |