Package bpy :: Package ops :: Module mesh
[hide private]
[frames] | no frames]

Module mesh

Functions [hide private]
 
beauty_fill()
Arrange geometry on a selected surface to avoid skinny faces.
 
blend_from_shape(shape='', blend=1.0, add=True)
Blend in shape from a shape key.
 
colors_mirror(axis='X')
Mirror UV/image color layer.
 
colors_rotate(direction='CW')
Rotate UV/image color layer.
 
delete(type='VERT')
Delete selected vertices, edges or faces.
 
delete_edgeloop()
Export a single object as a stanford PLY with normals, colours and texture coordinates.
 
dupli_extrude_cursor()
Duplicate and extrude selected vertices, edges or faces towards 3D Cursor.
 
duplicate(mode=1)
Duplicate selected vertices, edges or faces.
 
duplicate_move()
(undocumented operator)
 
edge_face_add()
Add an edge or face to selected.
 
edge_flip()
Flip selected edge or adjoining faces.
 
edge_rotate(direction='CW')
Rotate selected edge or adjoining faces.
 
edgering_select(extend=False)
Select an edge ring
 
edges_select_sharp(sharpness=0.01)
Marked selected edges as sharp.
 
extrude()
Extrude selected vertices, edges or faces.
 
extrude_move()
(undocumented operator)
 
extrude_move_along_normals()
(undocumented operator)
 
extrude_repeat(offset=2.0, steps=10)
Extrude selected vertices, edges or faces repeatedly.
 
faces_select_interior()
Select faces where all edges have more then 2 face users.
 
faces_select_linked_flat(sharpness=0.0)
Select linked faces by angle.
 
faces_shade_flat()
Display faces 'flat'.
 
faces_shade_smooth()
Display faces 'smooth' (using vertex normals).
 
fgon_clear()
Clear fgon from selected face.
 
fgon_make()
Make fgon from selected faces.
 
fill()
Create a segment, edge or face.
 
flip_normals()
Toggle the direction of selected face's vertex and face normals.
 
hide(unselected=False)
Hide (un)selected vertices, edges or faces.
 
knife_cut(type='EXACT', path=None, cursor=9)
Cut selected edges and faces into parts.
 
loop_multi_select(ring=False)
Select a loop of connected edges by connection type.
 
loop_select(extend=False, ring=False)
Select a loop of connected edges.
 
loop_to_region()
Select a loop of connected edges as a region.
 
loopcut(number_cuts=1)
Add a new loop between existing loops.
 
loopcut_slide()
(undocumented operator)
 
mark_seam(clear=False)
(un)mark selected edges as a seam.
 
mark_sharp(clear=False)
(un)mark selected edges as sharp.
 
merge(type='', uvs=False)
Merge selected vertices.
 
normals_make_consistent(inside=False)
Flip all selected vertex and face normals in a consistent direction.
 
primitive_circle_add(vertices=32, radius=1.0, fill=False, view_align=False, enter_editmode=False)
Construct a circle mesh.
 
primitive_cone_add(vertices=32, radius=1.0, depth=1.0, cap_end=False, view_align=False, enter_editmode=False)
Construct a conic mesh (ends filled).
 
primitive_cube_add(view_align=False, enter_editmode=False)
Construct a cube mesh.
 
primitive_grid_add(x_subdivisions=10, y_subdivisions=10, size=1.0, view_align=False, enter_editmode=False)
Construct a grid mesh.
 
primitive_ico_sphere_add(subdivisions=2, size=1.0, view_align=False, enter_editmode=False)
Construct an Icosphere mesh.
 
primitive_monkey_add(view_align=False, enter_editmode=False)
Construct a Suzanne mesh.
 
primitive_plane_add(view_align=False, enter_editmode=False)
Construct a filled planar mesh with 4 vertices.
 
primitive_torus_add(major_radius=1.0, minor_radius=0.25, major_segments=48, minor_segments=16)
Add a torus mesh.
 
primitive_tube_add(vertices=32, radius=1.0, depth=1.0, cap_ends=True, view_align=False, enter_editmode=False)
Construct a tube mesh.
 
primitive_uv_sphere_add(segments=32, rings=24, size=1.0, view_align=False, enter_editmode=False)
Construct a UV sphere mesh.
 
quads_convert_to_tris()
Convert selected quads to triangles.
 
region_to_loop()
Select a region as a loop of connected edges.
 
remove_doubles(limit=0.0001)
Remove duplicate vertices.
 
reveal()
Reveal all hidden vertices, edges and faces.
 
rip(proportional='DISABLED', proportional_editing_falloff='SMOOTH', proportional_size=1.0, mirror=False)
Rip selection from mesh (quads only).
 
rip_move()
(undocumented operator)
 
