ddg.visualization.blender.mesh module

Collection of functions for Blender Mesh objects.

The related functions on the level of bmesh are found in bmeshutils.py module.

ddg.visualization.blender.mesh.from_bmesh(bm, name, free=False)[source]

Write a BMesh to a new mesh.

Parameters:
bmBMesh
namestr

The name of the new mesh.

freebool (default=False)

If True, bm is freed.

Returns:
bpy.types.Mesh
ddg.visualization.blender.mesh.add_root(collection=None, location=array([0, 0, 0]), empty_type='PLAIN_AXES', name='root', parent=None)[source]
ddg.visualization.blender.mesh.transform(mesh, M)[source]

Transforms vertices of mesh with given 3x3 or 4x4 matrix

Parameters:
meshbpy.types.Mesh

mesh to transform

Mnumpy.ndarray

3x3 or 4x4 transformation matrix

ddg.visualization.blender.mesh.shade_smooth(mesh_or_bobj, smooth=True)[source]

Apply smooth shading on each polygon of mesh_or_bobj.

Parameters:
mesh_or_bobj: bpy.types.Mesh or bpy.types.Object

The mesh or the object containign a mesh. This can also be a curve and will have no effect.

Returns:
bpy.types.Mesh or bpy.types.Object

The given mesh or blender object.

ddg.visualization.blender.mesh.select_boundary_edges(mesh)[source]
ddg.visualization.blender.mesh.select_interior_edges(mesh)[source]
ddg.visualization.blender.mesh.select_polygons(mesh, indices)[source]
ddg.visualization.blender.mesh.select_edges(mesh, indices)[source]
ddg.visualization.blender.mesh.select_vertices(mesh, indices)[source]
ddg.visualization.blender.mesh.select_interior_edges_mesh_object(context, mesh_object)[source]
ddg.visualization.blender.mesh.select_boundary_edges_mesh_object(context, mesh_object)[source]
ddg.visualization.blender.mesh.select_faces_mesh_object(context, mesh_object, indices)[source]
ddg.visualization.blender.mesh.select_edges_mesh_object(context, mesh_object, indices)[source]
ddg.visualization.blender.mesh.select_vertices_mesh_object(context, mesh_object, indices)[source]