Package bpy :: Module types :: Class Mesh
[hide private]
[frames] | no frames]

Class Mesh


The Mesh Object

Mesh datablock to define geometric surfaces.

References

Instance Methods [hide private]
 
transform(matrix)
Transform mesh vertices by a matrix.
 
add_geometry(verts, edges, faces)
add_geometry
 
add_uv_texture()
Add a UV texture layer to Mesh.
 
calc_normals()
Calculate vertex normals.
 
update(calc_edges)
update
 
add_material(material)
Add a new material to Mesh.
 
animation_data_clear()
Clear animation on this this ID. (Inherited from bpy.types.ID)
AnimData
animation_data_create()
Create animation data to this ID, note that not all ID types support this. (Inherited from bpy.types.ID)
ID
copy()
Create a copy of this datablock (not supported for all datablocks). (Inherited from bpy.types.ID)
Instance Variables [hide private]
MeshTextureFaceLayer active_uv_texture
Active UV texture.
int in [0, inf] active_uv_texture_index
Active UV texture index.
MeshColorLayer active_vertex_color
Active vertex color layer.
int in [0, inf] active_vertex_color_index
Active vertex color index.
boolean all_edges
Displays all edges for wireframe in all view modes in the 3d view
boolean auto_texspace
Adjusts active object's texture space automatically when transforming object.
boolean autosmooth
Treats all set-smoothed faces with angles less than the specified angle as 'smooth' during render
int in [1, 80] autosmooth_angle
Defines maximum angle between face normals that 'Auto Smooth' will operate on
MeshTextureFaceLayer clone_uv_texture
UV texture to be used as cloning source.
int in [0, inf] clone_uv_texture_index
Clone UV texture index.
boolean double_sided
Render/display the mesh with double or single sided lighting
boolean draw_bevel_weights
Displays weights created for the Bevel modifier
boolean draw_creases
Displays creases created for subsurf weighting
boolean draw_edge_angle
Displays the angles in the selected edges in degrees
boolean draw_edge_lenght
Displays selected edge lengths
boolean draw_edges
Displays selected edges using hilights in the 3d view and UV editor
boolean draw_face_area
Displays the area of selected faces
boolean draw_faces
Displays all faces as shades in the 3d view and UV editor
boolean draw_normals
Displays face normals as lines
boolean draw_seams
Displays UV unwrapping seams
boolean draw_sharp
Displays sharp edges, used with the EdgeSplit modifier
boolean draw_vertex_normals
Displays vertex normals as lines
Collection of MeshEdge (readonly) edges
Edges of the mesh.
Collection of MeshFace (readonly) faces
Faces of the mesh.
boolean fake_user
Saves this datablock even if it has no users (Inherited from bpy.types.ID)
Collection of MeshFloatPropertyLayer (readonly) float_layers
Float Property Layers
Collection of MeshIntPropertyLayer (readonly) int_layers
Int Property Layers
Library (readonly) library
Library file the datablock is linked from. (Inherited from bpy.types.ID)
Collection of Material (readonly) materials
Materials
string name
Unique datablock ID name. (Inherited from bpy.types.ID)
Key (readonly) shape_keys
Shape Keys
Collection of MeshSticky (readonly) sticky
Sticky texture coordinates.
Collection of MeshStringPropertyLayer (readonly) string_layers
String Property Layers
boolean tag
Tools can use this to tag data, (initial state is undefined). (Inherited from bpy.types.ID)
Mesh texco_mesh
Derive texture coordinates from another mesh
float array of 3 items in [-inf, inf] texspace_loc
Texture space location.
float array of 3 items in [-inf, inf] texspace_size
Texture space size.
Mesh texture_mesh
Use another mesh for texture indicies (vertex indicies must be aligned).
boolean use_mirror_x
X Axis mirror editing
boolean use_paint_mask
Face selection masking for painting
int (readonly) in [0, 32767] users
Number of times this datablock is referenced. (Inherited from bpy.types.ID)
Collection of MeshTextureFaceLayer (readonly) uv_textures
UV Textures
Collection of MeshColorLayer (readonly) vertex_colors
Vertex Colors
boolean vertex_normal_flip
Flip vertex normals towards the camera during render
Collection of MeshVertex (readonly) verts
Vertices of the mesh.
Method Details [hide private]

transform(matrix)

 

Transform mesh vertices by a matrix.

Parameters:
  • matrix (float array of 16 items)

add_geometry(verts, edges, faces)

 

add_geometry

Parameters:
  • edges (int)
  • verts (int)
  • faces (int)

update(calc_edges)

 

update

Parameters:
  • calc_edges (boolean)

add_material(material)

 

Add a new material to Mesh.

Parameters: