Skip to content

Commit

Permalink
Merge branch 'develop' into enhancement/use_task_level_attributes_if_set
Browse files Browse the repository at this point in the history
  • Loading branch information
BigRoy authored Sep 30, 2024
2 parents 3dbe391 + 96e4269 commit 94ad2db
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/release_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 🚀 Release Trigger

on:
workflow_dispatch:

jobs:
call-release-trigger:
uses: ynput/ops-repo-automation/.github/workflows/release_trigger.yml@main
secrets:
token: ${{ secrets.YNPUT_BOT_TOKEN }}
email: ${{ secrets.CI_EMAIL }}
user: ${{ secrets.CI_USER }}
1 change: 1 addition & 0 deletions client/ayon_traypublisher/csv_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def csvpublish(
pyblish_context = pyblish.api.Context()
pyblish_context.data["create_context"] = create_context

targets = None
# redefine targets (skip 'local' to disable validators)
if ignore_validators:
targets = ["default", "ingest"]
Expand Down
33 changes: 31 additions & 2 deletions client/ayon_traypublisher/plugins/create/create_csv_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,21 @@ def _add_representation(
# convert ### string in file name to %03d
# this is for correct frame range validation
# example: file.###.exr -> file.%03d.exr
file_head = basename.split(".")[0]
if "#" in basename:
padding = len(basename.split("#")) - 1
basename = basename.replace("#" * padding, f"%0{padding}d")
seq_padding = f"%0{padding}d"
basename = basename.replace("#" * padding, seq_padding)
file_head = basename.split(seq_padding)[0]
is_sequence = True
elif "%" in basename:
pattern = re.compile(r"%\d+d|%d")
padding = pattern.findall(basename)
if not padding:
raise CreatorError(
f"File sequence padding not found in '{basename}'."
)
file_head = basename.split("%")[0]
is_sequence = True

# make absolute path to file
Expand All @@ -662,8 +674,14 @@ def _add_representation(
frame_end: Union[int, None] = None
files: Union[str, List[str]] = basename
if is_sequence:
# get only filtered files form dirname
files_from_dir = [
filename
for filename in os.listdir(dirname)
if filename.startswith(file_head)
]
# collect all data from dirname
cols, _ = clique.assemble(list(os.listdir(dirname)))
cols, _ = clique.assemble(files_from_dir)
if not cols:
raise CreatorError(
f"No collections found in directory '{dirname}'."
Expand Down Expand Up @@ -770,17 +788,28 @@ def _create_instances_from_csv_data(self, csv_dir: str, filename: str):
),
None
)

slate_exists: bool = any(
repre_item.slate_exists
for repre_item in repre_items
)

is_reviewable: bool = any(
True
for repre_item in repre_items
if "review" in repre_item.tags
)

families: List[str] = ["csv_ingest"]
if slate_exists:
# adding slate to families mainly for loaders to be able
# to filter out slates
families.append("slate")

if is_reviewable:
# review family needs to be added for ExtractReview plugin
families.append("review")

instance_data = {
"name": product_item.instance_name,
"folderPath": folder_path,
Expand Down

0 comments on commit 94ad2db

Please sign in to comment.