Hi everyone!
I am trying to create a modal dialog with pyside. Is ist possible to lock the interface like a native C4D modal dialog does, so the user can't interact with Cinema until my window is closed?
Thanks
Hi everyone!
I am trying to create a modal dialog with pyside. Is ist possible to lock the interface like a native C4D modal dialog does, so the user can't interact with Cinema until my window is closed?
Thanks
Just to follow up, what Maxime suggested worked perfectly. No more cheating, basically just
c4d.StopAllThreads()
dialogThread.Start()
dialogThread.Wait(True)
Hi @Boony2000, unfortunately, we could not provide any support regarding usage of 3rd party module, and I invite you to take a look to the pyside documentation or to ask how a modal dialog can be done in a specialized forum about PySide.
Regarding about general way for doing a modal function. First of all call StopAllThread, and keep the main thread busy until your dialog which is executed into another thread is closed. See Threading with Python.
Moreover, you seem to be already aware of but Cinema 4D offers the possibility to open a GeDialog as modal with the flag c4d.DLG_TYPE_MODAL or c4d.DLG_TYPE_MODAL_RESIZEABLE.
Cheers,
Maxime.
MAXON SDK Specialist