diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-05-16 13:55:09 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-05-16 13:55:09 +0400 |
commit | 1e1ece8025975a07d33195c8271d217b87431adf (patch) | |
tree | 71ebc591e69bb47123b1441b233ebc3267bc35c2 | |
parent | 584d84eafdcf9d768ecb63f57d9d8606589bf220 (diff) |
Fix for bug #11682: active render vertex color not respected correctly.
-rw-r--r-- | source/blender/render/intern/source/shadeinput.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c index bf2ee3dbdd9..7397d623264 100644 --- a/source/blender/render/intern/source/shadeinput.c +++ b/source/blender/render/intern/source/shadeinput.c @@ -434,6 +434,8 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert 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 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert } 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 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert 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 @@ void shade_input_set_shade_texco(ShadeInput *shi) } 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 { |