Maya Blendshape delta

Hello all… first time posting here.

does anyone know how to extract blendshape delta values so that I can reuse them for other meshes with same topology? I want to make it into a script/plugin so that I can use them repeatedly… : )

any information will be very appreciated. I am also looking for a maya python mentor/advisor that can consult in a regular basis… let me know if you’re good in maya/python/mel and would like to make side income. freenomon@gmail.com

There are two attributes that hold the delta information of a blendshape. The inputPointsTarget holds all the deltas, and the inputComponentsTarget holds the vertex indices that get each delta.

If you have more than one geometry being controlled by a single blendshape node, the index of the geometry goes into the brackets of inputTarget[], but most of the time that’s probably gonna be 0

The index of your current blendshape goes in the brackets of inputTargetGroup[]

The [6000] thing is because the maya blendshape has the ability to have sub-shapes in between 0.0 and 1.0. So if you wanted an in-between shape to trigger at 0.5, you would use index 3000. I’ve never actually used this, I just know it exists.

Getting the data:

pt = cmds.getAttr('blendShape1.inputTarget[0].inputTargetGroup[0].inputTargetItem[6000].inputPointsTarget')
ct = cmds.getAttr('blendShape1.inputTarget[0].inputTargetGroup[0].inputTargetItem[6000].inputComponentsTarget')

Setting the data:

cmds.setAttr('blendShape2.inputTarget[0].inputTargetGroup[0].inputTargetItem[6000].inputPointsTarget', len(pt), *pt, type='pointArray')
cmds.setAttr('blendShape2.inputTarget[0].inputTargetGroup[0].inputTargetItem[6000].inputComponentsTarget', len(ct), *ct, type='componentList')
1 Like

Thanks for such swift reply. Is there any way I can reach you? (unless you’d rather not). If the information is used I’d like to compensate you for your trouble. :slight_smile: