mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
Create review thumbnail if it does not exist.
This commit is contained in:
parent
ded8f467a6
commit
352ba19d0b
1 changed files with 6 additions and 4 deletions
|
|
@ -79,11 +79,13 @@ class ExtractQuicktime(pype.api.Extractor):
|
|||
self.log.debug("Adding representation: {}".format(representation))
|
||||
|
||||
# Adding thumbnail representation.
|
||||
path = instance.data["sourcePath"].replace(".mov", ".png")
|
||||
if not os.path.exists(path):
|
||||
item.thumbnail(start_frame).save(path, format="png")
|
||||
|
||||
representation = {
|
||||
"files": os.path.basename(
|
||||
instance.data["sourcePath"].replace(".mov", ".png")
|
||||
),
|
||||
"stagingDir": os.path.dirname(instance.data["sourcePath"]),
|
||||
"files": os.path.basename(path),
|
||||
"stagingDir": os.path.dirname(path),
|
||||
"name": "thumbnail",
|
||||
"thumbnail": True,
|
||||
"ext": "png"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue