All commands in script bellow are working (prints according text) except one. Holding is not working.
If I understand right print(‘holding’) should work in case when I press and hold the button.
What I do wrong?
import maya.cmds as cmds def onPress(): print('pressed') def onRelease(): print('released') def onHold(): print('holding') def onDrag(): print('dragging') # delete drag if exists if (cmds.draggerContext('drag', exists=True)): cmds.deleteUI('drag') cmds.draggerContext('drag', releaseCommand='onRelease()', dragCommand='onDrag()', pressCommand='onPress()', holdCommand='onHold()', cursor='hand'); cmds.setToolTo('drag')