[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14862] trunk/blender/source/blender/ render/intern/source/shadeinput.c:
Brecht Van Lommel
brechtvanlommel at pandora.be
Fri May 16 11:55:09 CEST 2008
Revision: 14862
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14862
Author: blendix
Date: 2008-05-16 11:55:09 +0200 (Fri, 16 May 2008)
Log Message:
-----------
Fix for bug #11682: active render vertex color not respected correctly.
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/shadeinput.c
Modified: trunk/blender/source/blender/render/intern/source/shadeinput.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/shadeinput.c 2008-05-16 09:30:07 UTC (rev 14861)
+++ trunk/blender/source/blender/render/intern/source/shadeinput.c 2008-05-16 09:55:09 UTC (rev 14862)
@@ -434,6 +434,8 @@
shi->totuv= 0;
shi->totcol= 0;
+ shi->actuv= obr->actmtface;
+ shi->actcol= obr->actmcol;
if(mode & (MA_VERTEXCOL|MA_VERTEXCOLP)) {
for (i=0; (mcol=RE_strandren_get_mcol(obr, strand, i, &name, 0)); i++) {
@@ -449,9 +451,9 @@
}
if(shi->totcol) {
- shi->vcol[0]= shi->col[0].col[0];
- shi->vcol[1]= shi->col[0].col[1];
- shi->vcol[2]= shi->col[0].col[2];
+ shi->vcol[0]= shi->col[shi->actcol].col[0];
+ shi->vcol[1]= shi->col[shi->actcol].col[1];
+ shi->vcol[2]= shi->col[shi->actcol].col[2];
}
else {
shi->vcol[0]= 0.0f;
@@ -484,7 +486,7 @@
suv->dyuv[1]= 0.0f;
}
- if((mode & MA_FACETEXTURE) && i==0) {
+ if((mode & MA_FACETEXTURE) && i==obr->actmtface) {
if((mode & (MA_VERTEXCOL|MA_VERTEXCOLP))==0) {
shi->vcol[0]= 1.0f;
shi->vcol[1]= 1.0f;
@@ -995,9 +997,9 @@
}
if(shi->totcol) {
- shi->vcol[0]= shi->col[0].col[0];
- shi->vcol[1]= shi->col[0].col[1];
- shi->vcol[2]= shi->col[0].col[2];
+ shi->vcol[0]= shi->col[shi->actcol].col[0];
+ shi->vcol[1]= shi->col[shi->actcol].col[1];
+ shi->vcol[2]= shi->col[shi->actcol].col[2];
shi->vcol[3]= 1.0f;
}
else {
More information about the Bf-blender-cvs
mailing list