usd-qtpy


Nameusd-qtpy JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryPython Qt components for building custom USD tools.
upload_time2023-12-04 14:33:10
maintainer
docs_urlNone
authorBigRoy, Hannes
requires_python>=3.8
licenseMIT License Copyright (c) 2023 Colorbleed B.V. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords usd qt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # USD-QtPy ![PyPI - Version](https://img.shields.io/pypi/v/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.

![USD Editor](/assets/images/editor_screenshot.png "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: 

```python
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):

```python
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`](https://github.com/LumaPictures/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)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "usd-qtpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "usd,qt",
    "author": "BigRoy, Hannes",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/ff/3a/e1921aa001d313ce02c3bc25d021d498b60455d5a825de230d78f940a9c0/usd-qtpy-0.0.3.tar.gz",
    "platform": null,
    "description": "# USD-QtPy ![PyPI - Version](https://img.shields.io/pypi/v/usd-qtpy)\n\n\nPython Qt components for building custom USD tools.\n\n\n#### How to use?\n\nThe Qt components can be embedded in your own Qt interfaces and usually have\na `stage` entrypoint that you should pass a `pxr.Usd.Stage` instance.\n\nHowever, a simple example Editor UI is also available to run standalone.\n\n![USD Editor](/assets/images/editor_screenshot.png \"USD Editor\")\n\nIf you have the `usd_qtpy` package you can for example run it like:\n\n```\npython -m usd_qtpy \"/path/to/file.usd\"\n```\n\nWant to try it within your running Python session it should be as trivial to\ndo: \n\n```python\nfrom pxr import Usd\nfrom qtpy import QtWidgets\nfrom usd_qtpy.editor import EditorWindow\n\nfilepath = \"/path/to/file.usd\"\nstage = Usd.Stage.Open(filepath)\n\napp = QtWidgets.QApplication()\ndialog = EditorWindow(stage=stage)\ndialog.resize(600, 600)\ndialog.show()\napp.exec_()\n```\n\nOr if you have a running `QApplication` instance (e.g. when inside Maya):\n\n```python\nfrom pxr import Usd\nfrom usd_qtpy.editor import EditorWindow\n\nfilepath = \"/path/to/file.usd\"\nstage = Usd.Stage.Open(filepath)\n\ndialog = EditorWindow(stage=stage)\ndialog.resize(600, 600)\ndialog.show()\n```\n\n#### Why not Luma Picture's `usd-qt`?\n\nUnlike [Luma Pictures's  `usd-qt`](https://github.com/LumaPictures/usd-qt) this repository tries to be easily \nredistributable by avoiding the need for extra C++ dependencies and solely\nuse the USD Python API. This will keep the build matrix simpler but does mean\nthe repository is not - by design - built for highly optimized large scale \napplications. Nonetheless, the intent is still to be able to carry average VFX \nscenes for debugging.\n\n\n\n## install \n### from pip\n```\npython -m pip install usd-qtpy\n```\n### from repo\n```\npython -m pip install git+https://github.com/BigRoy/usd-qtpy.git@main\n```\n\n\n## Dependencies\n\nThe Viewer utilities are basically using `usdviewq` which may or may not\nbe included in your build. This also requires `PyOpenGL`. However, the other\ntools do not and are intended to rely solely on USD core and Qt itself.\n\n- qtpy \n- usd-core (when not using your own usd builds, install with `[usd]`)\n- PyOpenGL (needed for usd viewport, install with `[usdview]`; you will still need use a custom `usd` build yourself for `pxr.Usdviewq` dependency)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Colorbleed B.V.   Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Python Qt components for building custom USD tools.",
    "version": "0.0.3",
    "project_urls": {
        "Documentation": "https://github.com/BigRoy/usd-qtpy",
        "Homepage": "https://github.com/BigRoy/usd-qtpy",
        "Issues": "https://github.com/BigRoy/usd-qtpy/issues"
    },
    "split_keywords": [
        "usd",
        "qt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7d738ff7d73c2e9ebf3bac841fff0c0967f3ea2ed9e7bf1cdad168a6c4df08b2",
                "md5": "986cc48a7ee93a9316c51828b0e32963",
                "sha256": "3db52b93006719f518e081ef79df9a9eb74dece37960e64eaee43e53ecd632cc"
            },
            "downloads": -1,
            "filename": "usd_qtpy-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "986cc48a7ee93a9316c51828b0e32963",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8392568,
            "upload_time": "2023-12-04T14:33:08",
            "upload_time_iso_8601": "2023-12-04T14:33:08.079829Z",
            "url": "https://files.pythonhosted.org/packages/7d/73/8ff7d73c2e9ebf3bac841fff0c0967f3ea2ed9e7bf1cdad168a6c4df08b2/usd_qtpy-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ff3ae1921aa001d313ce02c3bc25d021d498b60455d5a825de230d78f940a9c0",
                "md5": "c5a01a76cd3de0b6ae381782a4278efd",
                "sha256": "dcea4c291e062125713460ae2eaf367f5bf562b3e71af7d374146ab24afbbb1e"
            },
            "downloads": -1,
            "filename": "usd-qtpy-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "c5a01a76cd3de0b6ae381782a4278efd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8939643,
            "upload_time": "2023-12-04T14:33:10",
            "upload_time_iso_8601": "2023-12-04T14:33:10.783562Z",
            "url": "https://files.pythonhosted.org/packages/ff/3a/e1921aa001d313ce02c3bc25d021d498b60455d5a825de230d78f940a9c0/usd-qtpy-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-04 14:33:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BigRoy",
    "github_project": "usd-qtpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "usd-qtpy"
}
        
Elapsed time: 0.15727s