screw(steps=9, turns=1, center=(0.0, 0.0, 0.0), axis=(0.0, 0.0, 0.0))
Extrude selected vertices in screw-shaped rotation around the cursor in indicated viewport.
 
select_all(action='TOGGLE')
Change selection of all vertices, edges or faces.
 
select_axis(mode='POSITIVE', axis='X_AXIS')
Select all data in the mesh on a single axis.
 
select_by_number_vertices(type='TRIANGLES')
Select vertices or faces by vertex count.
 
select_inverse()
Select inverse of (un)selected vertices, edges or faces.
 
select_less()
Select less vertices, edges or faces connected to initial selection.
 
select_linked(limit=False)
Select all vertices linked to the active mesh.
 
select_linked_pick(deselect=False, limit=False)
(un)select all vertices linked to the active mesh.
 
select_mirror(extend=False)
Select mesh items at mirrored locations.
 
select_more()
Select more vertices, edges or faces connected to initial selection.
 
select_non_manifold()
Select all non-manifold vertices or edges.
 
select_random(percentage=50.0, extend=False)
Randomly select vertices.
 
select_shortest_path(extend=False)
Select shortest path between two selections.
 
select_similar(type='')
Select similar vertices, edges or faces by property types.
 
select_vertex_path(type='EDGE_LENGTH')
Select shortest path between two vertices by distance type.
 
selection_type(type='VERTEX')
Set the selection mode type.
 
separate(type='SELECTED')
Separate selected geometry into a new mesh.
 
shape_propagate_to_all()
Apply selected vertex locations to all other shape keys.
 
skin()
Bridge face loops.
 
spin(steps=9, dupli=False, degrees=90.0, center=(0.0, 0.0, 0.0), axis=(0.0, 0.0, 0.0))
Extrude selected vertices in a circle around the cursor in indicated viewport.
 
split()
Split selected geometry into separate disconnected mesh.
 
sticky_add()
Add sticky UV texture layer.
 
sticky_remove()
Remove sticky UV texture layer.
 
subdivide(number_cuts=1, fractal=0.0, smoothness=0.0)
Subdivide selected edges.
 
tris_convert_to_quads()
Convert selected triangles to quads.
 
uv_texture_add()
Add UV texture layer.
 
uv_texture_remove()
Remove UV texture layer.
 
uvs_mirror(axis='X')
Mirror selected UVs.
 
uvs_rotate(direction='CW')
Rotate selected UVs.
 
vertex_color_add()
Add vertex color layer.
 
vertex_color_remove()
Remove vertex color layer.
 
vertex_paint_dirt(blur_strength=1.0, blur_iterations=1, clean_angle=180.0, dirt_angle=0.0, dirt_only=False)
undocumented python operator
 
vertices_smooth(repeat=1)
Flatten angles of selected vertices.
Function Details [hide private]

blend_from_shape(shape='', blend=1.0, add=True)

 

Blend in shape from a shape key.

Parameters:
  • shape (enum) - Shape key to use for blending. in ()
  • blend (float) - Blending factor. in (-inf, inf)
  • add (boolean)

colors_mirror(axis='X')

 

Mirror UV/image color layer.

Parameters:
  • axis (enum) - Axis to mirror colors around. in (X, Y)

colors_rotate(direction='CW')

 

Rotate UV/image color layer.

Parameters:
  • direction (enum) - Direction to rotate edge around. in (CW, CCW)

delete(type='VERT')

 

Delete selected vertices, edges or faces.

Parameters:
  • type (enum) - Method used for deleting mesh data in (VERT, EDGE, FACE, ALL, EDGE_FACE, ONLY_FACE, EDGE_LOOP)

duplicate(mode=1)

 

Duplicate selected vertices, edges or faces.

Parameters:
  • mode (int) - in (0, inf)

edge_rotate(direction='CW')

 

Rotate selected edge or adjoining faces.

Parameters:
  • direction (enum) - direction to rotate edge around. in (CW, CCW)

edgering_select(extend=False)

 

Select an edge ring

Parameters:
  • extend (boolean)

edges_select_sharp(sharpness=0.01)

 

Marked selected edges as sharp.

Parameters:
  • sharpness (float) - in (0, inf)

extrude_repeat(offset=2.0, steps=10)

 

Extrude selected vertices, edges or faces repeatedly.

Parameters:
  • offset (float) - in (0, 100)
  • steps (int) - in (0, 180)

faces_select_linked_flat(sharpness=0.0)

 

Select linked faces by angle.

Parameters:
  • sharpness (float) - in (0, inf)

hide(unselected=False)

 

Hide (un)selected vertices, edges or faces.

Parameters:
  • unselected (boolean)

knife_cut(type='EXACT', path=None, cursor=9)

 

Cut selected edges and faces into parts.

Parameters:
  • type (enum) - in (EXACT, MIDPOINTS, MULTICUT)
  • cursor (int) - in (0, inf)
  • path (collection)

