Commit: 3a47c1a9d3eeaafce6efa4ef570583b6aba477cb
Author: Bastien Montagne
Date:   Sat Sep 6 22:50:31 2014 +0200
Branches: master
https://developer.blender.org/rB3a47c1a9d3eeaafce6efa4ef570583b6aba477cb

Fix T40507: Blender Internal Render's Gather don't use node's emit color.

Node was simply ignored by occ shading (noted as TODO), though it's a mere 
matter
of a very few lines of code, nowadays... Just copied from similar task in bake 
code.

===================================================================

M       source/blender/render/intern/source/occlusion.c

===================================================================

diff --git a/source/blender/render/intern/source/occlusion.c 
b/source/blender/render/intern/source/occlusion.c
index f0fe5d0..0c6341f 100644
--- a/source/blender/render/intern/source/occlusion.c
+++ b/source/blender/render/intern/source/occlusion.c
@@ -45,6 +45,7 @@
 
 #include "BLF_translation.h"
 
+#include "BKE_node.h"
 #include "BKE_scene.h"
 
 
@@ -194,14 +195,19 @@ static void occ_shade(ShadeSample *ssamp, 
ObjectInstanceRen *obi, VlakRen *vlr,
        }
 
        /* init material vars */
-       /* note, keep this synced with render_types.h */
-       memcpy(&shi->r, &shi->mat->r, 23 * sizeof(float));
-       shi->har = shi->mat->har;
-       
+       shade_input_init_material(shi);
+
        /* render */
        shade_input_set_shade_texco(shi);
-       shade_material_loop(shi, shr); /* todo: nodes */
-       
+
+       if (shi->mat->nodetree && shi->mat->use_nodes) {
+               ntreeShaderExecTree(shi->mat->nodetree, shi, shr);
+               shi->mat = vlr->mat;  /* shi->mat is being set in nodetree */
+       }
+       else {
+               shade_material_loop(shi, shr);
+       }
+
        copy_v3_v3(rad, shr->combined);
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to