I have quite a problem I cannot solve and it's so damn basic... maybe someone with a bit more experience can point out my fault.
I have created a Human IK rig (Create skeleton + Create controllers). Afterwards I want to run those two lines of code:
import maya.cmds as cmds
cmds.setAttr('Character1_Ctrl_LeftArm'+'.scaleX', k = True, l = False)
Which should make the LeftArm Controller.scaleX keyable and should unlock it was well. But it does not unlock it :(
The funny thing is, when I manually hit "Unlock Selected" via the Channel Box, it works. Afterwards I'm able to lock and unlock it via code. To me this behavior is pretty strange and I'd be grateful if someone could help me.
Thanks in advance