diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-01-12 06:02:53 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-01-12 06:02:53 +0400 |
commit | 94ae0232b0337ab70cecaef03cd845887cd36eaa (patch) | |
tree | caea2819c7fe0400fb91c9bdf0e99a9e0fd50cf6 /source/blender/blenloader | |
parent | 9a109c22ae1ef8a5c75932d661610b23ec685bd7 (diff) | |
parent | f68e9db583489d541d535791536ea20bc1ae1d76 (diff) |
Merged changes in the trunk up to revision 53729.
Conflicts resolved:
release/datafiles/startup.blend
source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 53 | ||||
-rw-r--r-- | source/blender/blenloader/intern/runtime.c | 5 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 6 |
3 files changed, 59 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 151a929a445..df68f711843 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5137,6 +5137,16 @@ static void direct_link_scene(FileData *fd, Scene *sce) sce->toolsettings->imapaint.paintcursor = NULL; sce->toolsettings->particle.paintcursor = NULL; + + /* in rare cases this is needed, see [#33806] */ + if (sce->toolsettings->vpaint) { + sce->toolsettings->vpaint->vpaint_prev = NULL; + sce->toolsettings->vpaint->tot = 0; + } + if (sce->toolsettings->wpaint) { + sce->toolsettings->wpaint->wpaint_prev = NULL; + sce->toolsettings->wpaint->tot = 0; + } } if (sce->ed) { @@ -8811,6 +8821,49 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + if (main->versionfile < 265 || (main->versionfile == 265 && main->subversionfile < 7)) { + Curve *cu; + + for (cu = main->curve.first; cu; cu = cu->id.next) { + if (cu->flag & (CU_FRONT | CU_BACK)) { + if ( cu->ext1 != 0.0f || cu->ext2 != 0.0f) { + Nurb *nu; + + for (nu = cu->nurb.first; nu; nu = nu->next) { + int a; + + if (nu->bezt) { + BezTriple *bezt = nu->bezt; + a = nu->pntsu; + + while (a--) { + bezt->radius = 1.0f; + bezt++; + } + } + else if (nu->bp) { + BPoint *bp = nu->bp; + a = nu->pntsu * nu->pntsv; + + while (a--) { + bp->radius = 1.0f; + bp++; + } + } + } + } + } + } + } + + if (!MAIN_VERSION_ATLEAST(main, 265, 8)) { + Mesh *me; + for (me = main->mesh.first; me; me = me->id.next) { + BKE_mesh_do_versions_cd_flag_init(me); + } + } + + // if (main->versionfile < 265 || (main->versionfile == 265 && main->subversionfile < 7)) { #ifdef WITH_FREESTYLE /* default values in Freestyle settings */ diff --git a/source/blender/blenloader/intern/runtime.c b/source/blender/blenloader/intern/runtime.c index 5d8a865eea8..cbbaf713e84 100644 --- a/source/blender/blenloader/intern/runtime.c +++ b/source/blender/blenloader/intern/runtime.c @@ -48,11 +48,12 @@ #include "BLO_readfile.h" #include "BLO_runtime.h" +#include "BLI_blenlib.h" +#include "BLI_utildefines.h" + #include "BKE_blender.h" #include "BKE_report.h" -#include "BLI_blenlib.h" - /* Runtime reading */ static int handle_read_msb_int(int handle) diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index b1aee9f498a..63d8c9b0e0e 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1423,8 +1423,8 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) int size = mmd->dyngridsize; writestruct(wd, DATA, "MDefInfluence", mmd->totinfluence, mmd->bindinfluences); - writedata(wd, DATA, sizeof(int)*(mmd->totvert+1), mmd->bindoffsets); - writedata(wd, DATA, sizeof(float)*3*mmd->totcagevert, + writedata(wd, DATA, sizeof(int) * (mmd->totvert + 1), mmd->bindoffsets); + writedata(wd, DATA, sizeof(float) * 3 * mmd->totcagevert, mmd->bindcagecos); writestruct(wd, DATA, "MDefCell", size*size*size, mmd->dyngrid); writestruct(wd, DATA, "MDefInfluence", mmd->totinfluence, mmd->dyninfluences); @@ -1681,7 +1681,7 @@ static void write_mdisps(WriteData *wd, int count, MDisps *mdlist, int external) MDisps *md = &mdlist[i]; if (md->disps) { if (!external) - writedata(wd, DATA, sizeof(float)*3*md->totdisp, md->disps); + writedata(wd, DATA, sizeof(float) * 3 * md->totdisp, md->disps); } if (md->hidden) |