Skip to content

Commit

Permalink
remove graphviz dll load on DCCs
Browse files Browse the repository at this point in the history
Signed-off-by: Christian López Barrón <[email protected]>
  • Loading branch information
chrizzFTD committed Dec 7, 2024
1 parent afe1c0b commit 539db43
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 16 deletions.
10 changes: 0 additions & 10 deletions grill/views/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,6 @@ def _run(args: list):
return error, result.stdout.decode()


@cache
def _ensure_dot():
"""For usage only when DCC python interpreter fails to install pygraphviz properly."""
if dotpath := _which("dot"):
# https://github.com/pygraphviz/pygraphviz/issues/360
# TODO: is this the best approach to solve current Houdini and Maya failing to import graphviz??
if hasattr(os, "add_dll_directory"):
os.add_dll_directory(Path(dotpath).parent) # sigh, patch pygraphviz?


@contextlib.contextmanager
def wait():
try:
Expand Down
1 change: 0 additions & 1 deletion grill/views/_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

from . import _core
from ._qt import QtCore, QtGui, QtWidgets, QtSvg
_core._ensure_dot()

_logger = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion grill/views/houdini.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from functools import cache, lru_cache, partial
from . import sheets as _sheets, description as _description, create as _create, stats as _stats, _core
_description._PALETTE.set(0) # (0 == dark, 1 == light)
_core._ensure_dot()


def _stage_on_widget(widget_creator, _cache=True):
Expand Down
1 change: 0 additions & 1 deletion grill/views/maya.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from . import description as _description, sheets as _sheets, create as _create, _core, stats as _stats
_description._PALETTE.set(0) # (0 == dark, 1 == light)
_core._ensure_dot()


@cache
Expand Down
3 changes: 0 additions & 3 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ def test_common_paths(self):
]
self.assertEqual(actual, expected)

def test_core(self):
_core._ensure_dot()


_test_bed = Path(__file__).parent / "mini_test_bed" / "main-world-test.1.usda"

Expand Down

0 comments on commit 539db43

Please sign in to comment.