Hey guys, so I am trying to build a 3 bone IK leg using the spring solver. In the script I want to just connect the ramp that controls the spring angle bias.. seems simple enough but maya will not let me do it.
I have a very basic script here to demonstrate.
Make a simple joint chain starting with joint1 going to joint4, then run this.
if cmds.pluginInfo("ikSpringSolver", q = True, l = True) is False:
cmds.loadPlugin("ikSpringSolver")
tls = cmds.createNode('ikSpringSolver', s = True, n = 'threeLegSpringSolver')
ikBuilt = cmds.ikHandle(sj = 'joint1', ee = 'joint4', sol = tls)
cmds.addAttr('joint4', ln = "bias", at = 'double', min = 0, max = 1, dv = 0.5)
cmds.setAttr('joint4.bias', e = True, keyable = True)
cmds.connectAttr('joint4.bias', 'ikHandle1.springAngleBias[0].springAngleBias_FloatValue', f = True)
you will get the error
"# RuntimeError: The destination attribute 'ikHandle1.springAngleBias[0].springAngleBias_FloatValue' cannot be found. # "
but if I go and highlight that line that errors our and run it, it connects just fine!!
I tried to throw a dgdirty in there above the connectAttr and that made no difference.
I also tried to run it as an mel.eval, also to no avail.
Anyone have any ideas?