Hey guys I am just running a very small PySide script to start a very very basic window in maya2016
the only issue I am getting is that MQtUtil doesn’t seem to be working nicely for me.
def getMayaWindow():
pointer = mui.MQtUtil.mainWindow()
return shiboken.wrapInstance(long(pointer), QtGui.QWidget)
Maya simply says MQtUtil has no attributes, is this common in PySide on 2016 or compatable at all?
thanks for your help
TheMaxx
November 9, 2015, 10:14am
2
you’re using this from the script editor?
[QUOTE=TheMaxx;28948]you’re using this from the script editor?[/QUOTE]
Both script editor and from Pycharm piped commands
edit: pycharm sends the code every time effortlessly with exit code 0 but the fwindow does not actually pop up.
script editor sends the error code.
this works for me in 2016
import maya.OpenMayaUI as apiUI
from PySide import QtGui, QtCore
import shiboken
PARENT = shiboken.wrapInstance(long(apiUI.MQtUtil.mainWindow()), QtGui.QWidget)
[QUOTE=TheMaxx;28952]this works for me in 2016
import maya.OpenMayaUI as apiUI
from PySide import QtGui, QtCore
import shiboken
PARENT = shiboken.wrapInstance(long(apiUI.MQtUtil.mainWindow()), QtGui.QWidget)
[/QUOTE]
ill give it a shot thanks. By the way are you themaxx from a specific website I know huh huh are ya lol
uh, not sure, i think i deleted my ashleymadison account
[QUOTE=TheMaxx;28954]uh, not sure, i think i deleted my ashleymadison account ;)[/QUOTE]
the error persists
Ok very embarrassing I forgot to import the UI or OpenMayaUI haha. It works now but the code being sent from PyCharm doesn’t cast the window if you know anything about that.
also another query for you. I’m using PyCharm as stated and I can not copy and paste into script editor even with nathan hornes work around script. listed here http://forum.jetbrains.com/thread/PyCharm-671
import maya.OpenMayaUI as apiUI
print apiUI.__file__
What does that print out?
yeah that lists as OpenMayaUI is available haha. sorry for the late responce.
[QUOTE=TheMaxx;28958]which file is it?[/QUOTE]
openMayaUI.pyc
i imported openMaya instead of openMayaUI haha typical