BMesh Utilities (bmesh.utils)

This module provides access to blenders bmesh data structures.

bmesh.utils.edge_rotate(edge, ccw=False)

Rotate the edge and return the newly created edge. If rotating the edge fails, None will be returned.

Parameters:
  • edge (BMEdge) – The edge to rotate.
  • ccw (boolean) – When True the edge will be rotated counter clockwise.
Returns:

The newly rotated edge.

Return type:

BMEdge

bmesh.utils.edge_split(edge, vert, fac)

Split an edge, return the newly created data.

Parameters:
  • edge (BMEdge) – The edge to split.
  • vert (BMVert) – One of the verts on the edge, defines the split direction.
  • fac (float) – The point on the edge where the new vert will be created [0 - 1].
Returns:

The newly created (edge, vert) pair.

Return type:

tuple

bmesh.utils.face_flip(faces)

Flip the faces direction.

Parameters:face (BMFace) – Face to flip.
bmesh.utils.face_join(faces)

Joins a sequence of faces.

Parameters:faces (BMFace) – Sequence of faces.
Returns:The newly created face or None on failure.
Return type:BMFace
bmesh.utils.face_split(face, vert, vert_a, vert_b, edge_example)

Split an edge, return the newly created data.

Parameters:
  • face (BMFace) – The face to cut.
  • vert_a (BMVert) – First vertex to cut in the face (face must contain the vert).
  • vert_b (BMVert) – Second vertex to cut in the face (face must contain the vert).
  • edge_example (BMEdge) – Optional edge argument, newly created edge will copy settings from this one.
bmesh.utils.vert_collapse_edge(vert, edge)

Collapse a vertex into an edge.

Parameters:
  • vert (BMVert) – The vert that will be collapsed.
  • edge (BMEdge) – The edge to collapse into.
Returns:

The resulting edge from the collapse operation.

Return type:

BMEdge

bmesh.utils.vert_collapse_faces(vert, edge, fac, join_faces)

Split an edge, return the newly created data.

Parameters:
  • vert (BMVert) – The vert that will be collapsed.
  • edge (BMEdge) – The edge to collapse into.
  • fac (float) – The factor to use when merging customdata [0 - 1].
Returns:

The resulting edge from the collapse operation.

Return type:

BMEdge

bmesh.utils.vert_dissolve(vert)

Dissolve this vertex (will be removed).

Parameters:vert (BMVert) – The vert to be dissolved.
Returns:True when the vertex dissolve is successful.
Return type:boolean

Previous topic

BMesh Types (bmesh.types)

Next topic

Game Types (bge.types)