diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-14 10:31:38 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-14 10:31:38 +0400 |
commit | 82840ef94bce87684b0fcebcc47eb11d3771c1d3 (patch) | |
tree | dc8a883b8f7efa885ee9fc9a672f1b765d27dc5c /source/blender/blenloader | |
parent | 0c918213646734acbbda110dca3fa2e2198b3894 (diff) |
Add MDisps.hidden bitmap.
Updates SDNA, customdata functions, and file read/write. Also adds
accessor functions to BKE paint.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 1 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 13 |
2 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 2cbb8a300ed..0ba4c7a63d0 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3750,6 +3750,7 @@ static void direct_link_mdisps(FileData *fd, int count, MDisps *mdisps, int exte for(i = 0; i < count; ++i) { mdisps[i].disps = newdataadr(fd, mdisps[i].disps); + mdisps[i].hidden = newdataadr(fd, mdisps[i].hidden); if (mdisps[i].totdisp && !mdisps[i].level) { /* this calculation is only correct for loop mdisps; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 42c0ed1e55d..37e2308a0c1 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -135,6 +135,7 @@ Any case: direct data is ALWAYS after the lib block #include "DNA_movieclip_types.h" #include "MEM_guardedalloc.h" // MEM_freeN +#include "BLI_bitmap.h" #include "BLI_blenlib.h" #include "BLI_linklist.h" #include "BLI_bpath.h" @@ -1638,11 +1639,15 @@ static void write_mdisps(WriteData *wd, int count, MDisps *mdlist, int external) int i; writestruct(wd, DATA, "MDisps", count, mdlist); - if(!external) { - for(i = 0; i < count; ++i) { - if(mdlist[i].disps) - writedata(wd, DATA, sizeof(float)*3*mdlist[i].totdisp, mdlist[i].disps); + for(i = 0; i < count; ++i) { + MDisps *md = &mdlist[i]; + if(md->disps) { + if(!external) + writedata(wd, DATA, sizeof(float)*3*md->totdisp, md->disps); } + + if(md->hidden) + writedata(wd, DATA, BLI_BITMAP_SIZE(md->totdisp), md->hidden); } } } |