I'm trying to implement drag&drop with maya layouts, simple: drag a button from one grid layout into another. To "simulate" this, I'm deleting the dragged button from original layout and create a new one at target layout...
I stopped in the delete layout part, when I try to do deleteUI() maya crashed :S I try with evalDeferred too and crash too
I see the bug in http://thnkr.com/bt/view.php?id=54 I dont know if exists any workaround or so...
I put here the code I run...
import maya.cmds as cmds
def DRAG (dragControl, x, y, modifiers):
def DROP (dragControl, dropControl, messages, x, y, dragType):
col = cmds.columnLayout(columnAttach=('both', 5), rowSpacing=1, columnWidth=200)
cmds.gridLayout(p=col, ag=1, cwh=[90,120])
cmds.button(dgc=DRAG, w=50, h=80)
cmds.gridLayout(p=col, dpc=DROP, bgc=(0.3, 0.2, 0.3), ag=1, cwh=[90,120])
Thnx very much!