Hello! I dont think I've posted on the board before but I'm a bit new at python, and still figuring things out.
I'm writing a script that will take a control and toggle an attribute (smart baked over existing keyframes) over the timeline. what I have currently is something like
from maya import cmds
sel = cmds.ls(sl = 1)
sel = sel[0]
toggleOrient = cmds.getAttr(sel + '.orient')
cmds.bakeResults(cmds.setAttr(sel + '.orient', not toggleOrient), smart=True, time = (1,1000)) <<the error is here
I've tried a few different versions but having a bit of a struggle figuring out how to structure this and get it working correctly. Its probably a "For" script but I couldnt get that to run correctly.