Skip to main content

Qt window class for designing tools to be compatible between multiple VFX programs.

Project description

VFXWindow

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. Maya, Nuke, 3DS Max, Houdini, Blender, Substance Designer and Unreal are currently supported, though any help to extend those would be appreciated, as well as support for any other applications.

Basic Example:

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.maya:
            self.addCallbackScene('kAfterNew', self.newScene, group='sceneNewCallbacks')
        elif self.nuke:
            self.addCallbackOnCreate(self.newScene, nodeClass='Root', group='sceneNewCallbacks')

if __name__ == '__main__':
    MyWindow.show()

Compatibility

  • Maya (2011-2016, tested lightly on 2016) - standard, docked (pymel.core.dockControl), standalone, callbacks
  • Maya (2017+, tested on 2017-2019) - standard, docked (pymel.core.workspaceControl), dialog (pymel.core.layoutDialog, buggy), standalone, callbacks
  • Nuke (tested on 9 and 10) - standard, docked (nukescripts.panels), callbacks
  • Substance Designer (tested on 2019.3) - standard, docked (unable to save/load position), dialog
  • 3D Studio Max (2018+, tested on 2020) - standard
  • Houdini (tested on 16) - standard
  • Blender (tested in 2.80) - standard, callbacks
  • Unreal (4.19+, tested in 4.23) - standard
  • Standalone (Qt4, Qt5, tested in 2.7, 3.4+) - standard

Generic Features

  • Automatically save/restore window position
  • Move window to screen if out of bounds (windows only)
  • Keep track of callbacks to remove groups if required, and clean up on window close
  • Keep track of signals to remove groups if required
  • Display a popup message that forces control
  • Set palette to that of another program
  • Auto close if opening a duplicate window
  • Close down all windows at once

Maya Features

  • Dock window using workspaceControl
  • Dialog window using layoutDialog
  • Save/restore position of workspaceControl window (floating+docked)
  • Easy access to callbacks

Nuke Features

  • Dock window as a panel
  • Save/restore location of panel (docked only)
  • Easy access to callbacks

Blender Features

  • Easy access to callbacks

Substance Features

  • Dock window into panels
  • Dialog window

Special Thanks

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vfxwindow-1.4.4.tar.gz (53.8 kB view details)

Uploaded Source

File details

Details for the file vfxwindow-1.4.4.tar.gz.

File metadata

  • Download URL: vfxwindow-1.4.4.tar.gz
  • Upload date:
  • Size: 53.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

File hashes

Hashes for vfxwindow-1.4.4.tar.gz
Algorithm Hash digest
SHA256 3e7d619997cdeac982d8ba8a75790def95772153da0a5f1a5ff4d3e756e13b0a
MD5 1aa3c1ae68a437d32513c63ba4c03a9d
BLAKE2b-256 f5c9c669e61347631eaab5a11a15df5458f696c44e9eba11360c0850b9ad2471

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page