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:
authorCampbell Barton <ideasman42@gmail.com>2010-07-19 23:57:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-19 23:57:28 +0400
commit5095e97ea6d4be29c5fc803ea613cab69f5dd39c (patch)
tree277e2975b1465e17c2eb854aca51d2f0e30c3000 /source/blender
parentc2945d31e7e9a1558ba892b5bbabc337f4263d24 (diff)
use the world horizon color when view3d render only option is set
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c6
-rw-r--r--source/blender/makesrna/intern/rna_world.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index c3d034eebd3..f282bc204a6 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2208,7 +2208,11 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
}
/* clear background */
- UI_ThemeClearColor(TH_BACK);
+ if((v3d->flag2 & V3D_RENDER_OVERRIDE) && scene->world)
+ glClearColor(scene->world->horr, scene->world->horg, scene->world->horb, 0.0);
+ else
+ UI_ThemeClearColor(TH_BACK);
+
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
/* setup view matrices */
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 8d5e2291724..4d0170bdc18 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -33,6 +33,8 @@
#include "DNA_texture_types.h"
#include "DNA_world_types.h"
+#include "WM_types.h"
+
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
@@ -42,7 +44,6 @@
#include "BKE_texture.h"
#include "WM_api.h"
-#include "WM_types.h"
static PointerRNA rna_World_lighting_get(PointerRNA *ptr)
{
@@ -476,7 +477,11 @@ void RNA_def_world(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "horr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Horizon Color", "Color at the horizon");
- RNA_def_property_update(prop, 0, "rna_World_update");
+ /* RNA_def_property_update(prop, 0, "rna_World_update"); */
+ /* render-only uses this, the notifier could be made to be more spesific */
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_World_update");
+
+
prop= RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "zenr");