fixe legacy detection in extract burnin

This commit is contained in:
iLLiCiTiT 2020-06-01 14:05:03 +02:00
parent ad2881601c
commit c4c9bb0875

View file

@ -58,7 +58,7 @@ class ExtractBurnin(pype.api.Extractor):
if "representations" not in instance.data:
raise RuntimeError("Burnin needs already created mov to work on.")
if self.profiles is None:
if self.use_legacy_code(instance):
return self.legacy_process(instance)
self.main_process(instance)
@ -71,6 +71,12 @@ class ExtractBurnin(pype.api.Extractor):
self.log.debug(instance.data["representations"])
def use_legacy_code(self, instance):
presets = instance.context.data.get("presets")
if presets is None and self.profiles is None:
return True
return "burnins" in (presets.get("tools") or {})
def main_process(self, instance):
# TODO get these data from context
host_name = os.environ["AVALON_APP"]