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:
authorTon Roosendaal <ton@blender.org>2006-02-16 15:27:46 +0300
committerTon Roosendaal <ton@blender.org>2006-02-16 15:27:46 +0300
commit7f4b01ccf076998cac98c52aa6701f35e1c2500f (patch)
tree88d0b4ca129aa96a415b6b612ce77fcfb80a147f /source/blender/src/renderwin.c
parent32a9c7b493e85815c548d49303dcb9fe56d23ac6 (diff)
Rendering tricks for improving workflow:
- Button option "Single" in render-layer panel will enable to only render the currently indicated render-layer. It will also skip compositing. - Brought back the 'Local View' render. This will only render the visible objects, but with lights from the original view-layers. To make the option useful, it also temporal enables 'Single', which has the a disadvantage that you need to set the correct render-layer. It is a bit a tricky option though... since its quite invisble and confusing for people who don't know the feature. This might become either a button in 3d header, or use a popup requester to confirm, or... will need to think over! At least; both options display in render window a text to denote the option.
Diffstat (limited to 'source/blender/src/renderwin.c')
-rw-r--r--source/blender/src/renderwin.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/source/blender/src/renderwin.c b/source/blender/src/renderwin.c
index b6a4fda909c..428572e2317 100644
--- a/source/blender/src/renderwin.c
+++ b/source/blender/src/renderwin.c
@@ -834,6 +834,11 @@ static void printrenderinfo_cb(RenderStats *rs)
if(render_win) {
megs_used_memory= mem_in_use/(1024.0*1024.0);
+ if(G.scene->lay & 0xFF000000)
+ spos+= sprintf(spos, "Localview | ");
+ else if(G.scene->r.scemode & R_SINGLE_LAYER)
+ spos+= sprintf(spos, "Single Layer | ");
+
if(rs->tothalo)
spos+= sprintf(spos, "Fra:%d Ve:%d Fa:%d Ha:%d La:%d Mem:%.2fM", (G.scene->r.cfra), rs->totvert, rs->totface, rs->tothalo, rs->totlamp, megs_used_memory);
else
@@ -854,7 +859,7 @@ static void printrenderinfo_cb(RenderStats *rs)
}
/* temporal render debug printing, needed for testing orange renders atm... will be gone soon (or option) */
- if(rs->convertdone) {
+ if(G.rt==7 && rs->convertdone) {
spos= str;
spos+= sprintf(spos, "Fra:%d Mem:%.2fM ", G.scene->r.cfra, megs_used_memory);
@@ -980,6 +985,8 @@ static void end_test_break_callback()
static void do_render(int anim)
{
Render *re= RE_NewRender("Render");
+ unsigned int lay= G.scene->lay;
+ int scemode= G.scene->r.scemode;
/* we set this flag to prevent renderwindow queue to execute another render */
G.rendering= 1;
@@ -1000,11 +1007,24 @@ static void do_render(int anim)
if(G.obedit)
exit_editmode(0); /* 0 = no free data */
+ /* allow localview render for objects with lights in normal layers */
+ if(curarea->spacetype==SPACE_VIEW3D) {
+ if(G.vd->lay & 0xFF000000) {
+ G.scene->lay |= G.vd->lay;
+ G.scene->r.scemode |= R_SINGLE_LAYER;
+ }
+ else G.scene->lay= G.vd->lay;
+ }
+
if(anim)
RE_BlenderAnim(re, G.scene, G.scene->r.sfra, G.scene->r.efra);
else
RE_BlenderFrame(re, G.scene, G.scene->r.cfra);
+ /* restore local view exception */
+ G.scene->lay= lay;
+ G.scene->r.scemode= scemode;
+
if(render_win) window_set_cursor(render_win->win, CURSOR_STD);
free_filesel_spec(G.scene->r.pic);