1

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

Mendel Reis
  • 55
  • 2
  • 14
  • Those commands work for me in 2020 and do change the settings in the Preferences window after closing and reopening that window. Perhaps you could clarify what else might not be updating? – Spacey Feb 07 '21 at 10:16

0 Answers0