diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2008-09-05 04:12:01 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2008-09-05 04:12:01 +0400 |
commit | d2c13039ede9e50cf2aaf55651f66d4b730089af (patch) | |
tree | 2a5219dd51dffd273455652dbbd84d868d43361e /source/blender/blenloader | |
parent | 7afc0ca6009b063e6f2fd4123d8b86da174db379 (diff) | |
parent | cb89decfdcf5e6b2f26376d416633f4ccf0c532d (diff) |
svn merge -r 16320:16369 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/BLO_sys_types.h | 14 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 12 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 10 |
3 files changed, 34 insertions, 2 deletions
diff --git a/source/blender/blenloader/BLO_sys_types.h b/source/blender/blenloader/BLO_sys_types.h index a9d29375eac..49155260b31 100644 --- a/source/blender/blenloader/BLO_sys_types.h +++ b/source/blender/blenloader/BLO_sys_types.h @@ -49,6 +49,7 @@ extern "C" { /* The __intXX are built-in types of the visual complier! So we don't * need to include anything else here. */ + typedef signed __int8 int8_t; typedef signed __int16 int16_t; typedef signed __int32 int32_t; @@ -59,13 +60,23 @@ typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; +#ifndef _INTPTR_T_DEFINED #ifdef _WIN64 typedef __int64 intptr_t; -typedef unsigned __int64 uintptr_t; #else typedef long intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif + +#ifndef _UINTPTR_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 uintptr_t; +#else typedef unsigned long uintptr_t; #endif +#define _UINTPTR_T_DEFINED +#endif #elif defined(__linux__) @@ -87,6 +98,7 @@ typedef unsigned long uintptr_t; #endif /* ifdef platform for types */ + #ifdef _WIN32 #define htonl(x) correctByteOrder(x) #define ntohl(x) correctByteOrder(x) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ea226d9c220..b96ca9f3739 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1141,6 +1141,8 @@ void blo_make_image_pointer_map(FileData *fd) Link *ibuf= ima->ibufs.first; for(; ibuf; ibuf= ibuf->next) oldnewmap_insert(fd->imamap, ibuf, ibuf, 0); + if(ima->gputexture) + oldnewmap_insert(fd->imamap, ima->gputexture, ima->gputexture, 0); } for(; sce; sce= sce->id.next) { if(sce->nodetree) { @@ -1175,8 +1177,11 @@ void blo_end_image_pointer_map(FileData *fd) if(NULL==newimaadr(fd, ibuf)) { /* so was restored */ BLI_remlink(&ima->ibufs, ibuf); ima->bindcode= 0; + ima->gputexture= NULL; } } + + ima->gputexture= newimaadr(fd, ima->gputexture); } for(; sce; sce= sce->id.next) { if(sce->nodetree) { @@ -2276,6 +2281,7 @@ static void direct_link_text(FileData *fd, Text *text) */ link_list(fd, &text->lines); + link_list(fd, &text->markers); text->curl= newdataadr(fd, text->curl); text->sell= newdataadr(fd, text->sell); @@ -2342,8 +2348,10 @@ static void direct_link_image(FileData *fd, Image *ima) ima->ibufs.first= ima->ibufs.last= NULL; /* if not restored, we keep the binded opengl index */ - if(ima->ibufs.first==NULL) + if(ima->ibufs.first==NULL) { ima->bindcode= 0; + ima->gputexture= NULL; + } ima->anim= NULL; ima->rr= NULL; @@ -2554,6 +2562,7 @@ static void direct_link_material(FileData *fd, Material *ma) direct_link_nodetree(fd, ma->nodetree); ma->preview = direct_link_preview_image(fd, ma->preview); + ma->gpumaterial.first = ma->gpumaterial.last = NULL; } /* ************ READ PARTICLE SETTINGS ***************** */ @@ -3393,6 +3402,7 @@ static void direct_link_object(FileData *fd, Object *ob) ob->bb= NULL; ob->derivedDeform= NULL; ob->derivedFinal= NULL; + ob->gpulamp.first= ob->gpulamp.last= NULL; } /* ************ READ SCENE ***************** */ diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 6bed9e0c415..179e548747d 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1853,6 +1853,7 @@ static void write_texts(WriteData *wd, ListBase *idbase) { Text *text; TextLine *tmp; + TextMarker *mrk; text= idbase->first; while(text) { @@ -1876,7 +1877,16 @@ static void write_texts(WriteData *wd, ListBase *idbase) writedata(wd, DATA, tmp->len+1, tmp->line); tmp= tmp->next; } + + /* write markers */ + mrk= text->markers.first; + while (mrk) { + writestruct(wd, DATA, "TextMarker", 1, mrk); + mrk= mrk->next; + } } + + text= text->id.next; } |