Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-adopt pydot #40

Merged
merged 67 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
4adbfca
readopt pydot
chrizzFTD Aug 18, 2024
172692f
update dependencies to pydot instead of pygraphviz
chrizzFTD Aug 19, 2024
add46d3
networkx requires python-3.10+, drop python-3.9
chrizzFTD Aug 19, 2024
44b7921
usd-core support for python-3.10 starts at 23.2
chrizzFTD Aug 19, 2024
63d2606
update RTD python
chrizzFTD Aug 19, 2024
984a5cd
remove pygraphviz install steps
chrizzFTD Aug 19, 2024
9506d90
grill.names intersphinx mapping lost popup for hoverxref, test settin…
chrizzFTD Aug 19, 2024
5feac89
link updated grill-names for intersphinx inventory
chrizzFTD Aug 19, 2024
f7e37b2
Revert "link updated grill-names for intersphinx inventory"
chrizzFTD Aug 19, 2024
1a8a958
restore grill.names intersphinx inventory
chrizzFTD Aug 19, 2024
c922a7a
track down change from intersphinx that broke hoverxref
chrizzFTD Aug 19, 2024
42a1678
remove pygraphviz
chrizzFTD Sep 14, 2024
ab8db52
dependencies and usd 24.11 build conda recipe
chrizzFTD Oct 26, 2024
7b11572
updating python-3.13 classifiers
chrizzFTD Oct 26, 2024
e9f6e36
update maya pip link to 2025 docs
chrizzFTD Oct 26, 2024
2ddeaa0
maya still does not bring qtcharts
chrizzFTD Oct 26, 2024
bb6ee30
Maya-2025 uses Qt6 and PySide6
chrizzFTD Oct 26, 2024
14327fd
minor spawn_many doc update
chrizzFTD Nov 3, 2024
491cef1
note that PySide6 is supported
chrizzFTD Nov 3, 2024
b8e27c0
adding clear and block attribute context menus
chrizzFTD Nov 4, 2024
77ff7d2
improve UX with Clear by enabling it only when it'd perform an action
chrizzFTD Nov 6, 2024
4f281c9
add test for creating many assets in an in-memory stage (with an empt…
chrizzFTD Nov 8, 2024
81ea3f8
first pass at updating test coverage
chrizzFTD Nov 9, 2024
e6d33be
itaxa iterates over existing taxons.
chrizzFTD Nov 9, 2024
13e8819
extend error message
chrizzFTD Nov 9, 2024
1272a64
skip few tests, see what the damage is
chrizzFTD Nov 9, 2024
7d9df1e
more adjustments
chrizzFTD Nov 9, 2024
7c48733
remove unrequried code
chrizzFTD Nov 9, 2024
e57f983
start cleaning views test
chrizzFTD Nov 9, 2024
cb8ccd0
slight more cleanup
chrizzFTD Nov 9, 2024
85e30a2
no need to provide active_plugs as _Node argument
chrizzFTD Nov 17, 2024
58915cc
plugs are resolved internally by the graph viewer
chrizzFTD Nov 17, 2024
678476d
adding mini test bed
chrizzFTD Nov 17, 2024
ab290f9
small adjustment to Node label management
chrizzFTD Nov 17, 2024
e7b063b
first pass at test views cleanup. see damage in CI
chrizzFTD Nov 17, 2024
c652899
fix test for PySide2
chrizzFTD Nov 17, 2024
4ccbf15
test nested path in spawn_many
chrizzFTD Dec 7, 2024
7ebc100
adding singledispatch typeerror test
chrizzFTD Dec 7, 2024
afe1c0b
test color editor for invalid primvar
chrizzFTD Dec 7, 2024
539db43
remove graphviz dll load on DCCs
chrizzFTD Dec 7, 2024
a333e96
edge label graph and invis node test
chrizzFTD Dec 7, 2024
db88a66
properly test paths with variants for content browser
chrizzFTD Dec 7, 2024
e0ae5b6
update mini grpah dot with edge label
chrizzFTD Dec 7, 2024
84b711e
updated mini graph svg
chrizzFTD Dec 7, 2024
2d7888c
tests for invalid data
chrizzFTD Dec 8, 2024
1c92551
cover last graph tests
chrizzFTD Dec 8, 2024
d080bb9
remove outdated code
chrizzFTD Dec 8, 2024
4307720
minor wording and cleanup
chrizzFTD Dec 8, 2024
aa51d52
minor version update
chrizzFTD Dec 8, 2024
917d463
disable autodoc_typehints
chrizzFTD Dec 8, 2024
43669ba
singledispatched functions are documented now, no need for overload
chrizzFTD Dec 8, 2024
b826b41
type union fetch_stage
chrizzFTD Dec 8, 2024
6150a25
type annotate edit_context
chrizzFTD Dec 8, 2024
2c09055
remove type annotation from variant set edit context. is this a bug w…
chrizzFTD Dec 8, 2024
66f1176
small update to test graph and word fix when pydot is not present
chrizzFTD Dec 8, 2024
6d4df18
add environment marker for networkx in python<=3.9
chrizzFTD Dec 9, 2024
6dfff31
keep ptyhon-3.9 in ci
chrizzFTD Dec 9, 2024
58e0f4a
wrap python_version in quotes
chrizzFTD Dec 9, 2024
e3f9167
minimum usd is 21.11
chrizzFTD Dec 9, 2024
4bf2936
use SVGViewer for connections with networkx==2
chrizzFTD Dec 9, 2024
1e8d903
add plugs in connection viewer
chrizzFTD Dec 9, 2024
e74af59
add py3.9 back in classifiers
chrizzFTD Dec 13, 2024
37cabe3
test port existence in connection view
chrizzFTD Dec 13, 2024
b7c3fa0
input.GetBaseName
chrizzFTD Dec 13, 2024
5171a88
updated views._graph.Node internals to use port instead of plug
chrizzFTD Dec 13, 2024
98e396d
formatting and comment
chrizzFTD Dec 14, 2024
eca9738
fix GrillAttributeClearMenuItem for USD-21.11
chrizzFTD Dec 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.12"]
python-version: ["3.9", "3.10", "3.12"]
include:
- python-version: "3.9"
install-arguments: ". PySide2 usd-core==22.5 PyOpenGL pygraphviz"
install-arguments: ". PySide2 usd-core==21.11 PyOpenGL" # 21.11 enables AR-2.0 by default
- python-version: "3.10"
install-arguments: ". PySide2 usd-core==23.2 PyOpenGL"
- python-version: "3.12"
install-arguments: ".[full]"
steps:
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2 # required for PY39+
build:
os: ubuntu-20.04
tools:
python: "3.9"
python: "3.10"
apt_packages:
- "graphviz"

Expand Down
37 changes: 19 additions & 18 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,23 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.graphviz',
"myst_parser",
'sphinx_copybutton',
'sphinx_toggleprompt',
'sphinx_togglebutton',
'sphinx_inline_tabs',
'hoverxref.extension',
'sphinx.ext.autosectionlabel',
'sphinx_autodoc_typehints']
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.graphviz',
"myst_parser",
'sphinx_copybutton',
'sphinx_toggleprompt',
'sphinx_togglebutton',
'sphinx_inline_tabs',
'hoverxref.extension',
'sphinx.ext.autosectionlabel',
]

