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-02-02 14:51:10 +0300
committerJoshua Leung <aligorith@gmail.com>2009-02-02 14:51:10 +0300
commitc67952a4757c2ec0c29de3f0cd4e8ca445f3ce1b (patch)
treeb67d84962d35d8ee59bbeab6fecfbef6890438e5 /source/blender/blenkernel
parent9c2e4571ccffcaf1c1e1db94a79636a933e89086 (diff)
Animato RNA wrapping:
It's about time that the RNA wrapping for various parts of the animation system were cleaned up for my recent changes. I've moved some code around (and/or deleted a file or two) in the process.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c4
-rw-r--r--source/blender/blenkernel/intern/ipo.c17
2 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index d02797ba345..fa3bb335c4f 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -448,7 +448,7 @@ static void nlatrack_ctime_get_strip (ListBase *list, NlaTrack *nlt, short index
/* allocate new eval-strip for this strip + add to stack */
- nes= MEM_callocN(sizeof(NlaEvalStrip), "bNlaEvalStrip");
+ nes= MEM_callocN(sizeof(NlaEvalStrip), "NlaEvalStrip");
nes->track= nlt;
nes->strip= astrip;
@@ -473,7 +473,7 @@ static void nlastrip_ctime_evaluate (ListBase *channels, NlaEvalStrip *nes, floa
/* write the accumulated settings to */
static void nladata_flush_channels (PointerRNA *ptr, ListBase *channels)
{
-
+
}
/* ---------------------- */
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 6d3632d1975..20bed37e4bc 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -287,14 +287,13 @@ static char *pchan_adrcodes_to_paths (int adrcode, int *array_index)
case AC_QUAT_Z:
*array_index= 3; return "rotation";
-#if 0 // XXX these were not 'official' channels (i.e. not in bf-releases)... these will need separate wrapping to work...
case AC_EUL_X:
- *array_index= 0; return "rotation";
+ *array_index= 0; return "euler_rotation";
case AC_EUL_Y:
- *array_index= 1; return "rotation";
+ *array_index= 1; return "euler_rotation";
case AC_EUL_Z:
- *array_index= 2; return "rotation";
-#endif
+ *array_index= 2; return "euler_rotation";
+
case -1: // XXX special case for rotation drivers... until eulers are added...
*array_index= 0; return "rotation";
@@ -937,7 +936,7 @@ static void icu_to_fcurves (ListBase *list, IpoCurve *icu, char *actname, char *
fcurve= fcu;
/* set path */
- fcurve->rna_path= MEM_dupallocN(abp->path);
+ fcurve->rna_path= adrcode_bitmap_path_copy(abp->path);
fcurve->array_index= abp->array_index;
/* convert keyframes
@@ -1010,9 +1009,11 @@ static void icu_to_fcurves (ListBase *list, IpoCurve *icu, char *actname, char *
if (icu->ipo != IPO_MIXED)
dst->ipo= icu->ipo;
- /* correct values for object rotation curves - they were degrees/10 */
+ /* correct values for euler rotation curves - they were degrees/10 */
// XXX for now, just make them into radians as RNA sets/reads directly in that form
- if ((icu->blocktype == ID_OB) && ELEM3(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) {
+ if ( ((icu->blocktype == ID_OB) && ELEM3(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) ||
+ ((icu->blocktype == ID_PO) && ELEM3(icu->adrcode, AC_EUL_X, AC_EUL_Y, AC_EUL_Z)) )
+ {
const float fac= (float)M_PI / 18.0f; //10.0f * M_PI/180.0f;
dst->vec[0][1] *= fac;