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

Commit

Permalink
Merge pull request #2196 from pypeclub/feature/delivery_check_frame_key
Browse files Browse the repository at this point in the history
Delivery: Check 'frame' key in template for sequence delivery
  • Loading branch information
iLLiCiTiT authored Nov 2, 2021
2 parents a3ba023 + 87cb264 commit 0600396
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions openpype/lib/delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,27 @@ def hash_path_exist(myPath):
report_items["Source file was not found"].append(msg)
return report_items, 0

delivery_templates = anatomy.templates.get("delivery") or {}
delivery_template = delivery_templates.get(template_name)
if delivery_template is None:
msg = (
"Delivery template \"{}\" in anatomy of project \"{}\""
" was not found"
).format(template_name, anatomy.project_name)
report_items[""].append(msg)
return report_items, 0

# Check if 'frame' key is available in template which is required
# for sequence delivery
if "{frame" not in delivery_template:
msg = (
"Delivery template \"{}\" in anatomy of project \"{}\""
"does not contain '{{frame}}' key to fill. Delivery of sequence"
" can't be processed."
).format(template_name, anatomy.project_name)
report_items[""].append(msg)
return report_items, 0

dir_path, file_name = os.path.split(str(src_path))

context = repre["context"]
Expand Down

0 comments on commit 0600396

Please sign in to comment.