mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
Reinstate backwards compatibility for publishing.
This commit is contained in:
parent
abea98091a
commit
f2f42fad30
2 changed files with 30 additions and 23 deletions
|
|
@ -34,6 +34,7 @@ class ExtractPlayblast(publish.Extractor):
|
|||
hosts = ["maya"]
|
||||
families = ["review"]
|
||||
optional = True
|
||||
capture_preset = {}
|
||||
profiles = None
|
||||
|
||||
def _capture(self, preset):
|
||||
|
|
@ -48,10 +49,6 @@ class ExtractPlayblast(publish.Extractor):
|
|||
self.log.debug("playblast path {}".format(path))
|
||||
|
||||
def process(self, instance):
|
||||
if not self.profiles:
|
||||
self.log.warning("No profiles present for Extract Playblast")
|
||||
return
|
||||
|
||||
self.log.info("Extracting capture..")
|
||||
|
||||
# get scene fps
|
||||
|
|
@ -85,12 +82,15 @@ class ExtractPlayblast(publish.Extractor):
|
|||
"task_types": task_type,
|
||||
"subset": subset
|
||||
}
|
||||
capture_preset = filter_profiles(
|
||||
self.profiles, filtering_criteria, logger=self.log
|
||||
)["capture_preset"]
|
||||
preset = lib.load_capture_preset(
|
||||
data=capture_preset
|
||||
)
|
||||
capture_preset = self.capture_preset
|
||||
preset = lib.load_capture_preset(data=self.capture_preset)
|
||||
if self.profiles:
|
||||
capture_preset = filter_profiles(
|
||||
self.profiles, filtering_criteria, logger=self.log
|
||||
)["capture_preset"]
|
||||
preset = lib.load_capture_preset(data=capture_preset)
|
||||
else:
|
||||
self.log.warning("No profiles present for Extract Playblast")
|
||||
|
||||
# "isolate_view" will already have been applied at creation, so we'll
|
||||
# ignore it here.
|
||||
|
|
|
|||
|
|
@ -25,13 +25,6 @@ class ExtractThumbnail(publish.Extractor):
|
|||
families = ["review"]
|
||||
|
||||
def process(self, instance):
|
||||
maya_settings = instance.context.data["project_settings"]["maya"]
|
||||
profiles = maya_settings["publish"]["ExtractPlayblast"]["profiles"]
|
||||
|
||||
if not profiles:
|
||||
self.log.warning("No profiles present for Extract Playblast")
|
||||
return
|
||||
|
||||
self.log.info("Extracting capture..")
|
||||
|
||||
camera = instance.data["review_camera"]
|
||||
|
|
@ -50,12 +43,26 @@ class ExtractThumbnail(publish.Extractor):
|
|||
"task_types": task_type,
|
||||
"subset": subset
|
||||
}
|
||||
capture_preset = filter_profiles(
|
||||
profiles, filtering_criteria, logger=self.log
|
||||
)["capture_preset"]
|
||||
preset = lib.load_capture_preset(
|
||||
data=capture_preset
|
||||
)
|
||||
|
||||
maya_settings = instance.context.data["project_settings"]["maya"]
|
||||
plugin_settings = maya_settings["publish"]["ExtractPlayblast"]
|
||||
|
||||
capture_preset = plugin_settings["capture_preset"]
|
||||
preset = {}
|
||||
try:
|
||||
preset = lib.load_capture_preset(data=capture_preset)
|
||||
except KeyError as ke:
|
||||
self.log.error("Error loading capture presets: {}".format(str(ke)))
|
||||
|
||||
if plugin_settings["profiles"]:
|
||||
capture_preset = filter_profiles(
|
||||
plugin_settings["profiles"],
|
||||
filtering_criteria,
|
||||
logger=self.log
|
||||
)["capture_preset"]
|
||||
preset = lib.load_capture_preset(data=capture_preset)
|
||||
else:
|
||||
self.log.warning("No profiles present for Extract Playblast")
|
||||
|
||||
# "isolate_view" will already have been applied at creation, so we'll
|
||||
# ignore it here.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue