mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fix(hiero): review thumbnail two variation of frame identification
This commit is contained in:
parent
f086088a9e
commit
6d30b2e852
1 changed files with 9 additions and 2 deletions
|
|
@ -142,8 +142,15 @@ class CollectReviews(api.InstancePlugin):
|
|||
staging_dir = os.path.dirname(
|
||||
source_path)
|
||||
|
||||
thumb_frame = instance.data["clipInH"] + (
|
||||
(instance.data["clipOutH"] - instance.data["clipInH"]) / 2)
|
||||
media_duration = instance.data.get("mediaDuration")
|
||||
clip_duration_h = instance.data.get("clipDurationH")
|
||||
|
||||
if media_duration > clip_duration_h:
|
||||
thumb_frame = instance.data["clipInH"] + (
|
||||
(instance.data["clipOutH"] - instance.data["clipInH"]) / 2)
|
||||
elif media_duration <= clip_duration_h:
|
||||
thumb_frame = instance.data["sourceIn"] + (
|
||||
(instance.data["sourceOut"] - instance.data["sourceIn"]) / 2)
|
||||
thumb_file = "{}_{}{}".format(head, thumb_frame, ".png")
|
||||
thumb_path = os.path.join(staging_dir, thumb_file)
|
||||
self.log.debug("__ thumb_path: {}".format(thumb_path))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue