sharpkerop.blogg.se

Maya 2017 vs 2018
Maya 2017 vs 2018












maya 2017 vs 2018
  1. Maya 2017 vs 2018 how to#
  2. Maya 2017 vs 2018 code#

Please note that in the example above, QtWidgets is imported from Qt (which is Qt.py). setWindowTitle ( 'Hello world' ) info_dialog.

Maya 2017 vs 2018 code#

This allows for the following example code to work in Maya 2017 as well as prior Maya versions:įrom Qt import QtWidgets info_dialog = QtWidgets. When using Qt.py, you should write your code as you would write PySide2 code. Qt.py can be used in place of the regular Python bindings. At the time of writing this, Qt.py is being used at Disney Animation, Framestore, Industriromantik (where I work) and Weta Digital.

Maya 2017 vs 2018 how to#

This will expand on how to make the same Python script work in Maya 2017 and previous versions, using PySide, PySide2, PyQt4 or PyQt5 (whatever is available) by using Qt.py.įull disclosure: Qt.py was created and is maintained by Marcus Ottosson and myself. It has been a great help to us and I hope that it will be a great help to others as well. Thanks to Riccardo Ferrazzo for starting this project. We have greatly enhanced this script and our changes are now available on github. One of the key components in our conversion process was a PyQt4 to PyQt5 Conversion Script from a github project known as pyqt4topyqt5.

maya 2017 vs 2018

Quoting Mark from Disney Animation ( source): There’s a magical conversion script you can try your luck with, in case you’re looking for a fast conversion from PyQt4 to PyQt5: pyqt4topyqt5

maya 2017 vs 2018

I haven’t used this myself, but I figured it was worth mentioning. I recommend skimming through the official “What’s new in Qt5” to get a good understanding on why Autodesk (and soon others to come) think it’s time to leave Qt4 and see where Qt5 is heading. There is of course a smörgåsbord of other changes in Qt5 as well, but this moving of classes I would say is probably the predominant one you need to address in your current Maya scripts. The best suggestion I have is you should check with the Qt5 documentation first and if required, cross-reference with the PyQt5 documentation. Strangely enough, there’s no official documentation for PySide2. the QtWidgets module (such as QLabel in the example above), check the documentation on that particular class. Example with PySide2:įrom PySide2 import QtWidgets my_label = QtWidgets. Like you probably guessed, all widgets are now created from QtWidgets. Perhaps the Qt Company thought QtGui got too bloated? The biggest change between the two, which you’ll notice since it breaks your old scripts, is that a bunch of stuff was taken out from QtGui and instead placed in the new QtWidgets module. I’m writing “Qt4 and Qt5” instead of “PySide and PySide2” or “PyQt4 and PyQt5” since we’re talking about similar Python bindings which in the end uses Qt. Instead you should use use PyQt5 which are the new Python bindings for Qt5. You also cannot use PyQt4 with Maya 2017, as they are also Python bindings for Qt4. With this comes a bunch of changes, so unfortunately, you can’t just “ import PySide2” instead of “ import PySide” and then expect your old scripts to work. PySide2 are the new Python bindings for Qt5 and is now bundled with Maya 2017. So naturally, when Qt4 no longer exists in Maya, PySide doesn’t work anymore and was therefore removed in Maya 2017. When you use PySide (or PyQt4), you’re actually using the Python bindings for Qt4. Unfortunately, this also breaks backwards compatibility to Qt4. Today, roughly 11 years after the Qt4 release, and starting with Maya 2017, Qt was upgraded to version 5 (“Qt5”) to enable a host of enhancements to Maya. Up until and including Maya 2016, Qt of version 4 (“Qt4”) which was released in 2005 has been used. Starting with Maya 2011, Maya’s user interface is built using the Qt toolkit. Nuke or any other Python-enabled DCC app which uses Qt. This guide explains how to deal with that and make your Python and PySide/PyQt scripts compatible with Maya 2017 as well as older Maya versions. Maya 2017 was released today and with it comes a big change PySide (and PyQt4) no longer works with Maya. Dealing with Maya 2017 and PySide2 #Python #Maya #Qt.py #PySide #PyQt














Maya 2017 vs 2018