I'm trying to use the inserInput method of Attribute class from pymel 1.0.6 under Maya 2015. But it's not working as expected:
from pymel.core import *
nodeA = createNode('transform')
nodeB = createNode('transform')
nodeC = createNode('multiplyDivide')
nodeA.translateX >> nodeB.translateX
nodeB.translateX.insertInput(nodeC, 'outputX', 'input1X')
It should insert nodeC between nodeA and nodeB. Buit it throws an error:
The attribute 'transform2.translateX' cannot be connected to 'multiplyDivide1.outputX'
What am I doing wrong?