Skip to content

Commit 69e4fb0

Browse files
authored
Merge branch 'develop' into enhancement/product-name-template-settings
2 parents 15af2c0 + 46da65b commit 69e4fb0

15 files changed

Lines changed: 22 additions & 58 deletions

File tree

client/ayon_core/host/host.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def get_current_project_name(self) -> str:
137137
def get_current_folder_path(self) -> Optional[str]:
138138
"""
139139
Returns:
140-
Optional[str]: Current asset name.
140+
Optional[str]: Current folder path.
141141
142142
"""
143143
return os.environ.get("AYON_FOLDER_PATH")

client/ayon_core/pipeline/load/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ def get_representation_by_names(
948948
version_name: Union[int, str],
949949
representation_name: str,
950950
) -> Optional[dict]:
951-
"""Get representation entity for asset and subset.
951+
"""Get representation entity for folder and product.
952952
953953
If version_name is "hero" then return the hero version
954954
If version_name is "latest" then return the latest version
@@ -966,7 +966,7 @@ def get_representation_by_names(
966966
return None
967967

968968
if isinstance(product_name, dict) and "name" in product_name:
969-
# Allow explicitly passing subset document
969+
# Allow explicitly passing product entity document
970970
product_entity = product_name
971971
else:
972972
product_entity = ayon_api.get_product_by_name(

client/ayon_core/pipeline/template_data.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def get_folder_template_data(folder_entity, project_name):
9696
9797
Output dictionary contains keys:
9898
- 'folder' - dictionary with 'name' key filled with folder name
99-
- 'asset' - folder name
10099
- 'hierarchy' - parent folder names joined with '/'
101100
- 'parent' - direct parent name, project name used if is under
102101
project
@@ -132,7 +131,6 @@ def get_folder_template_data(folder_entity, project_name):
132131
"path": path,
133132
"parents": parents,
134133
},
135-
"asset": folder_name,
136134
"hierarchy": hierarchy,
137135
"parent": parent_name
138136
}

client/ayon_core/pipeline/version_start.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1+
from __future__ import annotations
2+
from typing import Optional, Any
3+
14
from ayon_core.lib.profiles_filtering import filter_profiles
25
from ayon_core.settings import get_project_settings
36

47

58
def get_versioning_start(
6-
project_name,
7-
host_name,
8-
task_name=None,
9-
task_type=None,
10-
product_type=None,
11-
product_name=None,
12-
project_settings=None,
13-
):
9+
project_name: str,
10+
host_name: str,
11+
task_name: Optional[str] = None,
12+
task_type: Optional[str] = None,
13+
product_type: Optional[str] = None,
14+
product_name: Optional[str] = None,
15+
project_settings: Optional[dict[str, Any]] = None,
16+
) -> int:
1417
"""Get anatomy versioning start"""
1518
if not project_settings:
1619
project_settings = get_project_settings(project_name)
@@ -22,14 +25,12 @@ def get_versioning_start(
2225
if not profiles:
2326
return version_start
2427

25-
# TODO use 'product_types' and 'product_name' instead of
26-
# 'families' and 'subsets'
2728
filtering_criteria = {
2829
"host_names": host_name,
29-
"families": product_type,
30+
"product_types": product_type,
31+
"product_names": product_name,
3032
"task_names": task_name,
3133
"task_types": task_type,
32-
"subsets": product_name
3334
}
3435
profile = filter_profiles(profiles, filtering_criteria)
3536

client/ayon_core/pipeline/workfile/workfile_template_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,7 @@ def get_load_plugin_options(self, options=None):
14831483
tooltip=(
14841484
"Link Type\n"
14851485
"\nDefines what type of link will be used to"
1486-
" link the asset to the current folder."
1486+
" link the product to the current folder."
14871487
)
14881488
),
14891489
attribute_definitions.EnumDef(

client/ayon_core/plugins/load/create_hero_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class CreateHeroVersion(load.ProductLoaderPlugin):
6262

6363
ignored_representation_names: list[str] = []
6464
db_representation_context_keys = [
65-
"project", "folder", "asset", "hierarchy", "task", "product",
66-
"subset", "family", "representation", "username", "user", "output"
65+
"project", "folder", "hierarchy", "task", "product",
66+
"representation", "username", "user", "output"
6767
]
6868
use_hardlinks = False
6969

client/ayon_core/plugins/publish/collect_anatomy_instance_data.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,6 @@ def fill_anatomy_data(self, context):
301301
product_name = instance.data["productName"]
302302
product_type = instance.data["productType"]
303303
anatomy_data.update({
304-
"family": product_type,
305-
"subset": product_name,
306304
"product": {
307305
"name": product_name,
308306
"type": product_type,

client/ayon_core/plugins/publish/collect_managed_staging_dir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CollectManagedStagingDir(pyblish.api.InstancePlugin):
2525
Location of the folder is configured in:
2626
`ayon+anatomy://_/templates/staging`.
2727
28-
Which family/task type/subset is applicable is configured in:
28+
Which product type/task type/product is applicable is configured in:
2929
`ayon+settings://core/tools/publish/custom_staging_dir_profiles`
3030
"""
3131

client/ayon_core/plugins/publish/extract_burnin.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -316,22 +316,8 @@ def main_process(self, instance):
316316
burnin_values = {}
317317
for key in self.positions:
318318
value = burnin_def.get(key)
319-
if not value:
320-
continue
321-
# TODO remove replacements
322-
burnin_values[key] = (
323-
value
324-
.replace("{task}", "{task[name]}")
325-
.replace("{product[name]}", "{subset}")
326-
.replace("{Product[name]}", "{Subset}")
327-
.replace("{PRODUCT[NAME]}", "{SUBSET}")
328-
.replace("{product[type]}", "{family}")
329-
.replace("{Product[type]}", "{Family}")
330-
.replace("{PRODUCT[TYPE]}", "{FAMILY}")
331-
.replace("{folder[name]}", "{asset}")
332-
.replace("{Folder[name]}", "{Asset}")
333-
.replace("{FOLDER[NAME]}", "{ASSET}")
334-
)
319+
if value:
320+
burnin_values[key] = value
335321

336322
# Remove "delete" tag from new representation
337323
if "delete" in new_repre["tags"]:

client/ayon_core/plugins/publish/integrate.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@ class IntegrateAsset(pyblish.api.InstancePlugin):
123123
"representation",
124124
"username",
125125
"output",
126-
# OpenPype keys - should be removed
127-
"asset", # folder[name]
128-
"subset", # product[name]
129-
"family", # product[type]
130126
]
131127

132128
def process(self, instance):

0 commit comments

Comments
 (0)