mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Maya capture 'isolate_view' fix
This commit is contained in:
parent
c3141507ef
commit
f44ff17f8f
3 changed files with 16 additions and 25 deletions
|
|
@ -2139,11 +2139,7 @@ def load_capture_preset(path=None, data=None):
|
|||
# GENERIC
|
||||
id = 'Generic'
|
||||
for key in preset[id]:
|
||||
if key.startswith('isolate'):
|
||||
pass
|
||||
# options['isolate'] = preset[id][key]
|
||||
else:
|
||||
options[str(key)] = preset[id][key]
|
||||
options[str(key)] = preset[id][key]
|
||||
|
||||
# RESOLUTION
|
||||
id = 'Resolution'
|
||||
|
|
@ -2153,9 +2149,9 @@ def load_capture_preset(path=None, data=None):
|
|||
# DISPLAY OPTIONS
|
||||
id = 'Display Options'
|
||||
disp_options = {}
|
||||
for key in preset['Display Options']:
|
||||
for key in preset[id]:
|
||||
if key.startswith('background'):
|
||||
disp_options[key] = preset['Display Options'][key]
|
||||
disp_options[key] = preset[id][key]
|
||||
else:
|
||||
disp_options['displayGradient'] = True
|
||||
|
||||
|
|
@ -2220,16 +2216,6 @@ def load_capture_preset(path=None, data=None):
|
|||
# use active sound track
|
||||
scene = capture.parse_active_scene()
|
||||
options['sound'] = scene['sound']
|
||||
cam_options = dict()
|
||||
cam_options['overscan'] = 1.0
|
||||
cam_options['displayFieldChart'] = False
|
||||
cam_options['displayFilmGate'] = False
|
||||
cam_options['displayFilmOrigin'] = False
|
||||
cam_options['displayFilmPivot'] = False
|
||||
cam_options['displayGateMask'] = False
|
||||
cam_options['displayResolution'] = False
|
||||
cam_options['displaySafeAction'] = False
|
||||
cam_options['displaySafeTitle'] = False
|
||||
|
||||
# options['display_options'] = temp_options
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,11 @@ class ExtractPlayblast(openpype.api.Extractor):
|
|||
# get cameras
|
||||
camera = instance.data['review_camera']
|
||||
|
||||
preset = lib.load_capture_preset(data=self.capture_preset)
|
||||
try:
|
||||
preset = lib.load_capture_preset(data=self.capture_preset)
|
||||
except KeyError as ke:
|
||||
self.log.error('Error loading capture presets: {}'.format(str(ke)))
|
||||
preset = {}
|
||||
|
||||
|
||||
preset['camera'] = camera
|
||||
|
|
@ -75,7 +79,7 @@ class ExtractPlayblast(openpype.api.Extractor):
|
|||
|
||||
# Isolate view is requested by having objects in the set besides a
|
||||
# camera.
|
||||
if instance.data.get("isolate"):
|
||||
if preset.pop("isolate_view", False) or instance.data.get("isolate"):
|
||||
preset["isolate"] = instance.data["setMembers"]
|
||||
|
||||
# Show/Hide image planes on request.
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ import pymel.core as pm
|
|||
|
||||
|
||||
class ExtractThumbnail(openpype.api.Extractor):
|
||||
"""Extract a Camera as Alembic.
|
||||
"""Extract viewport thumbnail.
|
||||
|
||||
The cameras gets baked to world space by default. Only when the instance's
|
||||
`bakeToWorldSpace` is set to False it will include its full hierarchy.
|
||||
Takes review camera and creates a thumbnail based on viewport
|
||||
capture.
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -35,9 +35,10 @@ class ExtractThumbnail(openpype.api.Extractor):
|
|||
|
||||
try:
|
||||
preset = lib.load_capture_preset(data=capture_preset)
|
||||
except:
|
||||
except KeyError as ke:
|
||||
self.log.error('Error loading capture presets: {}'.format(str(ke)))
|
||||
preset = {}
|
||||
self.log.info('using viewport preset: {}'.format(capture_preset))
|
||||
self.log.info('Using viewport preset: {}'.format(preset))
|
||||
|
||||
# preset["off_screen"] = False
|
||||
|
||||
|
|
@ -78,7 +79,7 @@ class ExtractThumbnail(openpype.api.Extractor):
|
|||
|
||||
# Isolate view is requested by having objects in the set besides a
|
||||
# camera.
|
||||
if instance.data.get("isolate"):
|
||||
if preset.pop("isolate_view", False) or instance.data.get("isolate"):
|
||||
preset["isolate"] = instance.data["setMembers"]
|
||||
|
||||
with maintained_time():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue