Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6c276c4

Browse files
committedSep 28, 2022
[BUG] ensure app temp dir exists before loading sources
[BUG] only set selection clipboard on OS that supports it [ENH] display absolute path to program in about dialog [ENH] theme/icon support, add missing icons, move off django icons [EHN] Rewrite file parsers to move read/write logic out of init [MNT] rm deprecated -dark flag [MNT] better defaults for diff and text editor on Windows [DOC] clarify install instructions Signed-off-by: mds-dwa <mark.sandell@dreamworks.com>
1 parent f5d3ee8 commit 6c276c4

15 files changed

+859
-495
lines changed
 

‎README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ USD Manager is an open-source, python-based Qt tool for browsing, managing, and
99
combining the best features from your favorite web browser and text editor into one application, with hooks to deeply
1010
integrate with other pipeline tools. It is developed and maintained by [DreamWorks Animation](http://www.dreamworksanimation.com)
1111
for use with USD and other hierarchical, text-based workflows, primarily geared towards feature film production. While
12-
primarily designed around PyQt4, USD Manager uses the Qt.py compatibility library to allow working with PyQt4, PyQt5,
12+
originally designed around PyQt4, USD Manager uses the Qt.py compatibility library to allow working with PyQt4, PyQt5,
1313
PySide, or PySide2 for Qt bindings.
1414

1515
![USD Manager screenshot](docs/_static/screenshot_island.png?raw=true "USD Manager")
@@ -42,8 +42,14 @@ Installing USD Manager
4242
Requirements
4343
------------
4444

45-
usdmanager requires Python 2, [Qt.py](https://github.com/mottosso/Qt.py) and [setuptools](https://github.com/pypa/setuptools)
46-
(can be handled by setup.py), and one of Qt.py's 4 supported Qt bindings, which will need to be installed separately.
45+
usdmanager requires [Python](https://www.python.org/) 2 (for Python 3, see the
46+
[python3 branch](https://github.com/dreamworksanimation/usdmanager/tree/python3)),
47+
[Qt.py](https://github.com/mottosso/Qt.py) and [setuptools](https://github.com/pypa/setuptools)
48+
(can be handled by setup.py), and one of Qt.py's four supported Qt bindings, which will need to be installed separately.
49+
50+
Additionally, an installation of [USD](https://graphics.pixar.com/usd) itself is recommended but not required for all use cases.
51+
Installing USD provides access to file path resolvers, non-ASCII USD formats, and plug-ins like usdview.
52+
All USD versions should be supported.
4753

4854
Install with setup.py
4955
---------------------
@@ -58,7 +64,7 @@ For a personal install, try:
5864
python setup.py install --user
5965
```
6066

61-
Studios with significant python codebases or non-trivial installs may need to customize setup.py
67+
Studios with significant python codebases or non-trivial installs may need to customize [setup.py](setup.py).
6268

6369
Your PATH and PYTHONPATH will need to be set appropriately to launch usdmanager,
6470
and this will depend on your setup.py install settings.

‎docs/development.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ Supported keys include:
2424
- **appURL _(str)_** - Documentation URL. Defaults to the public GitHub repository.
2525
- **defaultPrograms _({str: str})_** - File extension keys with the command to open the file type as the values.
2626
- **diffTool _(str)_** - Diff command. Defaults to xdiff.
27-
- **iconTheme _(str)_** - QtGui.QIcon theme name. Defaults to crystal_project.
27+
- **iconTheme _(str)_** - QtGui.QIcon theme name. Defaults to crystal_project. Can be overridden by iconThemes for a
28+
specific app theme.
29+
- **iconThemes _(dict)_** - QtGui.QIcon theme name to use per theme the app supports ("light" and "dark")
2830
- **textEditor _(str)_** - Text editor to use when opening files externally if $EDITOR environment variable is
2931
not set. Defaults to nedit.
3032
- **themeSearchPaths _([str])_** - Paths to prepend to QtGui.QIcon's theme search paths.
@@ -43,7 +45,10 @@ Example app config JSON file:
4345
"tx": "rez-run openimageio_arras -- iv"
4446
},
4547
"diffTool": "python /usr/bin/meld",
46-
"iconTheme": "gnome",
48+
"iconThemes": {
49+
"light": "crystal_project",
50+
"dark": "gnome"
51+
},
4752
"textEditor": "gedit",
4853
"themeSearchPaths": []
4954
}
@@ -117,13 +122,13 @@ class CustomExample(Plugin):
117122

118123
## Icons
119124

120-
Most icons in the app come from themes pre-installed on your system, ideally following the
125+
Some icons in the app come from themes pre-installed on your system, ideally following the
121126
[freedesktop.org standards](https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html).
122127
The preferred icon set that usdmanager was originally developed with is Crystal Project Icons. These icons are licensed
123-
under LGPL and available via pypi and GitHub here: https://github.com/ambv/django-crystal-small. While not required for
124-
the application to work, if you would like these icons to get the most out of the application, please install them to a
125-
directory named crystal_project under one of the directories listed by `Qt.QtGui.QIcon.themeSearchPaths()` (e.g.
126-
/usr/share/icons/crystal_project).
128+
under LGPL and available via PyPI and GitHub here: https://github.com/mds-dwa/crystal-small. While not required for
129+
the application to work, if you would like these icons to get the most out of the application, please ensure crystal-small
130+
is installed via pip (already part of the default setup) or install them to a directory named crystal_project under one
131+
of the directories listed by `Qt.QtGui.QIcon.themeSearchPaths()` (e.g. /usr/share/icons/crystal_project).
127132

128133
Additional icons for custom plug-ins can be placed in the plugins directory and then added to the
129134
[usdmanager/plugins/images.qrc](https://github.com/dreamworksanimation/usdmanager/blob/master/usdmanager/plugins/images.qrc) file. After adding a file to images.rc, run the

‎docs/installation.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ have not been as heavily tested. Notes to help with installation on specific ope
1616
- [Common Problems](#common-problems)
1717

1818
## Prerequisites
19-
- Install Python 2 ([https://www.python.org/downloads/](https://www.python.org/downloads/))
19+
- Install Python 2 ([https://www.python.org/downloads/](https://www.python.org/downloads/)), or 3 if on the python3 branch.
2020
* **Windows:** Ensure the install location is part of your PATH variable (newer installs should have an option for this)
2121
- Install one of the recommended Python Qt bindings
2222
* **Python 2:** PyQt4 or PySide
23+
* **Python 3:** PyQt5 or PySide2, example:
24+
```
25+
pip install PySide2
26+
```
2327
2428
## Install with setup.py
2529
@@ -65,23 +69,20 @@ and this will depend on your setup.py install settings.
6569
3. Customize usdmanager/config.json if needed.
6670
4. Run ```python setup.py install``` (may need the ```--user``` flag)
6771
68-
If setup.py complains about missing setuptools, you can install it via pip. If you installed a new enough python-2 version, pip should already be handled for you, but you may still need to add it to your PATH. pip should already live somewhere like this (C:\Python27\Scripts\pip.exe), and you can permanently add it to your environment with: ```setx PATH "%PATH%;C:\Python27\Scripts"```
72+
If setup.py complains about missing setuptools, you can install it via pip. If you installed a new enough python version, pip should already be handled for you, but you may still need to add it to your PATH. pip should already live somewhere like this (C:\Python27\Scripts\pip.exe or C:\Users\username\AppData\Local\Microsoft\WindowsApps\pip.exe), but if needed, you can permanently add it to your environment with this (adjusting the path as needed): ```setx PATH "%PATH%;C:\Python27\Scripts"```
6973
7074
1. Upgrade pip if needed
7175
1. Launch Command Prompt in Administrator mode
7276
2. Run ```pip install pip --upgrade``` (may need the ```--user``` flag)
7377
2. Install setuptools if needed
7478
1. Run ```pip install setuptools```
7579
3. Re-run the setup.py step above for usdmanager
76-
4. If you don't modify your path, you should now be able to run something like this to launch the program: ```python C:\Python27\Scripts\usdmanager```
80+
4. If you don't modify your path, you should now be able to run something like this to launch the program: ```python C:\Python27\Scripts\usdmanager``` or from the install directory itself, e.g. ``` python .\build\scripts-3.8\usdmanager```
7781
7882
#### Known Issues
79-
- Drive letter may show doubled-up in address bar (e.g. C:C:/my_file.txt)
83+
- Since this is not installed as an entirely self-contained package, the application name (and icon) will by Python, not USD Manager.
8084
8185
## Common Problems
82-
- Missing icons (may still be missing some even after this!)
83-
* ```pip install django-crystal-small``` (this also installs django by default, which you may not want)
84-
* Add installed path to your downloaded usdmanager/config.json file, then re-run the setup.py install. You'll need a line similar to this in your config.json: ```"themeSearchPaths": ["C:\\Python27\\Lib\\site-packages\\django_crystal_small\\static\\crystal"]```
8586
- Can't open files in external text editor
86-
* In Preferences, try setting your default text editor
87-
* **Windows:** Try ```notepad.exe``` or ```"C:\Windows\notepad.exe"``` (including the quotation marks)
87+
* In Preferences, update your default text editor
88+
* **Windows:** Try ```notepad```, ```notepad.exe```, or ```"C:\Windows\notepad.exe"``` (including the quotation marks on that last one)

‎setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
data_files=[("usdmanager", ["usdmanager/usdviewstyle.qss"])],
6969
scripts=glob("scripts/*"),
7070
install_requires=[
71+
"crystal_small", # Default icons
7172
"Qt.py>=1.1",
7273
"setuptools", # For pkg_resources
7374
],
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Please sign in to comment.