skinning.utils.symmetry module

class skinning.utils.symmetry.Symmetry(node)

Bases: object

Create a symmetry map for a provided mesh using an edge that lies on the symmetry plane. This map can be used to link a face, edge or vertex index to its symmetrical counter part. The face, edge and vertex mappers are stored at a class level which will result in a cache that can be used when to be able to use the symmetry class multiple times without having to recalculate the mapping.

calculate_symmetry(edge_index, use_cache=False)
Parameters:
  • edge_index (int) –
  • use_cache (bool) –
Raises:

RuntimeError – When mesh is not symmetrical.

classmethod clear()

Clear any symmetry data stored on the class, this will make sure that any symmetry data needs to be freshly calculated.

edges
Returns:Edges
Return type:OrderedDict
faces
Returns:Faces
Return type:OrderedDict
static filter(data, mode=0)
Parameters:
  • data (OrderedDict) –
  • mode (int) –
Returns:

Indices

Return type:

list[int]

Raises:

RuntimeError – When node is not valid.

matrices
Returns:Matrix
Return type:OpenMaya.MMatrix
vertices
Returns:Vertices
Return type:OrderedDict