• This repository has been archived on 20/Aug/2023
  • Stars
    star
    158
  • Rank 231,611 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A boilerplate for creating PySide/PyQt or PySide2/PyQt5 applications running inside of Maya, Nuke and standalone - using Python 2 or 3.

pyvfx-boilerplate

Tests PyPI

A boilerplate for creating PyQt4/PySide and PyQt5/PySide2 applications running in Maya, Nuke, Blender, 3DS Max, Houdini, Unreal Engine or completely standalone.

Documentation

Version 3.x

  • The entire boilerplate was re-written so it could be packaged and distributed with PyPi.
  • Adding Blender, 3DS Max, Houdini, and Unreal Engine support.

For details, see CHANGELOG.md.

Noteworthy known issues

  • Does not work with Nuke 10.0v1 on OS X: #7
  • Maya palette glitchy in standalone mode with PySide/PyQt4 on OS X (disabled by default): #9
  • Window will not stay on top of Nuke (OS X) without Qt.Tool or Qt.WindowStaysOnTopHint: #12

Installation

Easy way:

pip install pyvfx-boilerplate

Long way:

git clone https://github.com/fredrikaverpil/pyvfx-boilerplate.git
cd pyvfx-boilerplate
python setup.py sdist bdist_wheel
pip install dist/*

Example usage

Pip installs a program named pyvfx-boilerplate as an example Run as standalone: (you may need to additionally install PyQt4, PyQt5, PySide or PySide2 for standalone to work depending on your system configuration)

pyvfx-boilerplate

Run in script editor of Maya or Nuke:

import sys
sys.path.append('/path/to/pyvfx-boilerplate')
from pyvfx_boilerplate import boilerplate_ui
bpr = boilerplate_ui.BoilerplateRunner()
bpr.run_main()

Modifying the boilerplate

  • See inheritance example above

Development guidelines

Since the boilerplate relies on Qt.py, you should design your application as if you were designing it for PyQt5/PySide2. This means creating widgets using QtWidgets rather than QtGui. The Qt.py module takes care of the remapping and makes for compatibility with PyQt4/PySide. Read more over at the Qt.py repository.

Tip: when you cannot rely on Qt.py, create an issue (probably over at Qt.py) and/or detect which binding is being used and write some custom code:

from Qt import QtCompat

if QtCompat.__binding__ in ('PyQt4', 'PySide'):
    # Do something if PyQt4 or PySide is used

if QtCompat__binding.startswith('PySide'):
    # Do something if PySide or PySide2 is used

if QtCompat__binding == 'PySide2':
    # Do something if PySide2 is used

Issues

Something wrong, have a question or wish to file a feature request?

Open up an issue here!

Contribute

If you wish to contribute, pull requests are more than welcome!

More Repositories

1

creosote

Identify unused dependencies and avoid a bloated virtual environment.
Python
292
star
2

pyside2-wheels

Unofficial PySide2 wheel building with Travis CI and AppVeyor
Roff
40
star
3

oiio-python

OpenImageIO Python 3.x package
C++
34
star
4

pyVFX-viewer

An image viewer aimed towards the VFX industry.
Python
30
star
5

dotfiles

Lua
27
star
6

photography

Fujifilm camera profiles and presets.
27
star
7

pyside2-windows

Unoffical PySide2 standalone wheels for Windows
23
star
8

maya-scripts

Code snippets and scripts for Autodesk Maya.
Python
14
star
9

nuke-scripts

Code snippets and scripts for The Foundry's Nuke.
Python
13
star
10

tractor-docker

Run Pixar's Tractor in Docker container(s)
11
star
11

flickrdumpr

Downloads all of your flickr albums (original photo/video files). Requires Python 2.7 with the flickrapi module.
Python
9
star
12

fredrikaverpil.github.io

My personal blog
Mathematica
9
star
13

vcpython27

[DEPRECATED] Chocolatey package for Microsoft Visual C++ Compiler Package for Python 2.7
PowerShell
9
star
14

pyside2-linux

Unoffical PySide2 standalone wheels for Linux
Roff
8
star
15

searchReplace

Search (and replace) in text files
Python
5
star
16

sqlc-python-demo

sqlc python demo
Python
5
star
17

tree-tools

Python scripts for analyzing and processing files in a directory tree
Python
4
star
18

tractor-purge

Purge jobs and task logs from Pixar's Tractor to avoid running out of disk space
Python
3
star
19

saltstack-docker

Saltstack running in CentOS 7 Docker container
SaltStack
3
star
20

Qt.py-vendoring

Example project showcasing how to vendor Qt.py
Python
3
star
21

vscode-material-theme

Material Theme
3
star
22

mylittleci

A Python project template with focus on CI 🍭
Python
3
star
23

hatch-playground

https://fredrikaverpil.github.io/hatch-playground
2
star
24

setup-pipx

Pipx setup for GitHub Actions
2
star
25

sandbox-docker

Quickly get up and running with testing/experimental Linux environment
2
star
26

sqlalchemy-orm

Python
1
star
27

python-scripts

Personal pastebin of Python code snippets that most likely need a nice GUI...
Python
1
star
28

go-api-std

Go APIs using as much of the standard library as possible.
Go
1
star
29

pyExe

Turn Python script into .exe file (using py2exe) and then have the .exe launch another Python script.
Python
1
star
30

fastapi-websockets

Python
1
star
31

maya-renderscript

Render script consolidator
1
star
32

jugs

Jupyter Notebook with Google Compute Storage access
1
star
33

python-rust

Python
1
star
34

gha-labs

Mad experiments with GitHub Actions
1
star
35

pyside2-macos

Unoffical PySide2 standalone wheels for macOS
1
star