I'm trying to make a simple button that wiil set global animation preferences in maya.
The script is supposed to change the animation preferences of DEFAULT IN TANGENT , DEFAULT OUT TANGENT and DEFAULT TANGENT WEIGHT.
so far this is what I got:
import pymel.core as pm
def setBlockingPrefs():
pm.keyTangent(edit = True, g = True, itt = 'clamped')
pm.keyTangent(edit = True, g = True, ott = 'step')
pm.keyTangent(edit = True, g = True, weightedTangents = 1)
def setSpliningPrefs():
pm.keyTangent(edit = True, g = True, itt = 'auto')
pm.keyTangent(edit = True, g = True, ott = 'auto')
pm.keyTangent(edit = True, g = True, weightedTangents = 1)
I get no error with this code, but then, i get nothing at all, the preferences are not changed.
What am I missing?
Thank you