Make appropriate feature fixes.

This commit is contained in:
Allan Ihsan 2022-06-27 06:13:35 +03:00
parent 384a44c2f1
commit 46bfbd2850
3 changed files with 23 additions and 15 deletions

View file

@ -15,8 +15,8 @@ class CreateReview(plugin.Creator):
keepImages = False
isolate = False
imagePlane = True
resolutionWidth = 0
resolutionHeight = 0
attrWidth = 0
attrHeight = 0
transparency = [
"preset",
"simple",
@ -35,8 +35,8 @@ class CreateReview(plugin.Creator):
for key, value in animation_data.items():
data[key] = value
data["resolutionWidth"] = self.resolutionWidth
data["resolutionHeight"] = self.resolutionHeight
data["attrWidth"] = self.attrWidth
data["attrHeight"] = self.attrHeight
data["isolate"] = self.isolate
data["keepImages"] = self.keepImages
data["imagePlane"] = self.imagePlane

View file

@ -71,8 +71,8 @@ class CollectReview(pyblish.api.InstancePlugin):
data['handles'] = instance.data.get('handles', None)
data['step'] = instance.data['step']
data['fps'] = instance.data['fps']
data['resolutionWidth'] = instance.data['resolutionWidth']
data['resolutionHeight'] = instance.data['resolutionHeight']
data['attrWidth'] = instance.data['attrWidth']
data['attrHeight'] = instance.data['attrHeight']
data["isolate"] = instance.data["isolate"]
cmds.setAttr(str(instance) + '.active', 1)
self.log.debug('data {}'.format(instance.context[i].data))

View file

@ -1,6 +1,7 @@
import os
import glob
import contextlib
import clique
import capture
@ -56,23 +57,30 @@ class ExtractPlayblast(openpype.api.Extractor):
width_preset = capture_presets["Resolution"]["width"]
height_preset = capture_presets["Resolution"]["height"]
# Set resolution variables from asset values
instance_width = instance.context.data.get("resolutionWidth")
instance_height = instance.context.data.get("resolutionHeight")
asset_width = instance.data.get("resolutionWidth")
asset_height = instance.data.get("resolutionHeight")
review_instance_width = instance.data.get("attrWidth")
review_instance_height = instance.data.get("attrHeight")
preset['camera'] = camera
# 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 width_preset != 0:
preset["width"] = width_preset
else:
preset['width'] = instance_width
if height_preset != 0:
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
else:
preset['height'] = instance_height
preset['start_frame'] = start
preset['end_frame'] = end