skinning.tools.mirror_weights.commands module

skinning.tools.mirror_weights.commands.mirror_weights(geometry, edge, inverse=False, replace=('L', 'R'))

Mirror the weights using the provided geometry and symmetry edge. An error will be raised when no skin cluster is attached to the geometry and the inverse variable determines which side gets new weights. The mapper is used to establish a mirror mapping between the influences.

Parameters:
  • geometry (str) –
  • edge (int) –
  • inverse (bool) –
  • replace (tuple[str]) –
Raises:
  • RuntimeError – When symmetry cannot be established.
  • RuntimeError – When no skin cluster is attached.
  • RuntimeError – When no influences cannot be mirrored.
skinning.tools.mirror_weights.commands.mirror_weights_on_selection(inverse=False, replace=('L', 'R'))

Mirror the weights using the current selection. The selection is supposed to be a mesh edge which dictates the symmetry. An error will be raised when no skin cluster is attached to the geometry and the inverse variable determines which side gets new weights. The mapper is used to establish a mirror mapping between the influences.

Parameters:
  • inverse (bool) –
  • replace (tuple[str]) –
Raises:
  • RuntimeError – When nothing is selected.
  • RuntimeError – When no edge is selected
  • RuntimeError – When symmetry cannot be established.
  • RuntimeError – When no skin cluster is attached.
  • RuntimeError – When no influences cannot be mirrored.