Python Qt Window class for compatibility between VFX programs
MIT License
Qt Window class for designing tools to be compatible between multiple VFX programs.
The main purpose of the class is to integrate into the program UI, but it also contains helpful features such as safely dealing with callbacks and automatically saving the window position.
The intended usage is to make your window class inherit VFXWindow
- which is an instance of QMainWindow
. By calling cls.show()
, it will launch the correct window type based on what program is loaded, and what settings were previously saved.
This is perfectly stable, but there is still plenty that needs improvement. Any help with extending existing application support or adding new applications is very much appreciated.
pip install vfxwindow
class MyWindow(VFXWindow):
WindowID = 'unique_window_id'
WindowName = 'My Window'
def __init__(self, parent=None, **kwargs):
super(MyWindow, self).__init__(parent, **kwargs)
# Setup window here
# Setup callbacks, but wait until the program is ready
self.deferred(self.newScene)
def newScene(self, *args):
"""Example: Delete and reapply callbacks after loading a new scene."""
self.removeCallbacks('sceneNewCallbacks')
if self.application == 'Maya':
self.addCallbackScene('kAfterNew', self.newScene, group='sceneNewCallbacks')
elif self.application == 'Nuke':
self.addCallbackOnCreate(self.newScene, nodeClass='Root', group='sceneNewCallbacks')
if __name__ == '__main__':
MyWindow.show()
✔️ Working / ❔ Untested / ❌ Not Working
Standard Window | Docked Window | Callbacks | Tested Versions | Linux | Windows | MacOs | |
---|---|---|---|---|---|---|---|
Maya | ✔️ | ✔️ | ✔️ | 2011-2016, 2017+ | ✔️ | ✔️ | ❔ |
Maya (Standalone) | ✔️ | ✔️ | ❔ | ✔️ | ❔ | ||
Nuke | ✔️ | ✔️ | ✔️ | 9-14 | ❔ | ✔️ | ❔ |
Nuke (Terminal) | ✔️ | ✔️ | ❔ | ✔️ | ❔ | ||
Houdini | ✔️ | ❌ | ❌ | 16-19 | ✔️ | ✔️ | ❔ |
Unreal Engine | ✔️ | ❌ | ❌ | 4.19-4.23, 5.0-5.3 | ❌ | ✔️ | ❔ |
Blender | ✔️ | ❌ | ✔️ | 2.8-4.2 | ❔ | ✔️ | ❔ |
Blender (Background) | ✔️ | ❔ | 3.1-4.2 | ❔ | ✔️ | ❔ | |
Katana | ✔️ | ❌ | ❌ | 7 | ❔ | ✔️ | ❔ |
3ds Max | ✔️ | ❌ | ❌ | 2018-2020 | ❔ | ✔️ | ❔ |
Substance Painter | ✔️ | ✔️ | ❌ | 8.3 | ✔️ | ✔️ | ❔ |
Substance Designer | ✔️ | ✔️ | ❌ | 2019.3, 7.1, 12.3 | ✔️ | ✔️ | ❔ |
Blackmagic Fusion | ✔️ | ❌ | ❌ | 9 | ❔ | ✔️ | ❔ |
CryEngine Sandbox | ✔️ | ❌ | ❌ | 5.7 | ❔ | ✔️ | ❔ |
Standalone Python | ✔️ | 2.7 (Qt4), 3.7-3.9 (Qt5) | ❔ | ✔️ | ❔ | ||
RenderDoc | ✔️ | ❌ | ❌ | 1.33 | ❔ | ✔️ | ❔ |
* Hover over underlined fields to see any extra details/issues.
Certain Windows applications have dispatch based COM interface, which will allow a link between Python and the application. See photoshop-scripting-python for an example on how to connect to an application.
Currently there is no way of launching VFXWindow
from inside these applications.