Where can I find bmesh data in Blender?

Where can I find bmesh data in Blender?

There are 2 ways to access BMesh data, you can create a new BMesh by converting a mesh from bpy.types.BlendData.meshes or by accessing the current edit mode mesh. see: bmesh.types.BMesh.from_mesh and bmesh.from_edit_mesh respectively.

Is the bmesh module written to be standalone?

The bmesh module is written to be standalone except for mathutils which is used for vertex locations and normals. The only other exception to this are when converting mesh data to and from bpy.types.Mesh.

What to do when Python has multiple bmesh instances?

Take care when dealing with multiple BMesh instances since the mesh data can use a lot of memory, while a mesh that python owns will be freed in when the script holds no references to it, its good practice to call bmesh.types.BMesh.free which will remove all the mesh data immediately and disable further access.

How are disk and radial data types related in bmesh?

For an overview of BMesh data types and how they reference each other see: BMesh Design Document . Disk and Radial data is not exposed by the python api since this is for internal use only.

There are two ways to access BMesh data, you can create a new BMesh by converting a mesh from bpy.types.BlendData.meshes or by accessing the current Edit-Mode mesh. See: bmesh.types.BMesh.from_mesh and bmesh.from_edit_mesh respectively.

The BMesh module is written to be standalone except for mathutils which is used for vertex locations and normals. The only other exception to this are when converting mesh data to and from bpy.types.Mesh.

Can you use multiple bmesh instances at once?

Unlike Edit-Mode, the BMesh module can use multiple BMesh instances at once. Take care when dealing with multiple BMesh instances since the mesh data can use a lot of memory.

Where are faces stored in the bmesh module?

The BMesh itself does not store the triangulated faces, instead they are stored in the bpy.types.Mesh , to refresh tessellation triangles call bpy.types.Mesh.calc_loop_triangles. BMesh has a unified way to access mesh attributes such as UVs, vertex colors, shape keys, edge crease, etc.