Hi,
I’m trying to change my constraint offset using the following code (i.e. PyMel):
constraint = pm.ls("IKLegFront1_R_parentConstraint1")[0]
constraint.target[0].attr("targetOffsetRotateY").set(130)
It gives me an error of
A child attribute of 'IKLegFront1_R_parentConstraint1.target[0]' is locked or connected and cannot be modified. #
I can access it but I can’t modify it. The attribute is also not locked nor connected to anything else.
Interestingly, I ran the same command in CMDS and MEL and it works as expected.
CMDS
constraint = cmds.ls("IKLegFront1_R_parentConstraint1")[0]
cmds.setAttr(constraint + '.target[0].targetOffsetRotateY', 120)
MEL
setAttr "IKLegFront1_R_parentConstraint1.target[0].targetOffsetRotateY" 130;
May I ask what am I missing for the PyMel implementation?