diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-01-19 14:31:49 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-01-19 14:31:49 +0300 |
commit | 7759fc2983422ef234b1d9a2bcdbc4c7e6265071 (patch) | |
tree | 4b4fbac13821dc33cef421623db2ef45287f08af /source/blender/blenloader/intern/readfile.c | |
parent | ed578c27c821a146ca684137d5eb1ac986858599 (diff) |
Motion Paths - (Part 3) Operators, Drawing, and Fixes
This commit makes the new-style Motion Paths work for Objects and Bones. Motion Paths can either be added for Objects (Object buttons) or for Selected Bones in PoseMode (Armature Buttons), and/or removed from these panels too.
Changes:
* Changed the way the baking code worked, since it was better to be able to bake a bunch of objects at once, instead of doing it per object
* Fixed a variety of bugs regarding initialising defaults and reading old files
* Added operators for Objects (like for bones), and replaced the existing code for bones.
* Fixed bug with baking code that was causing it to bake the wrong ranges
Todos:
* Frame number drawing is currently messed up, since the "cached" text drawing takes into account the object transforms.
* The new MotionPath panels currently appear as the first panels in the respective contexts, probably due to the order in which the files are included. This needs some fixing, though not sure what the best way is yet.
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 8975dcd4c67..96b2b793267 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10381,9 +10381,16 @@ static void do_versions(FileData *fd, Library *lib, Main *main) avs->ghost_sf= arm->ghostsf; avs->ghost_ef= arm->ghostef; + if ((avs->ghost_sf == avs->ghost_ef) && (avs->ghost_sf == 0)) { + avs->ghost_sf= 1; + avs->ghost_ef= 100; + } /* type */ - avs->ghost_type= arm->ghosttype; + if (arm->ghostep == 0) + avs->ghost_type= GHOST_TYPE_NONE; + else + avs->ghost_type= arm->ghosttype + 1; /* stepsize */ avs->ghost_step= arm->ghostsize; @@ -10394,9 +10401,15 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* ranges */ avs->path_bc= arm->pathbc; avs->path_ac= arm->pathac; + if ((avs->path_bc == avs->path_ac) && (avs->path_bc == 0)) + avs->path_bc= avs->path_ac= 10; avs->path_sf= arm->pathsf; avs->path_ef= arm->pathef; + if ((avs->path_sf == avs->path_ef) && (avs->path_sf == 0)) { + avs->path_sf= 1; + avs->path_ef= 250; + } /* flags */ if (arm->pathflag & ARM_PATH_FNUMS) @@ -10419,6 +10432,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if (avs->path_step == 0) avs->path_step= 1; } + else + animviz_settings_init(&ob->pose->avs); } } |