Mesh.py - Updated doc and example about faceUV/vertexColor
image_billboard.py - was broken because textures dont accept the antialias flag anymore
This commit is contained in:
@@ -505,18 +505,16 @@ class MFace:
|
||||
@type smooth: int
|
||||
@ivar col: The face's vertex colors, if defined. Each vertex has its own
|
||||
color.
|
||||
Will throw an exception if the mesh does not have UV faces or vertex
|
||||
colors; use L{Mesh.faceUV} and L{Mesh.vertexColors} to test. B{Note}:
|
||||
if a mesh has i{both} UV faces and vertex colors, the colors stored in
|
||||
the UV faces will be used here.
|
||||
Will throw an exception if L{Mesh.vertexColors} is False.
|
||||
|
||||
Example::
|
||||
# This example uses vertex normals to apply normal colors to each face.
|
||||
from Blender import Scene, Mesh, Window
|
||||
scn= Scene.GetCurrent() # Current scene, important to be scene aware
|
||||
ob= scn.getActiveObject() # last selected object
|
||||
me= ob.getData(mesh=1) # thin wrapper doesn't copy mesh data like nmesh
|
||||
me.faceUV=1 # Enable face, vertex colors
|
||||
import bpy
|
||||
from Blender import Window
|
||||
scn= bpy.scenes.active # Current scene, important to be scene aware
|
||||
ob= scn.objects.active # last selected object
|
||||
me= ob.getData(mesh=1) # thin wrapper doesn't copy mesh data like nmesh
|
||||
me.vertexColors= True # Enable face, vertex colors
|
||||
for f in me.faces:
|
||||
for i, v in enumerate(f.v):
|
||||
no= v.no
|
||||
@@ -525,7 +523,7 @@ class MFace:
|
||||
col.g= int((no.y+1)*128)
|
||||
col.b= int((no.z+1)*128)
|
||||
Window.RedrawAll()
|
||||
@type col: sequence of MCols
|
||||
@type col: tuple of MCols
|
||||
@ivar mat: The face's index into the mesh's materials
|
||||
list. It is in the range [0,15].
|
||||
@type mat: int
|
||||
|
||||
Reference in New Issue
Block a user