Hi,
There’s already another threadabout this, but I haven’t been able to make this work with the shipped tools of 3dsMax 2015 (eval). Has anyone managed to make this work yet?
In the Win32 class there’s GetMAXHWnd() however I haven’t managed to convert this in a convenient format that works with the wrapinstance method in shiboken. I admit I haven’t tried the blur-dev QMigrate, mainly because I don’t want to have to resort to anything outside of the current toolbox unless absolutely necessary.
There’s another method called Set3dsMaxAsParentWindow(HWND h). I have no clue how to convert a PySide window to a valid format.
Any insight would be greatly appreciated.
Well, let me know if you’re able to do it.
There have been conversations about this for a while and there’s no easy way to do it without resorting to PuQtWinMigrate as Chris mentioned in his blog post: http://area.autodesk.com/blogs/chris/pyqt-ui-in-3ds-max-2014-extension
Sorry I’m not able to shed more light into this… It’s something everyone would like to have an easy solution!
Cheers,
Artur
Will QtWinMigrate from blur work with the version of Pyside shipped with 3dsMax? I was thinking of simply using that migrate function from the module, but adhere to Pyside for all the rest. The header of my tools would look something like:
import MaxPlus, ctypes
from PyQt4 import QtWinMigrate
from PySide import QtGui, QtCore
Has anyone tried this? I’m gonna give it a whirl in the next few days.
Does something like this work for Max?
def get_main_window():
from PySide import QtGui
for widget in QtGui.qApp.allWidgets():
if "MayaWindow" in widget.objectName():
return widget
return None