Home | Trees | Index | Help |
|
---|
Module NMesh :: Class NMFace |
|
This object holds mesh face data.
Example:import Blender from Blender import NMesh me = NMesh.GetRaw("Mesh") faces = me.faces selected_faces = [] SEL = NMesh.FaceFlags['SELECT'] # get selected faces: for f in faces: if f.flag & SEL: selected_faces.append(f) # ... unselect selected and select all the others: for f in faces: if f.flag & SEL: f.flag &=~SEL # unselect these else: f.flag |= SEL # and select these
Note: Assigning uv textures to mesh faces in Blender works like this:
Method Summary | |
---|---|
Append a vertex to this face's vertex list. |
Class Variable Summary | |
---|---|
col : The list of vertex colours. | |
flag : Bit vector specifying selection flags (see NMesh.FaceFlags ). | |
image : The Image used as a texture for this face. | |
mat : Same as materialIndex below. | |
materialIndex : The index of this face's material in its NMesh materials list. | |
mode : The display mode (see Mesh.FaceModes ) | |
normal : (or just no) The normal vector for this face: [x,y,z]. | |
smooth : If non-zero, the vertex normals are averaged to make this face look
smooth. | |
transp : Transparency mode bit vector (see NMesh.FaceTranspModes ). | |
uv : List of per-face UV coordinates: [(u0, v0), (u1, v1), ...]. | |
list | v : The list of face vertices (up to 4). |
Method Details |
---|
append(vertex)Append a vertex to this face's vertex list.
|
Class Variable Details |
---|
colThe list of vertex colours. |
flagBit vector specifying selection flags (seeNMesh.FaceFlags ).
|
imageThe Image used as a texture for this face. |
matSame as materialIndex below. |
materialIndexThe index of this face's material in its NMesh materials list. |
modeThe display mode (seeMesh.FaceModes )
|
normal(or just no) The normal vector for this face: [x,y,z]. |
smoothIf non-zero, the vertex normals are averaged to make this face look smooth. |
transpTransparency mode bit vector (seeNMesh.FaceTranspModes ).
|
uvList of per-face UV coordinates: [(u0, v0), (u1, v1), ...]. |
vThe list of face vertices (up to 4).
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Aug 12 21:47:30 2004 | http://epydoc.sf.net |