diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-09 22:37:37 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-09 22:37:37 +0300 |
commit | 10240261e9504c4d17ce6679d074e869d876d347 (patch) | |
tree | 6b5c8897666a75aeb417d2b28906cda109453875 /source/blender/blenkernel/intern | |
parent | 52b1c3764595c87506d1a164c46bf83773549cd6 (diff) |
J-key render switching back, now with 10 slots.
Implementation note: this was done by giving each Render a slot number,
and for every slot a new Render will be created. Not sure if this is
ideal, but it ensures that all passes, render info, etc are separate so
you can also compare render layers and passes, in 2.4x only whatever it
was currently displaying was backed up.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 10 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 13 |
3 files changed, 12 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index b35cf917895..7d89d94c6d5 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -321,9 +321,9 @@ static Render *fastshade_get_render(Scene *scene) /* XXX ugly global still, but we can't do preview while rendering */ if(G.rendering==0) { - Render *re= RE_GetRender("_Shade View_"); + Render *re= RE_GetRender("_Shade View_", RE_SLOT_DEFAULT); if(re==NULL) { - re= RE_NewRender("_Shade View_"); + re= RE_NewRender("_Shade View_", RE_SLOT_DEFAULT); RE_Database_Baking(re, scene, 0, 0); /* 0= no faces */ } @@ -337,7 +337,7 @@ static Render *fastshade_get_render(Scene *scene) /* called on file reading */ void fastshade_free_render(void) { - Render *re= RE_GetRender("_Shade View_"); + Render *re= RE_GetRender("_Shade View_", RE_SLOT_DEFAULT); if(re) { RE_Database_Free(re); diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 09b86234d33..41a05a989e6 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1088,7 +1088,7 @@ static void stampdata(Scene *scene, StampData *stamp_data, int do_prefix) } { - Render *re= RE_GetRender(scene->id.name); + Render *re= RE_GetRender(scene->id.name, RE_SLOT_RENDERING); RenderStats *stats= re ? RE_GetStats(re):NULL; if (stats && (scene->r.stamp & R_STAMP_RENDERTIME)) { @@ -1599,7 +1599,7 @@ RenderResult *BKE_image_acquire_renderresult(struct Scene *scene, Image *ima) if(ima->rr) return ima->rr; else if(ima->type==IMA_TYPE_R_RESULT) - return RE_AcquireResultRead(RE_GetRender(scene->id.name)); + return RE_AcquireResultRead(RE_GetRender(scene->id.name, RE_SLOT_VIEW)); return NULL; } @@ -1607,7 +1607,7 @@ void BKE_image_release_renderresult(struct Scene *scene, Image *ima) { if(ima->rr); else if(ima->type==IMA_TYPE_R_RESULT) - RE_ReleaseResult(RE_GetRender(scene->id.name)); + RE_ReleaseResult(RE_GetRender(scene->id.name, RE_SLOT_VIEW)); } /* after imbuf load, openexr type can return with a exrhandle open */ @@ -1919,7 +1919,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_ return NULL; if(iuser && iuser->scene) { - re= RE_GetRender(iuser->scene->id.name); + re= RE_GetRender(iuser->scene->id.name, RE_SLOT_VIEW); rr= RE_AcquireResultRead(re); /* release is done in BKE_image_release_ibuf using lock_r */ @@ -1953,7 +1953,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_ pass= (iuser)? iuser->pass: 0; /* this gives active layer, composite or seqence result */ - RE_AcquireResultImage(RE_GetRender(iuser->scene->id.name), &rres); + RE_AcquireResultImage(RE_GetRender(iuser->scene->id.name, RE_SLOT_VIEW), &rres); rect= (unsigned int *)rres.rect32; rectf= rres.rectf; rectz= rres.rectz; diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 8c119eb753b..c5865db5e26 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -2049,7 +2049,6 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int Scene *sce= seq->scene;// *oldsce= scene; Render *re; RenderResult rres; - char scenename[64]; int have_seq= FALSE; int sce_valid= FALSE; @@ -2093,11 +2092,10 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int oldcfra = seq->scene->r.cfra; - if(rendering) { - BLI_strncpy(scenename, sce->id.name+2, 64); - strcpy(sce->id.name+2, " do_build_seq_ibuf"); - } - re= RE_NewRender(sce->id.name); + if(rendering) + re= RE_NewRender(" do_build_seq_ibuf", RE_SLOT_DEFAULT); + else + re= RE_NewRender(sce->id.name, RE_SLOT_VIEW); /* prevent eternal loop */ doseq= scene->r.scemode & R_DOSEQ; @@ -2106,9 +2104,6 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int RE_BlenderFrame(re, sce, NULL, seq->sfra+se->nr+seq->anim_startofs); - if(rendering) - BLI_strncpy(sce->id.name+2, scenename, 64); - RE_AcquireResultImage(re, &rres); if(rres.rectf) { |