mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
Merge pull request #3176 from pypeclub/bugfix/avoid_same_name_representations_dev
General: Avoid creating multiple thumbnails
This commit is contained in:
commit
00e99b67f3
1 changed files with 6 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ class ExtractJpegEXR(pyblish.api.InstancePlugin):
|
|||
return
|
||||
|
||||
filtered_repres = self._get_filtered_repres(instance)
|
||||
|
||||
for repre in filtered_repres:
|
||||
repre_files = repre["files"]
|
||||
if not isinstance(repre_files, (list, tuple)):
|
||||
|
|
@ -151,6 +152,11 @@ class ExtractJpegEXR(pyblish.api.InstancePlugin):
|
|||
if convert_dir is not None and os.path.exists(convert_dir):
|
||||
shutil.rmtree(convert_dir)
|
||||
|
||||
# Create only one representation with name 'thumbnail'
|
||||
# TODO maybe handle way how to decide from which representation
|
||||
# will be thumbnail created
|
||||
break
|
||||
|
||||
def _get_filtered_repres(self, instance):
|
||||
filtered_repres = []
|
||||
src_repres = instance.data.get("representations") or []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue