replaced usage of OPENPYPE_OIIO_PATH env with get_oiio_tools_path function

This commit is contained in:
iLLiCiTiT 2021-04-14 15:14:50 +02:00
parent f9232e2397
commit 203c32183d
2 changed files with 5 additions and 4 deletions

View file

@ -9,6 +9,7 @@ import tempfile
from .execute import run_subprocess
from .profiles_filtering import filter_profiles
from .vendor_bin_utils import get_oiio_tools_path
from openpype.settings import get_project_settings
@ -235,7 +236,7 @@ def oiio_supported():
Returns:
(bool)
"""
oiio_path = os.getenv("OPENPYPE_OIIO_PATH", "")
oiio_path = get_oiio_tools_path()
if not oiio_path or not os.path.exists(oiio_path):
log.debug("OIIOTool is not configured or not present at {}".
format(oiio_path))
@ -269,7 +270,7 @@ def decompress(target_dir, file_url,
(int(input_frame_end) > int(input_frame_start))
oiio_cmd = []
oiio_cmd.append(os.getenv("OPENPYPE_OIIO_PATH"))
oiio_cmd.append(get_oiio_tools_path())
oiio_cmd.append("--compression none")
@ -328,7 +329,7 @@ def should_decompress(file_url):
"""
if oiio_supported():
output = run_subprocess([
os.getenv("OPENPYPE_OIIO_PATH"),
get_oiio_tools_path(),
"--info", "-v", file_url])
return "compression: \"dwaa\"" in output or \
"compression: \"dwab\"" in output

View file

@ -45,7 +45,7 @@ class ExtractScanlineExr(pyblish.api.InstancePlugin):
stagingdir = os.path.normpath(repre.get("stagingDir"))
oiio_tool_path = os.getenv("OPENPYPE_OIIO_PATH", "")
oiio_tool_path = openpype.lib.get_oiio_tools_path()
if not os.path.exists(oiio_tool_path):
self.log.error(
"OIIO tool not found in {}".format(oiio_tool_path))