Im using tensionMap's colorset output as a primvar to drive prMan displacement maps for forehead wrinkles. Unfortunately, I cannot add additional blendshapes to the blendshape node after I add a tensionMap as it "blocks" the path to the blendshape. Is there a fix that you can do for this or should i write my own node?
To reproduce:
- create a sphere
- duplicate
- create a blendshape
- create a joint
- bind
- add and connect a tensionMap node with the following code
- try to add an additonal blendtarget into the first blendshape node
-Error: line 0: Specified blendShape not found in history of head1. //
-disconnecting the tensionMap node causes major instability, like the channel box stops working, the viewport doesnt update until after i move the camera, etc. So thats not an option ??
#SELECT THE GEO THAT HAS A BLENDSHAPE NODE AND A SKINCLUSTER
sel = cmds.ls(sl=1)[0]
sel_shape = cmds.listRelatives(sel, s=1)[0]
origShape = sel_shape + 'Orig' #ORIG SHAPE CREATED BY THE SKINCLUSTER
sel_mesh_history = cmds.listHistory(sel)
for i in sel_mesh_history:
if cmds.nodeType(i) == 'skinCluster':
skinCluster = i
tensionNode = cmds.createNode('tensionMap')
#CONNECTIONS
cmds.select(sel)
cmds.polyColorPerVertex(rel=1, r=.5, g=.5, b=.5, a=1, colorDisplayOption=1)
cmds.connectAttr(origShape + '.worldMesh', tensionNode + '.restGeometry')
cmds.connectAttr(skinCluster+ '.outputGeometry[0]', tensionNode + '.inGeometry')
cmds.connectAttr(tensionNode + '.outGeometry', sel_shape + '.inMesh', f=1)
cmds.select(tensionNode)