From f1ab759a6179efbd96f4db17957351f60984fb04 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 14 Dec 2021 13:28:00 +0100 Subject: [PATCH 1/2] OP-2151 - replaced PATH usage with oiio path for maketx utility --- openpype/hosts/maya/plugins/publish/extract_look.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_look.py b/openpype/hosts/maya/plugins/publish/extract_look.py index 2407617b6f..92587c2910 100644 --- a/openpype/hosts/maya/plugins/publish/extract_look.py +++ b/openpype/hosts/maya/plugins/publish/extract_look.py @@ -55,8 +55,11 @@ def maketx(source, destination, *args): str: Output of `maketx` command. """ + from openpype.lib import get_oiio_tools_path + + maketx_path = get_oiio_tools_path("maketx") cmd = [ - "maketx", + maketx_path, "-v", # verbose "-u", # update mode # unpremultiply before conversion (recommended when alpha present) From 209dbea1a5b83aa61047b072923565fe238c56ff Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 14 Dec 2021 13:44:21 +0100 Subject: [PATCH 2/2] OP-2151 - added logging and exception if oiio utilities not found --- openpype/hosts/maya/plugins/publish/extract_look.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openpype/hosts/maya/plugins/publish/extract_look.py b/openpype/hosts/maya/plugins/publish/extract_look.py index 92587c2910..953539f65c 100644 --- a/openpype/hosts/maya/plugins/publish/extract_look.py +++ b/openpype/hosts/maya/plugins/publish/extract_look.py @@ -58,6 +58,11 @@ def maketx(source, destination, *args): from openpype.lib import get_oiio_tools_path maketx_path = get_oiio_tools_path("maketx") + if not os.path.exists(maketx_path): + print( + "OIIO tool not found in {}".format(maketx_path)) + raise AssertionError("OIIO tool not found") + cmd = [ maketx_path, "-v", # verbose