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-01-25 07:02:31 +0300
committerJoshua Leung <aligorith@gmail.com>2009-01-25 07:02:31 +0300
commitde6d5b1540dd940482e8c514c4c04d59629eade7 (patch)
treebc27ed9c532460f295282d288d79542df160f151 /source/blender/blenkernel/intern/ipo.c
parent91644c424903bbf50a9a585a22a09f86cef2094e (diff)
Animato - Bugfixes + Nicer names in Action Editor
* Action Editor/Dopesheet now displays names retrieved from RNA in the form - "<Struct/OwnerName>.<PropertyName>.<ArrayIndex>" i.e. "HeadBone.Location.X" i.e. "Cube.Rotation.Y" i.e. "Material.Diffuse Color.G" For now, the first part of the name may be unclear as it is easy to confuse Material channels with Object ones if the material was called "Object1" or so (theoretrical example only). This will be explored further. * Also, fixed crashes when loading some old files with 'Object' Action Channels in their Actions
Diffstat (limited to 'source/blender/blenkernel/intern/ipo.c')
-rw-r--r--source/blender/blenkernel/intern/ipo.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 315fb8777eb..f397ae3a551 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -733,11 +733,13 @@ static FCurve *icu_to_fcu (IpoCurve *icu, char *actname, char *constname)
dst->ipo= icu->ipo;
/* correct values for object rotation curves - they were degrees/10 */
- // XXX for now, just make them into degrees
+ // 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)) {
- dst->vec[0][0] *= 10.0f;
- dst->vec[1][0] *= 10.0f;
- dst->vec[2][0] *= 10.0f;
+ const float fac= M_PI / 180.0f; //10.0f * M_PI/180.0f;
+
+ dst->vec[0][0] *= fac;
+ dst->vec[1][0] *= fac;
+ dst->vec[2][0] *= fac;
}
}
@@ -827,9 +829,10 @@ static void ipo_to_animdata (ID *id, Ipo *ipo, char *actname, char *constname)
* F-Curves for bones). This may be added later... for now let's just dump without them...
*/
if (actname) {
+ printf("actname != 0 \n");
if ((GS(id->name) == ID_OB) && (strcmp(actname, "Object") == 0))
actname= NULL;
- if ((GS(id->name) == ID_OB) && (strcmp(actname, "Shape") == 0))
+ else if ((GS(id->name) == ID_OB) && (strcmp(actname, "Shape") == 0))
actname= NULL;
}