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.OpenMayaUI as omUI | |
| import maya.cmds as cmds | |
| import pymel.core as pm | |
| qtVersion = pm.about(qtVersion=True) | |
| if int(qtVersion.split('.')[0]) < 5: | |
| from PySide.QtGui import * | |
| from PySide.QtCore import * | |
| # from pysideuic import * | |
| from shiboken import wrapInstance | |
| else: |
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.cmds as cmds | |
| def getSelectedLayers(): | |
| sel = [] | |
| for each in cmds.ls(type='animLayer'): | |
| if cmds.animLayer(each, query=True, selected=True): | |
| sel.append(each) | |
| return sel | |
| def toggleMuteLayer(layers): |
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.cmds as cmds | |
| graphEd = 'graphEditor1GraphEd' | |
| states=["none", "integer"] | |
| state = cmds.animCurveEditor(graphEd, query=True, snapTime=True) | |
| cmds.animCurveEditor(graphEd, edit=True, snapTime=states[not states.index(state)]) | |
| cmds.iconTextCheckBox('timeSnapButton', edit=True, value=not states.index(state)) |
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) |
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.cmds as cmds | |
| ''' | |
| quick and dirty graph editor collape toggle tool | |
| ''' | |
| def toggleDockedGraphEd(): | |
| GraphEdWindow = None | |
| state = False | |
| if cmds.animCurveEditor('graphEditor1GraphEd', query=True, exists=True): | |
| graphEdParent = cmds.animCurveEditor( 'graphEditor1GraphEd', query=True, panel=True ) | |
| if cmds.panel(graphEdParent, query=True, exists=True): |
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
| ######################################################## | |
| # modification of the regular timeline drag for maya # | |
| # by Tom Bailey - [email protected] # | |
| # only works for 'film' 24 fps # | |
| # just run this in python, then click+drag on your # | |
| # timeline, alt+drag will smoothly scrub with no snap # | |
| # ctrl+drag will retime the timeline to snap to every # | |
| # 4 frames (6fps @ 24 fps) # | |
| ######################################################## |
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 | |
| import pymel.core as pm | |
| def beginDrag(*args): | |
| mods = pm.getModifiers() | |
| update = pm.timeControl( aPlayBackSliderPython, query=True, globalTime=True) | |
| print update | |
| if (mods & 1) > 0: print ' Shift' | |
| if (mods & 2) > 0: print ' CapsLock' | |
| if (mods & 4) > 0: print ' Ctrl' |
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 pymel.core as pm | |
| def select_keyed_objs(): | |
| # empty list for our keyed objects to go in | |
| keyed_objects = [] | |
| # loop over all objects in the scene (transform as mask to ignore animcurves etc) | |
| for obj in pm.ls(type='transform'): | |
| # check the keyframe count on the object | |
| if pm.keyframe(obj, query=True, keyframeCount=True): | |
| # if it's keyed, append it to our list |
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
| fonts = cmds.fontDialog(FontList=True) | |
| print fonts |
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 sys | |
| paths = sys.path | |
| for p in paths: | |
| print p |
NewerOlder