mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
Fix thumbnail extractor to match playblast resolution.
This commit is contained in:
parent
409bf1b6e5
commit
aca0c2a52b
1 changed files with 25 additions and 0 deletions
|
|
@ -60,7 +60,32 @@ class ExtractThumbnail(openpype.api.Extractor):
|
|||
"overscan": 1.0,
|
||||
"depthOfField": cmds.getAttr("{0}.depthOfField".format(camera)),
|
||||
}
|
||||
capture_presets = capture_preset
|
||||
# Set resolution variables from capture presets
|
||||
width_preset = capture_presets["Resolution"]["width"]
|
||||
height_preset = capture_presets["Resolution"]["height"]
|
||||
# Set resolution variables from asset values
|
||||
asset_width = instance.data.get("resolutionWidth")
|
||||
asset_height = instance.data.get("resolutionHeight")
|
||||
review_instance_width = instance.data.get("instanceWidth")
|
||||
review_instance_height = instance.data.get("instanceHeight")
|
||||
# Tests if project resolution is set,
|
||||
# if it is a value other than zero, that value is
|
||||
# used, if not then the asset resolution is
|
||||
# used
|
||||
if review_instance_width != 0:
|
||||
preset['width'] = review_instance_width
|
||||
elif width_preset == 0:
|
||||
preset['width'] = asset_width
|
||||
elif width_preset != 0:
|
||||
preset['width'] = width_preset
|
||||
|
||||
if review_instance_height != 0:
|
||||
preset['height'] = review_instance_height
|
||||
elif height_preset == 0:
|
||||
preset['height'] = asset_height
|
||||
elif height_preset != 0:
|
||||
preset['height'] = height_preset
|
||||
stagingDir = self.staging_dir(instance)
|
||||
filename = "{0}".format(instance.name)
|
||||
path = os.path.join(stagingDir, filename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue