mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
replaced usage of OPENPYPE_OIIO_PATH env with get_oiio_tools_path function
This commit is contained in:
parent
f9232e2397
commit
203c32183d
2 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue