drag channel box item

mail@pastecode.io avatar
unknown
python
4 months ago
493 B
8
No Index
import maya.cmds as cmds

def setup_drag_attr_context():
    if cmds.dragAttrContext('myDragAttrContext', exists=True):
        cmds.deleteUI('myDragAttrContext', toolContext=True)
    cmds.dragAttrContext('myDragAttrContext')
    cmds.dragAttrContext('myDragAttrContext', edit=True, connectTo=('pPlane1.translateX', 'pPlane1.rotateX')) #add your attr here, multiple can be added in one go but only for one object at a time!!
    cmds.setToolTo('myDragAttrContext')


setup_drag_attr_context()