Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am not sure how to fix the problem. The else does not work.
import maya.cmds as cmds
# Non-Weighted Tangents. This is depends on preferences.
cmds.keyTangent(e = True, wt = False)
# set to Weighted Tangents.
cmds.keyTangent(e = True, wt = True)
# set to Non-Weighted Tangents, False.
if cmds.keyTangent(q = True, wt = True):
cmds.keyTangent(e = True, wt = False)
# toggle Weighted Tangents.
else:
cmds.keyTangent(e = True, wt = True)
It works until if. But I am unable to toggle Weighted Tangents and Non-Weighted Tangents using else. Any kind of suggestions are appreciated. I want to register and use this code as a hotkey.
Thanks,
Solved! Go to Solution.