loop_multi_select(ring=False)

 

Select a loop of connected edges by connection type.

Parameters:
  • ring (boolean)

loop_select(extend=False, ring=False)

 

Select a loop of connected edges.

Parameters:
  • ring (boolean)
  • extend (boolean)

loopcut(number_cuts=1)

 

Add a new loop between existing loops.

Parameters:
  • number_cuts (int) - in (1, inf)

mark_seam(clear=False)

 

(un)mark selected edges as a seam.

Parameters:
  • clear (boolean)

mark_sharp(clear=False)

 

(un)mark selected edges as sharp.

Parameters:
  • clear (boolean)

merge(type='', uvs=False)

 

Merge selected vertices.

Parameters:
  • type (enum) - Merge method to use. in (FIRST, LAST, CENTER, CURSOR, COLLAPSE)
  • uvs (boolean)

normals_make_consistent(inside=False)

 

Flip all selected vertex and face normals in a consistent direction.

Parameters:
  • inside (boolean)

primitive_circle_add(vertices=32, radius=1.0, fill=False, view_align=False, enter_editmode=False)

 

Construct a circle mesh.

Parameters:
  • vertices (int) - in (-inf, inf)
  • radius (float) - in (0, inf)
  • view_align (boolean)
  • enter_editmode (boolean)
  • fill (boolean)

primitive_cone_add(vertices=32, radius=1.0, depth=1.0, cap_end=False, view_align=False, enter_editmode=False)

 

Construct a conic mesh (ends filled).

Parameters:
  • vertices (int) - in (-inf, inf)
  • radius (float) - in (0, inf)
  • depth (float) - in (0, inf)
  • view_align (boolean)
  • enter_editmode (boolean)
  • cap_end (boolean)

primitive_cube_add(view_align=False, enter_editmode=False)

 

Construct a cube mesh.

Parameters:
  • view_align (boolean)
  • enter_editmode (boolean)

primitive_grid_add(x_subdivisions=10, y_subdivisions=10, size=1.0, view_align=False, enter_editmode=False)

 

Construct a grid mesh.

Parameters:
  • x_subdivisions (int) - in (-inf, inf)
  • y_subdivisions (int) - in (-inf, inf)
  • size (float) - in (0, inf)
  • view_align (boolean)
  • enter_editmode (boolean)

primitive_ico_sphere_add(subdivisions=2, size=1.0, view_align=False, enter_editmode=False)

 

Construct an Icosphere mesh.

Parameters:
  • subdivisions (int) - in (0, 6)
  • size (float) - in (0, inf)
  • view_align (boolean)
  • enter_editmode (boolean)

primitive_monkey_add(view_align=False, enter_editmode=False)

 

Construct a Suzanne mesh.

Parameters:
  • view_align (boolean)
  • enter_editmode (boolean)

primitive_plane_add(view_align=False, enter_editmode=False)

 

Construct a filled planar mesh with 4 vertices.

Parameters:
  • view_align (boolean)
  • enter_editmode (boolean)

primitive_torus_add(major_radius=1.0, minor_radius=0.25, major_segments=48, minor_segments=16)

 

Add a torus mesh.

Parameters:
  • major_radius (float) - Number of segments for the main ring of the torus in (0.01, 100)
  • minor_radius (float) - Number of segments for the minor ring of the torus in (0.01, 100)
  • major_segments (int) - Number of segments for the main ring of the torus in (3, 256)
  • minor_segments (int) - Number of segments for the minor ring of the torus in (3, 256)

primitive_tube_add(vertices=32, radius=1.0, depth=1.0, cap_ends=True, view_align=False, enter_editmode=False)

 

Construct a tube mesh.

Parameters:
  • vertices (int) - in (-inf, inf)
  • radius (float) - in (0, inf)
  • depth (float) - in (0, inf)
  • cap_ends (boolean)
  • view_align (boolean)
  • enter_editmode (boolean)

primitive_uv_sphere_add(segments=32, rings=24, size=1.0, view_align=False, enter_editmode=False)

 

Construct a UV sphere mesh.

Parameters:
  • segments (int) - in (-inf, inf)
  • rings (int) - in (-inf, inf)
  • size (float) - in (0, inf)
  • view_align (boolean)
  • enter_editmode (boolean)

remove_doubles(limit=0.0001)

 

Remove duplicate vertices.

Parameters:
  • limit (float) - Minimum distance between merged verts in (1e-06, 50)

rip(proportional='DISABLED', proportional_editing_falloff='SMOOTH', proportional_size=1.0, mirror=False)

 

Rip selection from mesh (quads only).

Parameters:
  • proportional (enum) - in (DISABLED, ENABLED, CONNECTED)
  • proportional_editing_falloff (enum) - Falloff type for proportional editing mode. in (SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM)
  • proportional_size (float) - in (0, inf)
  • mirror (boolean)

