mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
add audio to instance.data only if audio file exists
This commit is contained in:
parent
ae20023508
commit
9772bf7660
1 changed files with 4 additions and 2 deletions
|
|
@ -45,8 +45,7 @@ class ExtractRender(pyblish.api.InstancePlugin):
|
|||
frame_start = result[4]
|
||||
frame_end = result[5]
|
||||
audio_path = result[6]
|
||||
if audio_path:
|
||||
instance.data["audio"] = [{"filename": audio_path}]
|
||||
|
||||
instance.data["fps"] = frame_rate
|
||||
|
||||
# Set output path to temp folder.
|
||||
|
|
@ -139,6 +138,9 @@ class ExtractRender(pyblish.api.InstancePlugin):
|
|||
}
|
||||
instance.data["representations"] = [representation, thumbnail]
|
||||
|
||||
if audio_path and os.path.exists(audio_path):
|
||||
instance.data["audio"] = [{"filename": audio_path}]
|
||||
|
||||
# Required for extract_review plugin (L222 onwards).
|
||||
instance.data["frameStart"] = frame_start
|
||||
instance.data["frameEnd"] = frame_end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue