Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-09-06 11:54:34 +0300
committerYimingWu <xp8110@outlook.com>2019-09-12 04:13:02 +0300
commit93f940db2565ad5aa60cd4166dcd5f8e0f25b1b7 (patch)
tree755984af23955b82b0058a37e6e98c8d547e8a6a /source/blender/makesdna
parentcdf5891cca9ceb3eb70fe21dea495276da94c4b8 (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')
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h35
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,