screw(steps=9, turns=1, center=(0.0, 0.0, 0.0), axis=(0.0, 0.0, 0.0))

 

Extrude selected vertices in screw-shaped rotation around the cursor in indicated viewport.

Parameters:
  • steps (int) - Steps in (0, inf)
  • turns (int) - Turns in (0, inf)
  • center (float array of 3 items) - Center in global view space in (-inf, inf)
  • axis (float array of 3 items) - Axis in global view space in (-1, 1)

select_all(action='TOGGLE')

 

Change selection of all vertices, edges or faces.

Parameters:
  • action (enum) - Selection action to execute in (TOGGLE, SELECT, DESELECT, INVERT)

select_axis(mode='POSITIVE', axis='X_AXIS')

 

Select all data in the mesh on a single axis.

Parameters:
  • mode (enum) - Axis side to use when selecting in (POSITIVE, NEGATIVE, ALIGNED)
  • axis (enum) - Select the axis to compare each vertex on in (X_AXIS, Y_AXIS, Z_AXIS)

select_by_number_vertices(type='TRIANGLES')

 

Select vertices or faces by vertex count.

Parameters:
  • type (enum) - Type of elements to select. in (TRIANGLES, QUADS, OTHER)

select_linked(limit=False)

 

Select all vertices linked to the active mesh.

Parameters:
  • limit (boolean)

select_linked_pick(deselect=False, limit=False)

 

(un)select all vertices linked to the active mesh.

Parameters:
  • deselect (boolean)
  • limit (boolean)

select_mirror(extend=False)

 

Select mesh items at mirrored locations.

Parameters:
  • extend (boolean)

select_random(percentage=50.0, extend=False)

 

Randomly select vertices.

Parameters:
  • percentage (float) - Percentage of elements to select randomly. in (0, 100)
  • extend (boolean)

select_shortest_path(extend=False)

 

Select shortest path between two selections.

Parameters:
  • extend (boolean)

select_similar(type='')

 

Select similar vertices, edges or faces by property types.

Parameters:
  • type (enum) - in (NORMAL, FACE, VGROUP, LENGTH, DIR, FACE, FACE_ANGLE, CREASE, SEAM, SHARP, MATERIAL, IMAGE, AREA, PERIMETER, NORMAL, COPLANAR)

select_vertex_path(type='EDGE_LENGTH')

 

Select shortest path between two vertices by distance type.

Parameters:
  • type (enum) - Method to compute distance. in (EDGE_LENGTH, TOPOLOGICAL)

selection_type(type='VERTEX')

 

Set the selection mode type.

Parameters:
  • type (enum) - Set the mesh selection type in (VERTEX, EDGE, FACE)

separate(type='SELECTED')

 

Separate selected geometry into a new mesh.

Parameters:
  • type (enum) - in (SELECTED, MATERIAL, LOOSE)

spin(steps=9, dupli=False, degrees=90.0, center=(0.0, 0.0, 0.0), axis=(0.0, 0.0, 0.0))

 

Extrude selected vertices in a circle around the cursor in indicated viewport.

Parameters:
  • steps (int) - Steps in (0, inf)
  • degrees (float) - Degrees in (-inf, inf)
  • center (float array of 3 items) - Center in global view space in (-inf, inf)
  • axis (float array of 3 items) - Axis in global view space in (-1, 1)
  • dupli (boolean)

subdivide(number_cuts=1, fractal=0.0, smoothness=0.0)

 

Subdivide selected edges.

Parameters:
  • number_cuts (int) - in (1, inf)
  • fractal (float) - Fractal randomness factor. in (0, inf)
  • smoothness (float) - Smoothness factor. in (0, inf)

uvs_mirror(axis='X')

 

Mirror selected UVs.

Parameters:
  • axis (enum) - Axis to mirror UVs around. in (X, Y)

uvs_rotate(direction='CW')

 

Rotate selected UVs.

Parameters:
  • direction (enum) - Direction to rotate UVs around. in (CW, CCW)

vertex_paint_dirt(blur_strength=1.0, blur_iterations=1, clean_angle=180.0, dirt_angle=0.0, dirt_only=False)

 

undocumented python operator

Parameters:
  • blur_strength (float) - Blur strength per iteration in (0.01, 1)
  • blur_iterations (int) - Number times to blur the colors. (higher blurs more) in (0, 40)
  • clean_angle (float) - Less then 90 limits the angle used in the tonal range in (0, 180)
  • dirt_angle (float) - Less then 90 limits the angle used in the tonal range in (0, 180)
  • dirt_only (boolean)

vertices_smooth(repeat=1)

 

Flatten angles of selected vertices.

Parameters:
  • repeat (int) - in (1, 100)