Skip to main content

Python Qt components for building custom USD tools.

Project description

USD-QtPy PyPI - Version

Python Qt components for building custom USD tools.

How to use?

The Qt components can be embedded in your own Qt interfaces and usually have a stage entrypoint that you should pass a pxr.Usd.Stage instance.

However, a simple example Editor UI is also available to run standalone.

USD Editor

If you have the usd_qtpy package you can for example run it like:

python -m usd_qtpy "/path/to/file.usd"

Want to try it within your running Python session it should be as trivial to do:

from pxr import Usd
from qtpy import QtWidgets
from usd_qtpy.editor import EditorWindow

filepath = "/path/to/file.usd"
stage = Usd.Stage.Open(filepath)

app = QtWidgets.QApplication()
dialog = EditorWindow(stage=stage)
dialog.resize(600, 600)
dialog.show()
app.exec_()

Or if you have a running QApplication instance (e.g. when inside Maya):

from pxr import Usd
from usd_qtpy.editor import EditorWindow

filepath = "/path/to/file.usd"
stage = Usd.Stage.Open(filepath)

dialog = EditorWindow(stage=stage)
dialog.resize(600, 600)
dialog.show()

Why not Luma Picture's usd-qt?

Unlike Luma Pictures's usd-qt this repository tries to be easily redistributable by avoiding the need for extra C++ dependencies and solely use the USD Python API. This will keep the build matrix simpler but does mean the repository is not - by design - built for highly optimized large scale applications. Nonetheless, the intent is still to be able to carry average VFX scenes for debugging.

install

from pip

python -m pip install usd-qtpy

from repo

python -m pip install git+https://github.com/BigRoy/usd-qtpy.git@main

Dependencies

The Viewer utilities are basically using usdviewq which may or may not be included in your build. This also requires PyOpenGL. However, the other tools do not and are intended to rely solely on USD core and Qt itself.

  • qtpy
  • usd-core (when not using your own usd builds, install with [usd])
  • PyOpenGL (needed for usd viewport, install with [usdview]; you will still need use a custom usd build yourself for pxr.Usdviewq dependency)

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

usd-qtpy-0.0.3.tar.gz (8.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usd_qtpy-0.0.3-py3-none-any.whl (8.4 MB view details)

Uploaded Python 3

File details

Details for the file usd-qtpy-0.0.3.tar.gz.

File metadata

  • Download URL: usd-qtpy-0.0.3.tar.gz
  • Upload date:
  • Size: 8.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for usd-qtpy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 dcea4c291e062125713460ae2eaf367f5bf562b3e71af7d374146ab24afbbb1e
MD5 c5a01a76cd3de0b6ae381782a4278efd
BLAKE2b-256 ff3ae1921aa001d313ce02c3bc25d021d498b60455d5a825de230d78f940a9c0

See more details on using hashes here.

File details

Details for the file usd_qtpy-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: usd_qtpy-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for usd_qtpy-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3db52b93006719f518e081ef79df9a9eb74dece37960e64eaee43e53ecd632cc
MD5 986cc48a7ee93a9316c51828b0e32963
BLAKE2b-256 7d738ff7d73c2e9ebf3bac841fff0c0967f3ea2ed9e7bf1cdad168a6c4df08b2

See more details on using hashes here.

Supported by

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