Revision: 30509
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30509
Author:   campbellbarton
Date:     2010-07-19 21:57:28 +0200 (Mon, 19 Jul 2010)

Log Message:
-----------
use the world horizon color when view3d render only option is set

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
    trunk/blender/source/blender/makesrna/intern/rna_world.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_draw.c     
2010-07-19 18:08:29 UTC (rev 30508)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_draw.c     
2010-07-19 19:57:28 UTC (rev 30509)
@@ -2208,7 +2208,11 @@
        }
 
        /* 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 */

Modified: trunk/blender/source/blender/makesrna/intern/rna_world.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_world.c    2010-07-19 
18:08:29 UTC (rev 30508)
+++ trunk/blender/source/blender/makesrna/intern/rna_world.c    2010-07-19 
19:57:28 UTC (rev 30509)
@@ -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 @@
        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");


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to