diff options
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 16 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 16 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 2 |
3 files changed, 31 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 911d258cd6b..4369c6dad2f 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7171,9 +7171,13 @@ static void direct_link_mask(FileData *fd, Mask *mask) MaskSpline *spline; MaskLayerShape *masklay_shape; + /* can't use newdataadr since it's a pointer within an array */ + MaskSplinePoint *act_point_search = NULL; + link_list(fd, &masklay->splines); for (spline = masklay->splines.first; spline; spline = spline->next) { + MaskSplinePoint *points_old = spline->points; int i; spline->points = newdataadr(fd, spline->points); @@ -7184,6 +7188,14 @@ static void direct_link_mask(FileData *fd, Mask *mask) if (point->tot_uw) point->uw = newdataadr(fd, point->uw); } + + /* detect active point */ + if ((act_point_search == NULL) && + (masklay->act_point >= points_old) && + (masklay->act_point < points_old + spline->tot_point)) + { + act_point_search = &spline->points[masklay->act_point - points_old]; + } } link_list(fd, &masklay->splines_shapes); @@ -7201,7 +7213,7 @@ static void direct_link_mask(FileData *fd, Mask *mask) } masklay->act_spline = newdataadr(fd, masklay->act_spline); - masklay->act_point = newdataadr(fd, masklay->act_point); + masklay->act_point = act_point_search; } } @@ -7926,7 +7938,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init see do_versions_userdef() above! */ - /* don't forget to set version number in BKE_blender.h! */ + /* don't forget to set version number in BKE_blender_version.h! */ } #if 0 // XXX: disabled for now... we still don't have this in the right place in the loading code for it to work diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 11c3049db92..b18b2b9fb5f 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1002,5 +1002,21 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } + for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { + Sequence *seq; + + SEQ_BEGIN (scene->ed, seq) + { + if (seq->type == SEQ_TYPE_TEXT) { + TextVars *data = seq->effectdata; + if (data->color[3] == 0.0f) { + copy_v4_fl(data->color, 1.0f); + data->shadow_color[3] = 1.0f; + } + } + } + SEQ_END + } + } } diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index d19ed0ad278..de709538e42 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -144,7 +144,7 @@ #include "BLI_mempool.h" #include "BKE_action.h" -#include "BKE_blender.h" +#include "BKE_blender_version.h" #include "BKE_bpath.h" #include "BKE_curve.h" #include "BKE_constraint.h" |