diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-06 11:54:34 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-06 12:53:35 +0300 |
commit | e858d21ae42386c57c7f5b4b0982642173f460e5 (patch) | |
tree | 90d36cb8f5bd0ba8be7414b5027553eeca115c77 /source/blender/makesdna/DNA_constraint_types.h | |
parent | a23ce7f3b78b28550c6e6cfd73404b82dc210529 (diff) |
Transformation Constraint: implement a Mix Mode option.
Allow selecting how the new location/rotation/scale is combined with
the existing transformation. This is most useful for rotation, which
has multiple options, and scale, which previously could only replace.
Diffstat (limited to 'source/blender/makesdna/DNA_constraint_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_constraint_types.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index d123cf21db9..83fc4d2a3f7 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -450,7 +450,12 @@ typedef struct bTransformConstraint { /** Output euler order override. */ char to_euler_order; - char _pad[6]; + /** Mixing modes for location, rotation, and scale. */ + char mix_mode_loc; + char mix_mode_rot; + char mix_mode_scale; + + char _pad[3]; /** From_min/max defines range of target transform. */ float from_min[3]; @@ -809,6 +814,34 @@ typedef enum eTransform_ToFrom { TRANS_SCALE = 2, } eTransform_ToFrom; +/* bTransformConstraint.mix_mode_loc */ +typedef enum eTransform_MixModeLoc { + /* Add component values together (default). */ + TRANS_MIXLOC_ADD = 0, + /* Replace component values. */ + TRANS_MIXLOC_REPLACE, +} eTransform_MixModeLoc; + +/* bTransformConstraint.mix_mode_rot */ +typedef enum eTransform_MixModeRot { + /* Add component values together (default). */ + TRANS_MIXROT_ADD = 0, + /* Replace component values. */ + TRANS_MIXROT_REPLACE, + /* Multiply the generated rotation on the left. */ + TRANS_MIXROT_BEFORE, + /* Multiply the generated rotation on the right. */ + TRANS_MIXROT_AFTER, +} eTransform_MixModeRot; + +/* bTransformConstraint.mix_mode_scale */ +typedef enum eTransform_MixModeScale { + /* Replace component values (default). */ + TRANS_MIXSCALE_REPLACE = 0, + /* Multiply component values together. */ + TRANS_MIXSCALE_MULTIPLY, +} eTransform_MixModeScale; + /* bSameVolumeConstraint.free_axis */ typedef enum eSameVolume_Axis { SAMEVOL_X = 0, |