Created
January 21, 2020 17:46
-
-
Save tb-animator/ea4d4688ec19acdfedd7a768ab0da75d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import maya.mel as mel | |
| import maya.cmds as cmds | |
| ''' | |
| Quickly scale your selected keys or entire animation curves by -1, if you have keys selected in the graphEditor, they will all be scaled. | |
| If no keys are selected, the currently highlighted channels in the channelbox will be flipped | |
| ''' | |
| gChannelBoxName = mel.eval('$temp=$gChannelBoxName') | |
| selection = cmds.ls(sl=True) | |
| chList = cmds.channelBox(gChannelBoxName, | |
| query=True, | |
| selectedMainAttributes=True) | |
| cmds.scaleKey(includeUpperBound=False, valueScale=-1, valuePivot=-1, animation='keysOrObjects', attribute=chList) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment