Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3351 from pypeclub/bugfix/missing_variable_extrac…
Browse files Browse the repository at this point in the history
…t_thumbnail

General: Create only one thumbnail per instance
  • Loading branch information
iLLiCiTiT authored Jun 16, 2022
2 parents 8909bd8 + 5bdbebf commit 4ef158d
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions openpype/plugins/publish/extract_jpeg_exr.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,21 @@ def process(self, instance):
return

new_repre = {
"name": "thumbnail",
"ext": "jpg",
"files": jpeg_file,
"stagingDir": stagingdir,
"thumbnail": True,
"tags": ["thumbnail"]
}

# adding representation
self.log.debug("Adding: {}".format(new_repre))
instance.data["representations"].append(new_repre)
"name": "thumbnail",
"ext": "jpg",
"files": jpeg_file,
"stagingDir": stagingdir,
"thumbnail": True,
"tags": ["thumbnail"]
}

# adding representation
self.log.debug(
"Adding thumbnail representation: {}".format(new_repre)
)
instance.data["representations"].append(new_repre)
# There is no need to create more then one thumbnail
break

def _get_filtered_repres(self, instance):
filtered_repres = []
Expand Down

0 comments on commit 4ef158d

Please sign in to comment.