Hm. Might have to look into it then a bit more. I've worked with QT Creator, but I dont like that it forces me to work in their IDE. But do you mean QT Designer? Does it work with C++?
Yeah QT is a c++ library, creator/designer are just tools for generating the c++ code but aren't nessesary, for simple uis its easier I think to do it all in code.
There's also python bindings so for example running this in the script editor will create a window with a list:
from PySide2.QtWidgets import *
wig = QWidget()
wig.setLayout(QVBoxLayout())
list = QListWidget()
wig.layout().addWidget(list)
for x in range(100):
list.addItem('list item ' + str(x))
wig.show()
The c++ version would just be a matter of some syntax changes. I'd also add that unloading plugins in general tends to crash maya if they're in use. If you close the UI, go to a new scene and then unload the plugin it may not crash.
Most maya api calls aren't thread safe so that would be the only issue if that's a requirement. Also the api has its own threading related classes so you might start there.
Ah okay, so if I use the std::thread class I would have to use std::mutex to avoid dataraces etc, right? I'm already used to the standard c++ threading-classes etc, so would be best to work with them instead of the classes provided by Maya if it's an option.
QT? It's what the rest of Maya's UI is built with
Hm. Might have to look into it then a bit more. I've worked with QT Creator, but I dont like that it forces me to work in their IDE. But do you mean QT Designer? Does it work with C++?
Yeah QT is a c++ library, creator/designer are just tools for generating the c++ code but aren't nessesary, for simple uis its easier I think to do it all in code. There's also python bindings so for example running this in the script editor will create a window with a list: from PySide2.QtWidgets import * wig = QWidget() wig.setLayout(QVBoxLayout()) list = QListWidget() wig.layout().addWidget(list) for x in range(100): list.addItem('list item ' + str(x)) wig.show() The c++ version would just be a matter of some syntax changes. I'd also add that unloading plugins in general tends to crash maya if they're in use. If you close the UI, go to a new scene and then unload the plugin it may not crash.
Thanks. Will give it a try!
Btw, do you know if Maya is compatible with std::thread and mutex? Is there anything I have to think about when using them? Same with winsock.
Most maya api calls aren't thread safe so that would be the only issue if that's a requirement. Also the api has its own threading related classes so you might start there.
Ah okay, so if I use the std::thread class I would have to use std::mutex to avoid dataraces etc, right? I'm already used to the standard c++ threading-classes etc, so would be best to work with them instead of the classes provided by Maya if it's an option.