Skip to content

Instantly share code, notes, and snippets.

@yusukei
Created October 12, 2012 13:20
Show Gist options
  • Save yusukei/3879173 to your computer and use it in GitHub Desktop.
Save yusukei/3879173 to your computer and use it in GitHub Desktop.
import maya.OpenMayaUI
from PySide import QtGui
import shiboken
import maya.cmds as cmds
panel = cmds.getPanel(scriptType="scriptEditorPanel")[0]
widget = maya.OpenMayaUI.MQtUtil.findLayout(panel)
scriptEditor = shiboken.wrapInstance(long(widget), QtGui.QWidget)
mainWindow = shiboken.wrapInstance(long(maya.OpenMayaUI.MQtUtil.mainWindow()), QtGui.QWidget)
win = QtGui.QDockWidget('test', parent=mainWindow)
win.setWidget(scriptEditor)
win.setFloating(True)
win.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment