diff options
author | Kent Mein <mein@cs.umn.edu> | 2006-12-07 19:48:15 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2006-12-07 19:48:15 +0300 |
commit | 40c77590f9064f909e1423898f848c623af1679e (patch) | |
tree | 7597c07abae9fd27d585574e3f6765aec06c532f /source | |
parent | 8d457ec7d96ed33be0a9ddd1c3b8df931be2c529 (diff) |
Small plumiferos wishlist item.
Adds a button next to the threads button to disable texture processing
in a render. If anyone doesn't like the button feel free to revert this
one, its pretty simple.
Kent
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/texture.c | 5 | ||||
-rw-r--r-- | source/blender/src/buttons_scene.c | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index f57e853cecd..85127f1979a 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -559,6 +559,8 @@ typedef struct Scene { #define R_EXR_TILE_FILE 0x0400 #define R_COMP_FREE 0x0800 #define R_NO_IMAGE_LOAD 0x1000 +#define R_NO_TEX 0x2000 + /* alphamode */ #define R_ADDSKY 0 diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index ed434ac5370..04f192b3d7d 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -1448,6 +1448,7 @@ void do_material_tex(ShadeInput *shi) float texvec[3], dxt[3], dyt[3], tempvec[3], norvec[3], warpvec[3], Tnor=1.0; int tex_nr, rgbnor= 0, warpdone=0; + if (R.r.scemode & R_NO_TEX) return; /* here: test flag if there's a tex (todo) */ for(tex_nr=0; tex_nr<MAX_MTEX; tex_nr++) { @@ -1933,6 +1934,8 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float *colf) TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL}; float texvec[3], dxt[3], dyt[3], fact, facm, dx; int rgb, osatex; + + if (R.r.scemode & R_NO_TEX) return; mtex= har->mat->mtex[0]; if(mtex->tex==NULL) return; @@ -2061,6 +2064,7 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f float tempvec[3], texvec[3], dxt[3], dyt[3]; int tex_nr, rgb= 0, ok; + if (R.r.scemode & R_NO_TEX) return; /* todo: add flag to test if there's a tex */ texres.nor= NULL; @@ -2245,6 +2249,7 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf) float texvec[3], dxt[3], dyt[3], tempvec[3]; int tex_nr, rgb= 0; + if (R.r.scemode & R_NO_TEX) return; tex_nr= 0; for(; tex_nr<MAX_MTEX; tex_nr++) { diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index fd7e357df2c..28cc152f4ad 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -1201,7 +1201,10 @@ static void render_panel_output(void) uiDefBlockBut(block, edge_render_menu, NULL, "Edge Settings", 170, 94, 140, 20, "Display Edge settings"); uiBlockEndAlign(block); + uiBlockBeginAlign(block); + uiDefButBitS(block, TOG, R_NO_TEX, B_NOP, "Disable Tex", 100, 68, 70, 20, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Disables Textures for render"); uiDefButBitS(block, TOG, R_FREE_IMAGE, B_NOP, "Free Tex Images", 170, 68, 140, 20, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Frees all Images used by Textures after each render"); + uiBlockEndAlign(block); } static void render_panel_render(void) |