Python Module Reference

This Python module contains useful tools to work with the seUVBlendShape deformer plugin. The plugin already an associated built in MEL command which this module uses.

Not only does this module provide functions you can use in your own tools, but it also comes with a user interface. (See ui module) This can be opened by calling the launchEditor() function.:

import seUVBlendShape
seUVBlendShape.launchEditor()

Upon importing this module, an attempt to load the plug-in will be peformed. No special Python libary requirements are needed. Maya provides all neccessary modules.

Note

Undo operations are limited to only creating a new deformer node. It is not currently supported to undo any editing (adding, removing, rebinding, etc) operations.

seUVBlendShape.launchEditor()

Launch the seUVBlendShape editor. Only available if called from an interactive Maya session.

Examples

from maya import cmds

# import the seUVBlendShape Python Module
import seUVBlendShape

# create a base and two target poly spheres
baseMesh = cmds.polySphere(n='base', ch=False)[0]
targetAMesh = cmds.polySphere(n='targetA', ch=False)[0]
targetBMesh = cmds.polySphere(n='targetB', ch=False)[0]

# create a new deformer with both targetA/B driving the base mesh
# using the first UV sets found.
deformer = seUVBlendShape.create(baseMesh, [targetAMesh, targetBMesh])

# add a new target to the deformer
targetCMesh = cmds.polySphere(n='targetC', ch=False)[0]
seUVBlendShape.addTarget(deformer, targetCMesh)

# remove target B from the deformer
seUVBlendShape.removeTarget(deformer, targetBMesh)