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:
authorJoshua Leung <aligorith@gmail.com>2009-09-28 14:19:20 +0400
committerJoshua Leung <aligorith@gmail.com>2009-09-28 14:19:20 +0400
commit7d2fd5449e21b533f9aeb6f5f79af5e2396a8063 (patch)
treed146b4680f3123a112238bffb875fd632b1e4931 /source/blender/blenkernel/intern/ipo.c
parent981afef08e051d00e955526c1c79b8dd01d4bdd5 (diff)
Durian Feature Request: Rotation Modes for Objects
This (biggish) commit generalises the rotation modes functionality added for Bones, allowing Objects to use the various Euler Rotation orders, Axis-Angle, and Quaternion rotation representations. I've also cleaned up the nomenclature of the rotation-related settings so that the naming styles are more consistent with each other. Unfortunately, this will break all files involving object or bone rotation animation made in 2.5 versions (2.4x will still get correctly converted). General Notes: * By default, Objects still default to using Eulers, while Bones will use Quaternions by default still. * I've fixed all areas that I'm currently aware of to work with these changes. However, there are probably a few places where I've missed a few changes (i.e. auto-keyframing will need attention later). * Removed the old "IPO-Keys" stuff from Transform code. I'm unlikely to restore this in the near future, and trying to fix that to include support for this commit would have been too much work.
Diffstat (limited to 'source/blender/blenkernel/intern/ipo.c')
-rw-r--r--source/blender/blenkernel/intern/ipo.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index dd7904b4782..811a2658ae3 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -213,17 +213,17 @@ static char *ob_adrcodes_to_paths (int adrcode, int *array_index)
*array_index= 2; return "delta_location";
case OB_ROT_X:
- *array_index= 0; return "rotation";
+ *array_index= 0; return "rotation_euler";
case OB_ROT_Y:
- *array_index= 1; return "rotation";
+ *array_index= 1; return "rotation_euler";
case OB_ROT_Z:
- *array_index= 2; return "rotation";
+ *array_index= 2; return "rotation_euler";
case OB_DROT_X:
- *array_index= 0; return "delta_rotation";
+ *array_index= 0; return "delta_rotation_euler";
case OB_DROT_Y:
- *array_index= 1; return "delta_rotation";
+ *array_index= 1; return "delta_rotation_euler";
case OB_DROT_Z:
- *array_index= 2; return "delta_rotation";
+ *array_index= 2; return "delta_rotation_euler";
case OB_SIZE_X:
*array_index= 0; return "scale";
@@ -281,23 +281,23 @@ static char *pchan_adrcodes_to_paths (int adrcode, int *array_index)
/* result depends on adrcode */
switch (adrcode) {
case AC_QUAT_W:
- *array_index= 0; return "rotation";
+ *array_index= 0; return "rotation_quaternion";
case AC_QUAT_X:
- *array_index= 1; return "rotation";
+ *array_index= 1; return "rotation_quaternion";
case AC_QUAT_Y:
- *array_index= 2; return "rotation";
+ *array_index= 2; return "rotation_quaternion";
case AC_QUAT_Z:
- *array_index= 3; return "rotation";
+ *array_index= 3; return "rotation_quaternion";
case AC_EUL_X:
- *array_index= 0; return "euler_rotation";
+ *array_index= 0; return "rotation_euler";
case AC_EUL_Y:
- *array_index= 1; return "euler_rotation";
+ *array_index= 1; return "rotation_euler";
case AC_EUL_Z:
- *array_index= 2; return "euler_rotation";
+ *array_index= 2; return "rotation_euler";
case -1: /* special case for euler-rotations used by old drivers */
- *array_index= 0; return "euler_rotation";
+ *array_index= 0; return "rotation_euler";
case AC_LOC_X:
*array_index= 0; return "location";