[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27900] branches/render25/source/blender/ nodes/intern/SHD_nodes/SHD_material.c: Render Branch: Fix unused material node affecting final color.

Brecht Van Lommel brecht at blender.org
Wed Mar 31 13:58:21 CEST 2010


Revision: 27900
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27900
Author:   blendix
Date:     2010-03-31 13:58:21 +0200 (Wed, 31 Mar 2010)

Log Message:
-----------
Render Branch: Fix unused material node affecting final color.

Modified Paths:
--------------
    branches/render25/source/blender/nodes/intern/SHD_nodes/SHD_material.c

Modified: branches/render25/source/blender/nodes/intern/SHD_nodes/SHD_material.c
===================================================================
--- branches/render25/source/blender/nodes/intern/SHD_nodes/SHD_material.c	2010-03-31 10:40:51 UTC (rev 27899)
+++ branches/render25/source/blender/nodes/intern/SHD_nodes/SHD_material.c	2010-03-31 11:58:21 UTC (rev 27900)
@@ -174,8 +174,17 @@
 		}
 		
 		/* copy passes, now just active node */
-		if(node->flag & NODE_ACTIVE_ID)
+		if(node->flag & NODE_ACTIVE_ID) {
+			float combined[4], alpha;
+
+			copy_v4_v4(combined, shcd->shr->combined);
+			alpha= shcd->shr->alpha;
+
 			*(shcd->shr)= shrnode;
+
+			copy_v4_v4(shcd->shr->combined, combined);
+			shcd->shr->alpha= alpha;
+		}
 	}
 }
 





More information about the Bf-blender-cvs mailing list