# Offset to play well with copybutton
toggleprompt_offset_right = 35
Expand Down Expand Up @@ -103,9 +104,9 @@
# built documents.
#
# The short X.Y version.
version = '0.17'
version = '0.18'
# The full version, including alpha/beta/rc tags.
release = '0.17.1'
release = '0.18.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
89 changes: 8 additions & 81 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ DCC apps and other environments bundle them outside of ``pip``. To include them,

.. tab:: Maya

Visit the `official docs <https://help.autodesk.com/view/MAYAUL/2022/ENU/?guid=GUID-72A245EC-CDB4-46AB-BEE0-4BBBF9791627>`_ for more details.
Visit the `official docs <https://help.autodesk.com/view/MAYAUL/2025/ENU/?guid=GUID-72A245EC-CDB4-46AB-BEE0-4BBBF9791627>`_ for more details.

.. code-block:: bash

Expand All @@ -46,7 +46,7 @@ Extra Dependencies

The following optional dependencies should be installed separately.

- `graphviz <http://graphviz.org/>`_ and `pygraphviz`_ for graph widgets. See conda example below for instructions.
- `graphviz`_ for graph widgets. See conda example below for instructions.
- `usdview <https://openusd.org/release/toolset.html#usdview>`_
(hopefully will be available soon via `pypi <https://pypi.org/>`_). In the meantime, it can be built from USD source
(`conda recipe <https://github.com/PixarAnimationStudios/USD/issues/1260#issuecomment-656985888>`_).
Expand All @@ -69,11 +69,11 @@ walk-through on how to start using ``The Grill`` tools with a fresh
2. Launch `Anaconda Prompt <https://docs.anaconda.com/anaconda/user-guide/getting-started/#open-anaconda-prompt>`_
(it came as part of the `miniconda`_ installation).

3. Create a new ``conda`` environment with ``python=3.9``, for example:
3. Create a new ``conda`` environment with ``python=3.10``, for example:

.. code:: PowerShell

(base) C:\>conda create -n grilldemo01 python=3.9
(base) C:\>conda create -n grilldemo01 python=3.10

4. Activate that environment:

Expand All @@ -88,84 +88,11 @@ walk-through on how to start using ``The Grill`` tools with a fresh

(grilldemo01) C:\>python -m pip install grill[full]

