AYON: 3rd party addon usage (#5300)

* implemented helper functions to get ffmpeg and oiio tool arguments

* modified validation functions to be able to handle list of arguments

* path getters can return a path in AYON mode if one argument is returned

* removed test exception

* modified docstrings

* is_oiio_supported is using new functions to get launch arguments

* new functions are in lib public =

* use new functions all over the place

* renamed 'ffmpeg_path' to 'ffmpeg_args'

* raise 'ToolNotFoundError' if tool argument could not be found

* reraise 'KnownPublishError' in publish plugins

* fix comment

* simplify args start

* ffmpeg and oiio function require tool name and support additional arguments

* renamed 'get_oiio_tools_args' to 'get_oiio_tool_args'

* fix variable name
This commit is contained in:
Jakub Trllo 2023-07-27 10:54:45 +02:00 committed by GitHub
parent 7b5e716147
commit d63aa34a76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 302 additions and 198 deletions

View file

@ -94,15 +94,14 @@ class ExtractRender(pyblish.api.InstancePlugin):
# Generate thumbnail.
thumbnail_path = os.path.join(path, "thumbnail.png")
ffmpeg_path = openpype.lib.get_ffmpeg_tool_path("ffmpeg")
args = [
ffmpeg_path,
args = openpype.lib.get_ffmpeg_tool_args(
"ffmpeg",
"-y",
"-i", os.path.join(path, list(collections[0])[0]),
"-vf", "scale=300:-1",
"-vframes", "1",
thumbnail_path
]
)
process = subprocess.Popen(
args,
stdout=subprocess.PIPE,