Skip to content
Merged

pull #17

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
bb983d3
Load placeholders filter on product base types
vivi295 May 25, 2026
7782afc
Add plugins to collect and integrate versions to lists
jakubjezek001 Jun 2, 2026
45718c7
Refactor entity list integration with folder support
jakubjezek001 Jun 3, 2026
6576c33
Remove unnecessary whitespace and empty profile
jakubjezek001 Jun 3, 2026
66f4556
Add module docstring and clean up imports
jakubjezek001 Jun 3, 2026
6eedf88
Support version list templates in publish process
jakubjezek001 Jun 3, 2026
d087b34
Add early exit for empty version lists
jakubjezek001 Jun 3, 2026
038932b
added blank line
jakubjezek001 Jun 3, 2026
a626f2a
Rename method to clarify it gets profile for instance
jakubjezek001 Jun 3, 2026
e555f81
Update client/ayon_core/plugins/publish/collect_version_to_list.py
jakubjezek001 Jun 3, 2026
f730930
Extract ListConfig to shared structures module
jakubjezek001 Jun 3, 2026
8094cc7
Merge remote-tracking branch 'origin/feature/YN-0770-csv-ingest-popul…
jakubjezek001 Jun 3, 2026
589d4b7
Apply filter based on server version because it'll behave differently…
BigRoy Jun 3, 2026
d7cbf5a
Merge branch 'develop' into bugfix/load_placeholder_filter_product_ba…
BigRoy Jun 3, 2026
8fe7c6c
Simplify version list collection and integrate template formatting
jakubjezek001 Jun 3, 2026
9922903
Use list_type from data instead of hardcoding
jakubjezek001 Jun 3, 2026
10821af
Restructure code
BigRoy Jun 3, 2026
8f3d590
Update server/settings/publish_plugins.py
jakubjezek001 Jun 4, 2026
b0cdc8d
Update server/settings/publish_plugins.py
jakubjezek001 Jun 4, 2026
26521b9
Update server/settings/publish_plugins.py
jakubjezek001 Jun 4, 2026
87284a9
Update server/settings/publish_plugins.py
jakubjezek001 Jun 4, 2026
55ea43f
Remove unused imports from typing
jakubjezek001 Jun 4, 2026
02daacf
Use "name" instead of "name_template" in profile
jakubjezek001 Jun 4, 2026
bdb41ed
Fix version list profile key from name to list_name
jakubjezek001 Jun 4, 2026
20c5849
Add blank lines before class definitions
jakubjezek001 Jun 4, 2026
ea062c2
Potential fix for pull request finding
BigRoy Jun 4, 2026
69b1c71
Potential fix for pull request finding
BigRoy Jun 4, 2026
1f8ede4
Add Extract Thumbnail to workflow host
BigRoy Jun 4, 2026
54caab1
Potential fix for pull request finding
jakubjezek001 Jun 5, 2026
df29668
Potential fix for pull request finding
jakubjezek001 Jun 5, 2026
dc9cc71
Reformat long lines for readability
jakubjezek001 Jun 5, 2026
35cd60e
Add blank line before process method
jakubjezek001 Jun 5, 2026
3dca38c
Update client/ayon_core/plugins/publish/collect_version_to_list.py
jakubjezek001 Jun 5, 2026
294bd93
Refactor version list initialization logic
jakubjezek001 Jun 5, 2026
2f6c9e7
Import field from dataclasses and use default_factory
jakubjezek001 Jun 5, 2026
3a07aa0
Fix version list retrieval and rename template variable
jakubjezek001 Jun 5, 2026
f812538
Merge remote-tracking branch 'origin/feature/YN-0770-csv-ingest-popul…
jakubjezek001 Jun 5, 2026
d677867
Set hasWebreview flag and skip review sessions without it
jakubjezek001 Jun 5, 2026
c178300
returning type correct list output
jakubjezek001 Jun 5, 2026
fed8d54
Update client/ayon_core/plugins/publish/collect_version_to_list.py
jakubjezek001 Jun 5, 2026
f4021f0
Update client/ayon_core/plugins/publish/integrate_versions_to_list.py
jakubjezek001 Jun 5, 2026
351c52f
Add early return when no list configs found
jakubjezek001 Jun 5, 2026
563af8f
rename parent_folders to list_folders
iLLiCiTiT Jun 5, 2026
f2da120
change list_folders to list of dataclasses
iLLiCiTiT Jun 5, 2026
f15b2e9
collect plugin does collect folders dataclasses
iLLiCiTiT Jun 5, 2026
0b02402
change scope type hint
iLLiCiTiT Jun 5, 2026
eb9f70b
handle all possible cases in integration
iLLiCiTiT Jun 5, 2026
38dbbdd
allow to define scope of folders in settings
iLLiCiTiT Jun 5, 2026
1f6d845
change layout
iLLiCiTiT Jun 5, 2026
a343264
added some explanation to the settings
iLLiCiTiT Jun 5, 2026
718103d
use label instead of name on list config
iLLiCiTiT Jun 5, 2026
5c7ed76
add comment to settings
iLLiCiTiT Jun 5, 2026
422c677
added bypass for scope handling
iLLiCiTiT Jun 5, 2026
f81d0a4
Merge pull request #1877 from ynput/enhancement/ExtractThumbnail_work…
iLLiCiTiT Jun 5, 2026
e2135b4
Merge branch 'develop' into bugfix/load_placeholder_filter_product_ba…
iLLiCiTiT Jun 5, 2026
0f71264
Merge pull request #1872 from ynput/bugfix/load_placeholder_filter_pr…
iLLiCiTiT Jun 5, 2026
f6cd9d3
Add description to EntityListFolderModel label field
jakubjezek001 Jun 5, 2026
b1d2ae3
Merge branch 'develop' into feature/YN-0770-csv-ingest-populated-in-n…
iLLiCiTiT Jun 5, 2026
d1373c2
Merge pull request #1871 from ynput/feature/YN-0770-csv-ingest-popula…
iLLiCiTiT Jun 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions client/ayon_core/pipeline/structures.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from __future__ import annotations