6. If missing, (optionally) install `pygraphviz`_ via ``conda``:
6. If missing, (optionally) install `graphviz`_ via ``conda``:

.. warning::

At the moment, installing `pygraphviz`_ can be tricky. Hopefully a simpler pip+wheel based solution comes with `pygraphviz#167 <https://github.com/pygraphviz/pygraphviz/issues/167>`_.

Versions older than ``pip-23.3.2`` may have trouble installing `pygraphviz`_ in Windows for DCCs like ``Maya`` and ``Houdini``.
If you come through this trouble, visit `pygraphviz#468 <https://github.com/pygraphviz/pygraphviz/pull/468>`_ and try to install with this exact particular version of ``pip``.
The below tests ran successfully with ``Maya-2024`` and ``Houdini-20.0`` on ``Windows-10`` and ``pip-23.3.2``.

The current ``pip`` version can be extracted like so:

.. tab:: Standalone Python

.. code:: PowerShell

python -m pip -V

.. tab:: Houdini

.. code:: PowerShell

hython -m pip -V

.. tab:: Maya

.. code:: PowerShell

mayapy -m pip -V

To update to ``23.3.2``, update the interpreter command to run:

.. tab:: Standalone Python

.. code:: PowerShell

python -m pip install -U pip==23.3.2

.. tab:: Houdini

.. code:: PowerShell

hython -m pip install -U pip==23.3.2

.. tab:: Maya

.. code:: PowerShell

mayapy -m pip install -U pip==23.3.2

.. tab:: Standalone Python

Replace ``--global-option`` to the correct ``Include`` and ``Lib`` paths on the system (where ``graphviz\cgraph.h`` and ``cgraph.lib`` paths exist, respectively):

.. code:: PowerShell

(grilldemo01) C:\>conda install --channel conda-forge pygraphviz
(grilldemo01) C:\>python -m pip install --global-option=build_ext --global-option="-IC:\Users\Christian\.conda\envs\glowdeps\Library\include" --global-option="-LC:\Users\Christian\.conda\envs\glowdeps\Library\lib" pygraphviz

.. tab:: Houdini

Replace ``--global-option`` to the correct ``Include`` and ``Lib`` paths on the system (where ``graphviz\cgraph.h`` and ``cgraph.lib`` paths exist, respectively):

.. code:: PowerShell

(grilldemo01) C:\>conda install --channel conda-forge pygraphviz
(grilldemo01) C:\Program Files\Side Effects Software\Houdini 19.5.534\bin>hython -m pip install -vvv --use-pep517 --config-settings="--global-option=build_ext" --config-settings="--global-option=-IC:\Users\Christian\.conda\envs\pygraphviz310\Library\include" --config-settings="--global-option=-LC:\Users\Christian\.conda\envs\pygraphviz310\Library\lib" pygraphviz

.. tab:: Maya

Replace ``--global-option`` to the correct ``Include`` and ``Lib`` paths on the system (where ``graphviz\cgraph.h`` and ``cgraph.lib`` paths exist, respectively) **and** the Maya Python ``include`` and ``lib`` paths:

.. code:: PowerShell

(grilldemo01) C:\>conda install --channel conda-forge pygraphviz
(grilldemo01) C:\Program Files\Autodesk\Maya2023\bin>mayapy -m pip install -U pip==23.3.2
(grilldemo01) C:\Program Files\Autodesk\Maya2023\bin>mayapy -m pip install -vvv --use-pep517 --config-settings="--global-option=build_ext" --config-settings="--global-option=-IC:\Users\Christian\.conda\envs\pygraphviz310\Library\include;C:\Program Files\Autodesk\Maya2024\include\Python39\Python" --config-settings="--global-option=-LC:\Users\Christian\.conda\envs\pygraphviz310\Library\lib;C:\Program Files\Autodesk\Maya2024\lib" pygraphviz
.. code:: PowerShell

(grilldemo01) C:\>conda install conda-forge::graphviz

7. You should be able to see the ``👨‍🍳 Grill`` menu in **USDView**, **Maya** and **Houdini***.

Expand All @@ -191,7 +118,7 @@ walk-through on how to start using ``The Grill`` tools with a fresh

The manual execution of this step might be removed in the future.

.. _pygraphviz: https://pygraphviz.github.io/documentation/stable/install.html
.. _graphviz: http://graphviz.org
.. _miniconda: https://docs.conda.io/en/latest/miniconda.html
.. _Anaconda: https://docs.anaconda.com/anaconda/user-guide/getting-started/
.. _conda: https://docs.conda.io/projects/conda/en/latest/index.html
6 changes: 5 additions & 1 deletion grill/__startup__/maya.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
from maya import cmds
from PySide2 import QtCore

if cmds.about(qt=True).startswith("6"):
from PySide6 import QtCore
else:
from PySide2 import QtCore


def install():
Expand Down
Loading
Loading