Skip to content

Commit 3dc2433

Browse files
authored
Merge pull request #76 from ynput/enhancement/75-product-base-types-add-support-to-creators
🏛️Product base types: add support to creators
2 parents 28b7dc1 + bab221f commit 3dc2433

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

client/ayon_resolve/plugins/create/create_editorial_package.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class CreateEditorialPackage(ResolveCreator):
2424
identifier = "io.ayon.creators.resolve.editorial_pkg"
2525
label = "Editorial Package"
2626
product_type = "editorial_pkg"
27+
product_base_type = "editorial_pkg"
2728
icon = "camera"
2829
defaults = ["Main"]
2930

client/ayon_resolve/plugins/create/create_shot_clip.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ def remove_instances(self, instances):
165165
class ResolveShotInstanceCreator(_ResolveInstanceClipCreator):
166166
"""Shot product type creator class"""
167167
identifier = "io.ayon.creators.resolve.shot"
168-
product_type = "shot"
168+
product_type = "shot"
169+
product_base_type = "shot"
169170
label = "Editorial Shot"
170171

171172
def get_instance_attr_defs(self):
@@ -226,7 +227,7 @@ def get_attr_defs_for_instance(self, instance):
226227
)
227228
]
228229

229-
if self.product_type in ("plate", "audio"):
230+
if self.product_base_type in ("plate", "audio"):
230231
instance_attributes.append(
231232
BoolDef(
232233
"review",
@@ -236,7 +237,7 @@ def get_attr_defs_for_instance(self, instance):
236237
)
237238
)
238239

239-
if self.product_type == "plate":
240+
if self.product_base_type == "plate":
240241
current_review = instance.creator_attributes.get("review", False)
241242
instance_attributes.append(
242243
EnumDef(
@@ -263,13 +264,15 @@ class EditorialPlateInstanceCreator(_ResolveInstanceClipCreatorBase):
263264
"""Plate product type creator class"""
264265
identifier = "io.ayon.creators.resolve.plate"
265266
product_type = "plate"
267+
product_base_type = "plate"
266268
label = "Editorial Plate"
267269

268270

269271
class EditorialAudioInstanceCreator(_ResolveInstanceClipCreatorBase):
270272
"""Audio product type creator class"""
271273
identifier = "io.ayon.creators.resolve.audio"
272274
product_type = "audio"
275+
product_base_type = "audio"
273276
label = "Editorial Audio"
274277

275278

@@ -279,6 +282,7 @@ class CreateShotClip(plugin.ResolveCreator):
279282
identifier = "io.ayon.creators.resolve.clip"
280283
label = "Create Publishable Clip"
281284
product_type = "editorial"
285+
product_base_type = "editorial"
282286
icon = "film"
283287
defaults = ["Main"]
284288

@@ -629,6 +633,7 @@ def create(self, subset_name, instance_data, pre_create_data):
629633
{
630634
"variant": "main",
631635
"productType": "shot",
636+
"productBaseType": "shot",
632637
"productName": "shotMain",
633638
"label": f"{shot_folder_path} shotMain",
634639
}
@@ -673,6 +678,7 @@ def create(self, subset_name, instance_data, pre_create_data):
673678
elif creator_id == audio_creator_id:
674679
sub_instance_data["variant"] = "main"
675680
sub_instance_data["productType"] = "audio"
681+
sub_instance_data["productBaseType"] = "audio"
676682
sub_instance_data["productName"] = "audioMain"
677683

678684
parenting_data = shot_instances[shot_creator_id]

client/ayon_resolve/plugins/create/create_workfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class CreateWorkfile(AutoCreator):
1717
identifier = "io.ayon.creators.resolve.workfile"
1818
label = "Workfile"
1919
product_type = "workfile"
20+
product_base_type = "workfile"
2021

2122
default_variant = "Main"
2223

0 commit comments

Comments
 (0)