Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-27 18:35:34 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-27 18:35:34 +0300
commit57101c4fd26a85f4994d4d4d3f433c37f95367d0 (patch)
tree09d40feb19a41df0f32a05ff1975653f865b743e /source/blender/blenloader
parent17777e7cd195318c36a1172647557447330dd3a4 (diff)
Second attempt at committing the different render slot implementation. This
has a fix that hopefully solves the problem on mac/win. Also fixes #21322, render slots not working well with FSA.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c11
-rw-r--r--source/blender/blenloader/intern/writefile.c4
2 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 356ae158692..c6e3ef4767f 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1183,6 +1183,7 @@ void blo_make_image_pointer_map(FileData *fd, Main *oldmain)
{
Image *ima= oldmain->image.first;
Scene *sce= oldmain->scene.first;
+ int a;
fd->imamap= oldnewmap_new();
@@ -1192,6 +1193,9 @@ void blo_make_image_pointer_map(FileData *fd, Main *oldmain)
oldnewmap_insert(fd->imamap, ibuf, ibuf, 0);
if(ima->gputexture)
oldnewmap_insert(fd->imamap, ima->gputexture, ima->gputexture, 0);
+ for(a=0; a<IMA_MAX_RENDER_SLOT; a++)
+ if(ima->renders[a])
+ oldnewmap_insert(fd->imamap, ima->renders[a], ima->renders[a], 0);
}
for(; sce; sce= sce->id.next) {
if(sce->nodetree) {
@@ -1209,7 +1213,7 @@ void blo_end_image_pointer_map(FileData *fd, Main *oldmain)
OldNew *entry= fd->imamap->entries;
Image *ima= oldmain->image.first;
Scene *sce= oldmain->scene.first;
- int i;
+ int i, a;
/* used entries were restored, so we put them to zero */
for (i=0; i<fd->imamap->nentries; i++, entry++) {
@@ -1231,6 +1235,8 @@ void blo_end_image_pointer_map(FileData *fd, Main *oldmain)
}
ima->gputexture= newimaadr(fd, ima->gputexture);
+ for(a=0; a<IMA_MAX_RENDER_SLOT; a++)
+ ima->renders[a]= newimaadr(fd, ima->renders[a]);
}
for(; sce; sce= sce->id.next) {
if(sce->nodetree) {
@@ -2653,7 +2659,8 @@ static void direct_link_image(FileData *fd, Image *ima)
ima->anim= NULL;
ima->rr= NULL;
ima->repbind= NULL;
- ima->render_text= newdataadr(fd, ima->render_text);
+ memset(ima->renders, 0, sizeof(ima->renders));
+ ima->last_render_slot= ima->render_slot;
ima->packedfile = direct_link_packedfile(fd, ima->packedfile);
ima->preview = direct_link_preview_image(fd, ima->preview);
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index ccd7d5ff9a4..f5470d1ecec 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1625,10 +1625,6 @@ static void write_images(WriteData *wd, ListBase *idbase)
}
write_previews(wd, ima->preview);
-
- /* exception: render text only saved in undo files (wd->current) */
- if (ima->render_text && wd->current)
- writedata(wd, DATA, IMA_RW_MAXTEXT, ima->render_text);
}
ima= ima->id.next;
}