diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-01-08 01:54:05 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-01-08 01:54:05 +0300 |
commit | f3a6474537155e60f5db2a101b5ba11e20860307 (patch) | |
tree | e86f41c6d1e353fa9c08a32d8d1cf0deba7561ad /source/blender/blenloader | |
parent | 79bb5419cc4f7bd372e3c611f8b4e2741bb7dc51 (diff) |
Animation Visualisation Cleanups - Part 2:
* Finished baking code for motion paths, generalising it so that it works for both Objects and Bones.
It is based on the old code for baking bones, although I have modified the updating code to use a more 'correct' method of updating dependencies. However, this may turn out to be too slow, and another API method should be added for that...
* Moved some of the old version-patching code for animviz settings out of the drawing functions, instead doing this on the version patching proper.
* Added RNA support for the new AnimViz types, and included RNA access via their users too. The old settings have still been left in for now, since there are still some things not ready to use yet.
----
* F-Curve's with sample points (i.e. sounds to F-Curves) now perform linear interpolation between sample points instead of using constant interpolation.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 6b4e0bef9bd..7b30ba603ac 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10339,33 +10339,37 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* initialise object defaults */ animviz_settings_init(&ob->avs); - /* if armature, copy settings for pose from armature data */ + /* if armature, copy settings for pose from armature data + * performing initialisation where appropriate + */ if (ob->pose && ob->data) { bArmature *arm= newlibadr(fd, lib, ob->data); if(arm) { /* XXX - why does this fail in some cases? */ bAnimVizSettings *avs= &ob->pose->avs; - + /* ghosting settings ---------------- */ /* ranges */ avs->ghost_bc= avs->ghost_ac= arm->ghostep; - + avs->ghost_sf= arm->ghostsf; avs->ghost_ef= arm->ghostef; - + /* type */ avs->ghost_type= arm->ghosttype; - + /* stepsize */ avs->ghost_step= arm->ghostsize; - + if (avs->ghost_step == 0) + avs->ghost_step= 1; + /* path settings --------------------- */ /* ranges */ avs->path_bc= arm->pathbc; avs->path_ac= arm->pathac; - + avs->path_sf= arm->pathsf; avs->path_ef= arm->pathef; - + /* flags */ if (arm->pathflag & ARM_PATH_FNUMS) avs->path_viewflag |= MOTIONPATH_VIEW_FNUMS; @@ -10373,17 +10377,19 @@ static void do_versions(FileData *fd, Library *lib, Main *main) avs->path_viewflag |= MOTIONPATH_VIEW_KFRAS; if (arm->pathflag & ARM_PATH_KFNOS) avs->path_viewflag |= MOTIONPATH_VIEW_KFNOS; - + /* bake flags */ if (arm->pathflag & ARM_PATH_HEADS) avs->path_bakeflag |= MOTIONPATH_BAKE_HEADS; - + /* type */ if (arm->pathflag & ARM_PATH_ACFRA) avs->path_type = MOTIONPATH_TYPE_ACFRA; - + /* stepsize */ avs->path_step= arm->pathsize; + if (avs->path_step == 0) + avs->path_step= 1; } } } |