mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
clean up code & make sure the ext of thumbnail representation aligns with the image format data setting
This commit is contained in:
parent
fe1fd463da
commit
d9dd36d77a
2 changed files with 1 additions and 4 deletions
|
|
@ -31,7 +31,6 @@ def viewport_camera(camera):
|
|||
camera (str): viewport camera for review render
|
||||
"""
|
||||
original = rt.viewport.getCamera()
|
||||
has_autoplay = rt.preferences.playPreviewWhenDone
|
||||
if not original:
|
||||
# if there is no original camera
|
||||
# use the current camera as original
|
||||
|
|
@ -39,11 +38,9 @@ def viewport_camera(camera):
|
|||
review_camera = rt.getNodeByName(camera)
|
||||
try:
|
||||
rt.viewport.setCamera(review_camera)
|
||||
rt.preferences.playPreviewWhenDone = False
|
||||
yield
|
||||
finally:
|
||||
rt.viewport.setCamera(original)
|
||||
rt.preferences.playPreviewWhenDone = has_autoplay
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class ExtractThumbnail(publish.Extractor):
|
|||
|
||||
representation = {
|
||||
"name": "thumbnail",
|
||||
"ext": "png",
|
||||
"ext": ext,
|
||||
"files": thumbnail,
|
||||
"stagingDir": staging_dir,
|
||||
"thumbnail": True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue