retargetBlendshape.commands module

retargetBlendshape.commands.convert(source, blendshape, target, scale=True, rotate=True, smooth=0, smoothIterations=2, space=<sphinx.ext.autodoc._MockObject object>)

Create a new target based on the difference between the source and blendshape. The target mesh is duplicated and the difference between source and target is transfered onto the duplicated mesh. When transfering both scale and rotation of the delta vectors can be taken into account. Once the data is transfered an Laplacian smoothing algorithm can be applied onto the newly created target to create a more desired result.

Parameters:
  • source (str) –
  • blendshape (str) –
  • target (str) –
  • scale (bool) – Take scale between delta vectors into account
  • rotate (bool) – Take rotation between normal vectors into account
  • smooth (float) – Smoothing strength
  • smoothIterations (int) – Times the smooth algorithm repeats
  • space (OpenMaya.MSpace) –
Raises:

RuntimeError – If the vertex count doesn’t match

Returns:

Name of transfered blendshape mesh

Return type:

str