Merge branch 'develop' into enhancement/product-name-template-settings

This commit is contained in:
Roy Nieterau 2025-12-18 11:48:55 +01:00 committed by GitHub
commit 15af2c051b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 16 deletions

View file

@ -259,7 +259,8 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
repre_thumb_created = self._create_colorspace_thumbnail( repre_thumb_created = self._create_colorspace_thumbnail(
full_input_path, full_input_path,
full_output_path, full_output_path,
colorspace_data colorspace_data,
thumbnail_def,
) )
# Try to use FFMPEG if OIIO is not supported or for cases when # Try to use FFMPEG if OIIO is not supported or for cases when
@ -400,7 +401,7 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
return review_repres + other_repres return review_repres + other_repres
def _is_valid_images_repre(self, repre): def _is_valid_images_repre(self, repre: dict) -> bool:
"""Check if representation contains valid image files """Check if representation contains valid image files
Args: Args:
@ -420,10 +421,10 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
def _create_colorspace_thumbnail( def _create_colorspace_thumbnail(
self, self,
src_path, src_path: str,
dst_path, dst_path: str,
colorspace_data, colorspace_data: dict,
thumbnail_def thumbnail_def: ThumbnailDef,
): ):
"""Create thumbnail using OIIO tool oiiotool """Create thumbnail using OIIO tool oiiotool
@ -436,11 +437,12 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
config (dict) config (dict)
display (Optional[str]) display (Optional[str])
view (Optional[str]) view (Optional[str])
thumbnail_def (ThumbnailDefinition): Thumbnail definition.
Returns: Returns:
str: path to created thumbnail str: path to created thumbnail
""" """
self.log.info("Extracting thumbnail {}".format(dst_path)) self.log.info(f"Extracting thumbnail {dst_path}")
resolution_arg = self._get_resolution_args( resolution_arg = self._get_resolution_args(
"oiiotool", src_path, thumbnail_def "oiiotool", src_path, thumbnail_def
) )
@ -599,10 +601,10 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
def _create_frame_from_video( def _create_frame_from_video(
self, self,
video_file_path, video_file_path: str,
output_dir, output_dir: str,
thumbnail_def thumbnail_def: ThumbnailDef,
): ) -> Optional[str]:
"""Convert video file to one frame image via ffmpeg""" """Convert video file to one frame image via ffmpeg"""
# create output file path # create output file path
base_name = os.path.basename(video_file_path) base_name = os.path.basename(video_file_path)
@ -703,10 +705,10 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
def _get_resolution_args( def _get_resolution_args(
self, self,
application, application: str,
input_path, input_path: str,
thumbnail_def thumbnail_def: ThumbnailDef,
): ) -> list:
# get settings # get settings
if thumbnail_def.target_size["type"] == "source": if thumbnail_def.target_size["type"] == "source":
return [] return []

View file

@ -105,7 +105,7 @@ class IntegrateInputLinksAYON(pyblish.api.ContextPlugin):
created links by its type created links by its type
""" """
if workfile_instance is None: if workfile_instance is None:
self.log.warning("No workfile in this publish session.") self.log.debug("No workfile in this publish session.")
return return
workfile_version_id = workfile_instance.data["versionEntity"]["id"] workfile_version_id = workfile_instance.data["versionEntity"]["id"]