How to check if it is docked


#1

How can I check to know if a workspaceControl is docked or not?

I tried using the floating arg, but it does not seems to be returning me False irregardless if I put True or False…

cmds.workspaceControl(“mytool”, query=True, floating=False)


#2

So this appears to be working for me. I get False when the control is docked, and True when the control is floating.

win = cmds.workspaceControl('some_workspace_control',retain=False, floating=True)

l = cmds.columnLayout(win)
cmds.button(l)
cmds.button(l)
cmds.button(l)

cmds.showWindow(win)

cmds.workspaceControl(win, q=True, floating=True)