Merge pull request #2405 from pypeclub/chore/OP-2151_Maya-extract-look-should-use-maketx-from-OpenPype-OIIO

Maya: Replaced PATH usage with vendored oiio path for maketx utility
This commit is contained in:
Petr Kalis 2021-12-22 20:36:58 +01:00 committed by GitHub
commit 2ea6da4b35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,8 +55,16 @@ 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")
if not os.path.exists(maketx_path):
print(
"OIIO tool not found in {}".format(maketx_path))
raise AssertionError("OIIO tool not found")
cmd = [
"maketx",
maketx_path,
"-v", # verbose
"-u", # update mode
# unpremultiply before conversion (recommended when alpha present)