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
nameof the new mesh.- freebool (default=False)
If True,
bmis 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.