mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #4704 from tokejepsen/bugfix/OP-2834_Fix-extract-playblast
Bugfix/op 2834 fix extract playblast
This commit is contained in:
commit
6832f6446a
1 changed files with 5 additions and 10 deletions
|
|
@ -36,14 +36,15 @@ class ExtractPlayblast(publish.Extractor):
|
||||||
optional = True
|
optional = True
|
||||||
capture_preset = {}
|
capture_preset = {}
|
||||||
|
|
||||||
def _capture(self, preset, override_viewport_options, instance):
|
def _capture(self, preset):
|
||||||
self.log.info(
|
self.log.info(
|
||||||
"Using preset:\n{}".format(
|
"Using preset:\n{}".format(
|
||||||
json.dumps(preset, sort_keys=True, indent=4)
|
json.dumps(preset, sort_keys=True, indent=4)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
return capture.capture(log=self.log, **preset)
|
path = capture.capture(log=self.log, **preset)
|
||||||
|
self.log.debug("playblast path {}".format(path))
|
||||||
|
|
||||||
def process(self, instance):
|
def process(self, instance):
|
||||||
self.log.info("Extracting capture..")
|
self.log.info("Extracting capture..")
|
||||||
|
|
@ -179,9 +180,7 @@ class ExtractPlayblast(publish.Extractor):
|
||||||
lib.maintained_time(),
|
lib.maintained_time(),
|
||||||
panel_camera(instance.data["panel"], preset["camera"])
|
panel_camera(instance.data["panel"], preset["camera"])
|
||||||
):
|
):
|
||||||
path = self._capture(
|
self._capture(preset)
|
||||||
preset, override_viewport_options, instance
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
# Python 2 compatibility.
|
# Python 2 compatibility.
|
||||||
with contextlib.ExitStack() as stack:
|
with contextlib.ExitStack() as stack:
|
||||||
|
|
@ -190,9 +189,7 @@ class ExtractPlayblast(publish.Extractor):
|
||||||
panel_camera(instance.data["panel"], preset["camera"])
|
panel_camera(instance.data["panel"], preset["camera"])
|
||||||
)
|
)
|
||||||
|
|
||||||
path = self._capture(
|
self._capture(preset)
|
||||||
preset, override_viewport_options, instance
|
|
||||||
)
|
|
||||||
|
|
||||||
# Restoring viewport options.
|
# Restoring viewport options.
|
||||||
if viewport_defaults:
|
if viewport_defaults:
|
||||||
|
|
@ -202,8 +199,6 @@ class ExtractPlayblast(publish.Extractor):
|
||||||
|
|
||||||
cmds.setAttr("{}.panZoomEnabled".format(preset["camera"]), pan_zoom)
|
cmds.setAttr("{}.panZoomEnabled".format(preset["camera"]), pan_zoom)
|
||||||
|
|
||||||
self.log.debug("playblast path {}".format(path))
|
|
||||||
|
|
||||||
collected_files = os.listdir(stagingdir)
|
collected_files = os.listdir(stagingdir)
|
||||||
patterns = [clique.PATTERNS["frames"]]
|
patterns = [clique.PATTERNS["frames"]]
|
||||||
collections, remainder = clique.assemble(collected_files,
|
collections, remainder = clique.assemble(collected_files,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue