Hey Guys we develop a MaxPlus/Pyside Window inside 3dsMax. But the Pyside window we create is always a seperate window,not parented to max, so it stays visible even if we minimize max for instance.
Now we tried different approaches to solve that. the best working solution was the following piece of code. It works almost perfect but if you move the window it is very bugy as you can see on the screenshot. do you know any solution for that problem?
thanks in advance
Florian
class OpenWindow(QtGui.QMainWindow):
def __init__(self, parent=None):
super(OpenWindow, self).__init__(parent)
WId=self.winId()
if type(WId).__name__ == 'PyCObject':
from ctypes import pythonapi, c_void_p, py_object
pythonapi.PyCObject_AsVoidPtr.restype = c_void_p
pythonapi.PyCObject_AsVoidPtr.argtypes = [py_object]
WId = pythonapi.PyCObject_AsVoidPtr(WId)
MaxPlus.Win32.Set3dsMaxAsParentWindow(WId)