Python Qt components for building custom USD tools.
Project description
USD-QtPy
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.
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 customusd
build yourself forpxr.Usdviewq
dependency)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file usd-qtpy-0.0.1.tar.gz
.
File metadata
- Download URL: usd-qtpy-0.0.1.tar.gz
- Upload date:
- Size: 33.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
11a8bb1fdf3a93e027003d412d4a3f45d574db1502c6389f417d82670e2b05dd
|
|
MD5 |
36d53c20cf90715d6f83c8d87d0baac0
|
|
BLAKE2b-256 |
fd2ba24901045f571b067b9aff87ab9f6082a0d62912e75421ae7d0e500ec861
|
File details
Details for the file usd_qtpy-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: usd_qtpy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 39.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
adb825fd791b29f7e947145840a339d2b0115fa520adf4158af10ff3c4e37589
|
|
MD5 |
cfb3b4ef1d7684d37adc3b613ddd02a3
|
|
BLAKE2b-256 |
d4f93152e1857e829f718aa04d34876503c2044e5df9dd8688cd28a4a0b65513
|