from dataclasses import dataclass, field
from typing import Literal

ListType = Literal["generic", "review-session"]


@dataclass
class ListConfigFolder:
label: str
# Empty list means the folder is visible for all list types
scope: list[ListType] = field(default_factory=list)
color: str | None = None
icon: str | None = None


@dataclass
class ListConfig:
"""Define a list."""
label: str
list_type: ListType = "generic"
list_folders: list[ListConfigFolder] = field(default_factory=list)
11 changes: 8 additions & 3 deletions client/ayon_core/pipeline/workfile/workfile_template_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1678,12 +1678,17 @@ def _get_representations(self, placeholder):
if not folder_ids:
return []

# TODO this should filter by product_base_types
# - that can change only when AYON server 1.14.0 is required
filter_key = "product_base_types"
if ayon_api.get_server_version_tuple() < (1, 14, 0):
filter_key = "product_types"
filter_kwargs = {
filter_key: {product_base_type},
}

products = list(get_products(
project_name,
folder_ids=folder_ids,
product_types={product_base_type},
**filter_kwargs,
fields={"id", "name"}
))
filtered_product_ids = set()
Expand Down
90 changes: 90 additions & 0 deletions client/ayon_core/plugins/publish/collect_version_to_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
from __future__ import annotations

import pyblish.api
from ayon_core.lib import filter_profiles
from ayon_core.pipeline.structures import ListConfig, ListConfigFolder


class CollectVersionToList(pyblish.api.InstancePlugin):
"""Collect Version to List."""

order = pyblish.api.CollectorOrder + 0.499
label = "Collect Version to List"
settings_category = "core"

profiles = []

def process(self, instance):
if "versionLists" in instance.data:
version_lists = instance.data["versionLists"]
self.log.debug(f"Version lists already collected: {version_lists}")
return

version_lists: list[ListConfig] = []
instance.data["versionLists"] = version_lists

profile = self._get_profile_for_instance(instance)
if not profile:
self.log.debug(f"No profile found for instance {instance}")
return

list_folders = []
for item in profile["list_folders"]:
scope = []
if item["scope_def"] == "list_type":
scope.append(profile["list_type"])

list_folders.append(
ListConfigFolder(
label=item["label"],
scope=scope,
)
)

version_lists.append(
ListConfig(
label=profile["list_name"],
list_type=profile["list_type"],
list_folders=list_folders,
)
)
self.log.debug(f"Collected version lists: {version_lists}")

def _get_profile_for_instance(
self,
instance: pyblish.api.Instance
) -> dict | None:
"""Returns profile for the given instance."""
host_name = instance.context.data["hostName"]
product_base_type = instance.data.get("productBaseType")
if not product_base_type:
product_base_type = instance.data["productType"]
product_name = instance.data["productName"]
task_data = instance.data["anatomyData"].get("task", {})
task_name = task_data.get("name")
task_type = task_data.get("type")
filtering_criteria = {
"host_names": host_name,
"product_base_types": product_base_type,
"product_names": product_name,
"task_names": task_name,
"task_types": task_type,
}
profile = filter_profiles(
self.profiles,
filtering_criteria,
logger=self.log
)

if not profile:
self.log.debug(
"Skipped instance. None of profiles in presets are for"
f' Host name: "{host_name}"'
f' | Product base type: "{product_base_type}"'
f' | Product name: "{product_name}"'
f' | Task name "{task_name}"'
f' | Task type "{task_type}"'
)
return None

return profile
1 change: 1 addition & 0 deletions client/ayon_core/plugins/publish/extract_thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
"unreal",
"houdini",
"batchdelivery",
"workflow",
]
settings_category = "core"
enabled = False
Expand Down
1 change: 1 addition & 0 deletions client/ayon_core/plugins/publish/integrate_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def _upload_reviewable(self, project_name, version_id, instance):
# Pass headers to fix bug in ayon-api (fixed in 1.2.15)
headers={},
)
instance.data["hasWebreview"] = True
except Exception as exc:
self.log.warning(
f"Review upload failed after {time.time() - start}s.",
Expand Down
Loading
Loading