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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-01-25 18:06:35 +0300
committerTon Roosendaal <ton@blender.org>2008-01-25 18:06:35 +0300
commitbd4cf4bc6689160acd2a9e891c033c55dea0b036 (patch)
treefd8bb61f9c7c231f9f0669c0348a0f481825bb2a /source
parentbd321b8afe485138bd81785cbdf36f0a27378528 (diff)
Feature: we're using "non linear lighting" now, using exposure/range in
world. That allows more extreme lamps (areas too). To make it work more intuitive, the preview renders in buttons now use the settings for exposure too.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/buttons_shading.c6
-rw-r--r--source/blender/src/previewrender.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c
index 2ac76942da7..be307a649b3 100644
--- a/source/blender/src/buttons_shading.c
+++ b/source/blender/src/buttons_shading.c
@@ -2283,8 +2283,8 @@ static void world_panel_world(World *wrld)
uiBlockBeginAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButF(block, NUMSLI,B_WORLDPRV, "Exp ", 160,30,145,19, &(wrld->exp), 0.0, 1.0, 0, 2, "Sets amount of exponential color correction for light");
- uiDefButF(block, NUMSLI,B_WORLDPRV, "Range ", 160,10,145,19, &(wrld->range), 0.2, 5.0, 0, 2, "Sets the color amount that will be mapped on color 1.0");
+ uiDefButF(block, NUMSLI,B_WORLDPRV2, "Exp ", 160,30,145,19, &(wrld->exp), 0.0, 1.0, 0, 2, "Sets amount of exponential color correction for light");
+ uiDefButF(block, NUMSLI,B_WORLDPRV2, "Range ", 160,10,145,19, &(wrld->range), 0.2, 5.0, 0, 2, "Sets the color amount that will be mapped on color 1.0");
}
@@ -2968,7 +2968,7 @@ void do_matbuts(unsigned short event)
allqueue(REDRAWBUTSSHADING, 0);
break;
case B_WORLDPRV2:
- BIF_preview_changed(ID_WO);
+ BIF_preview_changed(ID_TE);
allqueue(REDRAWBUTSSHADING, 0);
allqueue(REDRAWVIEW3D, 0);
break;
diff --git a/source/blender/src/previewrender.c b/source/blender/src/previewrender.c
index 2f7b4754d76..383b73b7619 100644
--- a/source/blender/src/previewrender.c
+++ b/source/blender/src/previewrender.c
@@ -270,6 +270,11 @@ static Scene *preview_prepare_scene(RenderInfo *ri, int id_type, ID *id, int pr_
sce->r.scemode |= R_PREVIEWBUTS;
/* set world always back, is used now */
sce->world= pr_main->world.first;
+ /* now: exposure copy */
+ if(G.scene->world) {
+ sce->world->exp= G.scene->world->exp;
+ sce->world->range= G.scene->world->range;
+ }
sce->r.cfra= G.scene->r.cfra;