mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
fix(global): two types on repre["files"] support and better exception
oiio_supported didn't test path existence
This commit is contained in:
parent
52feeabb44
commit
b74dc3a7a7
2 changed files with 14 additions and 4 deletions
|
|
@ -145,7 +145,11 @@ def oiio_supported():
|
|||
'should_decompress' will throw exception if configured,
|
||||
but not present or working.
|
||||
"""
|
||||
return os.getenv("PYPE_OIIO_PATH", "") != ""
|
||||
oiio_path = os.getenv("PYPE_OIIO_PATH", "")
|
||||
if not os.path.exists(oiio_path) or not oiio_path:
|
||||
raise IOError("Files do not exists in `{}`".format(oiio_path))
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def decompress(target_dir, file_url,
|
||||
|
|
|
|||
|
|
@ -335,9 +335,15 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
ffmpeg_video_filters = out_def_ffmpeg_args.get("video_filters") or []
|
||||
ffmpeg_audio_filters = out_def_ffmpeg_args.get("audio_filters") or []
|
||||
|
||||
input_files_urls = [os.path.join(new_repre["stagingDir"], f) for f
|
||||
in new_repre['files']]
|
||||
do_decompress = should_decompress(input_files_urls[0])
|
||||
if isinstance(new_repre['files'], list):
|
||||
input_files_urls = [os.path.join(new_repre["stagingDir"], f) for f
|
||||
in new_repre['files']]
|
||||
do_decompress = should_decompress(input_files_urls[0])
|
||||
else:
|
||||
test_path = os.path.join(
|
||||
new_repre["stagingDir"], new_repre['files'])
|
||||
do_decompress = should_decompress(test_path)
|
||||
|
||||
if do_decompress:
|
||||
# change stagingDir, decompress first
|
||||
# calculate all paths with modified directory, used on too many
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue