diff options
author | Yuki Shirakawa <shirakawa> | 2021-05-11 12:22:41 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-05-11 12:31:58 +0300 |
commit | fc5bf09fd88c331b568c5b485bb0e487179ecb44 (patch) | |
tree | 1fb6e32ec8ad3699dca241c9224b4fe69f67135c /source/blender/makesdna | |
parent | a02be602f9cb1e5c5e38de5b1553829b9aa58b56 (diff) |
Rigging: Add transform for custom bone shapes
Add translation/rotation/scale parameters for custom bones shapes. The
new scale is a 3D vector `custom_shape_scale_xyz`, and replaces the
`custom_shape_scale` float.
Reviewed By: #animation_rigging, sybren, zeddb
Differential Revision: https://developer.blender.org/D10974
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_action_types.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 5cc525a6cff..05d33f5b339 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -265,9 +265,10 @@ typedef struct bPoseChannel { * since the alternative is highly complicated - campbell */ struct bPoseChannel *custom_tx; - float custom_scale; - - char _pad1[4]; + float custom_scale; /* Deprecated */ + float custom_scale_xyz[3]; + float custom_translation[3]; + float custom_rotation_euler[3]; /** Transforms - written in by actions or transform. */ float loc[3]; @@ -417,9 +418,10 @@ 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) + +/* Note: It doesn't take custom_scale_xyz into account */ +#define PCHAN_CUSTOM_BONE_LENGTH(pchan) \ + (((pchan)->drawflag & PCHAN_DRAW_NO_CUSTOM_BONE_SIZE) ? 1.0f : (pchan)->bone->length) #ifdef DNA_DEPRECATED_ALLOW /* PoseChannel->bboneflag */ |