[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55487] trunk/blender/source/gameengine/ Converter/BL_BlenderDataConversion.cpp: BGE bugfix for [#34505] Vertex Colors not working in the BGE (for custom GLSL shaders) when multitexture and no material

Dalai Felinto dfelinto at gmail.com
Fri Mar 22 00:20:46 CET 2013


Revision: 55487
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55487
Author:   dfelinto
Date:     2013-03-21 23:20:46 +0000 (Thu, 21 Mar 2013)
Log Message:
-----------
BGE bugfix for [#34505] Vertex Colors not working in the BGE (for custom GLSL shaders) when multitexture and no material

Bug introduced on rev.36723

Modified Paths:
--------------
    trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp

Modified: trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp	2013-03-21 23:11:52 UTC (rev 55486)
+++ trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp	2013-03-21 23:20:46 UTC (rev 55487)
@@ -429,8 +429,9 @@
 static bool GetMaterialUseVColor(Material *ma, const bool glslmat)
 {
 	if (ma) {
-		/* glsl uses vertex colors, otherwise use material setting */
-		return (glslmat || (ma->mode & MA_VERTEXCOLP) != 0);
+		/* glsl uses vertex colors, otherwise use material setting
+		 * defmaterial doesn't have VERTEXCOLP as default [#34505] */
+		return (glslmat || ma == &defmaterial || (ma->mode & MA_VERTEXCOLP) != 0);
 	}
 	else {
 		/* no material, use vertex colors */




More information about the Bf-blender-cvs mailing list