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:
Diffstat (limited to 'source/blender/makesdna/DNA_anim_types.h')
-rw-r--r--source/blender/makesdna/DNA_anim_types.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index 1718aabc51d..70add4c156f 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -319,6 +319,10 @@ typedef struct DriverTarget {
/** Transform channel index (for DVAR_TYPE_TRANSFORM_CHAN.)*/
short transChan;
+ /** Rotation channel calculation type. */
+ char rotation_mode;
+ char _pad[7];
+
/**
* Flags for the validity of the target
* (NOTE: these get reset every time the types change).
@@ -358,10 +362,36 @@ typedef enum eDriverTarget_TransformChannels {
DTAR_TRANSCHAN_SCALEY,
DTAR_TRANSCHAN_SCALEZ,
DTAR_TRANSCHAN_SCALE_AVG,
+ DTAR_TRANSCHAN_ROTW,
MAX_DTAR_TRANSCHAN_TYPES,
} eDriverTarget_TransformChannels;
+/* Rotation channel mode for Driver Targets */
+typedef enum eDriverTarget_RotationMode {
+ /** Automatic euler mode. */
+ DTAR_ROTMODE_AUTO = 0,
+
+ /** Explicit euler rotation modes - must sync with BLI_math_rotation.h defines. */
+ DTAR_ROTMODE_EULER_XYZ = 1,
+ DTAR_ROTMODE_EULER_XZY,
+ DTAR_ROTMODE_EULER_YXZ,
+ DTAR_ROTMODE_EULER_YZX,
+ DTAR_ROTMODE_EULER_ZXY,
+ DTAR_ROTMODE_EULER_ZYX,
+
+ DTAR_ROTMODE_QUATERNION,
+
+ /** Implements the very common Damped Track + child trick to decompose
+ * rotation into bending followed by twist around the remaining axis. */
+ DTAR_ROTMODE_SWING_TWIST_X,
+ DTAR_ROTMODE_SWING_TWIST_Y,
+ DTAR_ROTMODE_SWING_TWIST_Z,
+
+ DTAR_ROTMODE_EULER_MIN = DTAR_ROTMODE_EULER_XYZ,
+ DTAR_ROTMODE_EULER_MAX = DTAR_ROTMODE_EULER_ZYX,
+} eDriverTarget_RotationMode;
+
/* --- */
/* maximum number of driver targets per variable */