[Bf-python] face.col: where's my mistake?

Campbell Barton cbarton at metavr.com
Tue Aug 8 17:32:47 CEST 2006


You need to enable vcol lighting  in the material options, theres some 
other vcol option too..

Fritz Mielert wrote:
> Hey,
> probably you can help me. In "textured" mode I see really nice colors,
> but they become gray when I'm going to render...
>
> thanks
>
> fritz
>
>
> The following is a similar test script:
>
> from Blender import *
> from Blender.NMesh import *
> me = NMesh.GetRaw()  
> f = NMesh.Face()
> v = NMesh.Vert(-1.0, 0.0, 0.0) 
> me.verts = [v] 
> f.v = [v] 
>
> v = NMesh.Vert(1.0, 0.0, 0.0) 
> me.verts.append(v) 
> f.v.append(v)
>
> v = NMesh.Vert()
> v.co[0] = 0.0; v.co[1] = 1.0; v.co[2] = 0.0
> me.verts.append(v)
> f.v.append(v)
>
> f.col = [Col(255,0,0), Col(0,255,0), Col(0,0,255)]
>
> me.faces=[f]
> me.hasVertexColours(1)
> NMesh.PutRaw(me) 
> Redraw()
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>   


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list