Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into 3.0/feature/pype_refactor_start
Browse files Browse the repository at this point in the history
  • Loading branch information
mkolar committed Jun 1, 2020
2 parents abebc23 + 09df26b commit 7d62625
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pype/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def get_version_from_path(file):
v: version number in string ('001')
"""
pattern = re.compile(r"[\._]v([0-9]+)")
pattern = re.compile(r"[\._]v([0-9]+)", re.IGNORECASE)
try:
return pattern.findall(file)[0]
except IndexError:
Expand Down
10 changes: 8 additions & 2 deletions pype/plugins/global/publish/extract_burnin.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def process(self, instance):
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)

Expand All @@ -71,6 +71,12 @@ def process(self, instance):

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"]
Expand Down Expand Up @@ -830,7 +836,7 @@ def legacy_process(self, instance):
for i, repre in enumerate(instance.data["representations"]):
self.log.debug("__ i: `{}`, repre: `{}`".format(i, repre))

if "multipartExr" in repre.get("tags", []):
if instance.data.get("multipartExr") is True:
# ffmpeg doesn't support multipart exrs
continue

Expand Down
2 changes: 1 addition & 1 deletion pype/plugins/global/publish/extract_jpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def process(self, instance):
if not isinstance(repre['files'], list):
continue

if "multipartExr" in tags:
if instance.data.get("multipartExr") is True:
# ffmpeg doesn't support multipart exrs
continue

Expand Down
2 changes: 1 addition & 1 deletion pype/plugins/global/publish/extract_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ def legacy_process(self, instance):

tags = repre.get("tags", [])

if instance.data.get("multipartExr") is True:
if inst_data.get("multipartExr") is True:
# ffmpeg doesn't support multipart exrs
continue

Expand Down
2 changes: 1 addition & 1 deletion pype/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.9.0"
__version__ = "2.9.1"

0 comments on commit 7d62625

Please sign in to comment.