From 47ce7b0703f6d2a3126540e1216db6edf167bbe9 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 29 Dec 2020 16:18:56 +0100 Subject: [PATCH] global: using middle frame for thumbnail enabling for resolve and plate and take family --- pype/plugins/global/publish/extract_jpeg.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pype/plugins/global/publish/extract_jpeg.py b/pype/plugins/global/publish/extract_jpeg.py index af90d4366d..d5e9a896dc 100644 --- a/pype/plugins/global/publish/extract_jpeg.py +++ b/pype/plugins/global/publish/extract_jpeg.py @@ -12,9 +12,12 @@ class ExtractJpegEXR(pyblish.api.InstancePlugin): """Create jpg thumbnail from sequence using ffmpeg""" label = "Extract Jpeg EXR" - hosts = ["shell", "fusion"] order = pyblish.api.ExtractorOrder - families = ["imagesequence", "render", "render2d", "source"] + families = [ + "imagesequence", "render", "render2d", + "source", "plate", "take" + ] + hosts = ["shell", "fusion", "resolve"] enabled = False # presetable attribute @@ -50,7 +53,8 @@ class ExtractJpegEXR(pyblish.api.InstancePlugin): if not isinstance(repre['files'], (list, tuple)): input_file = repre['files'] else: - input_file = repre['files'][0] + file_index = int(float(len(repre['files'])) * 0.5) + input_file = repre['files'][file_index] stagingdir = os.path.normpath(repre.get("stagingDir"))