Skip to content

Commit d74e957

Browse files
authored
Merge pull request #55 from ynput/enhancement/product-base-type-usage
Chore: Product base types fixes
2 parents 192cc48 + de84f29 commit d74e957

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

client/ayon_fusion/plugins/publish/collect_render.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ def get_instances(self, context):
4747
continue
4848

4949
product_type = inst.data["productType"]
50-
if product_type not in ["render", "image"]:
50+
product_base_type = inst.data.get("productBaseType")
51+
if not product_base_type:
52+
product_base_type = product_type
53+
54+
if product_base_type not in ["render", "image"]:
5155
continue
5256

5357
# Get resolution from tool if we can
@@ -65,11 +69,18 @@ def get_instances(self, context):
6569

6670
instance_families = inst.data.get("families", [])
6771
product_name = inst.data["productName"]
72+
kwargs = dict(
73+
productBaseType=product_base_type,
74+
productType=product_type,
75+
)
76+
if "productBaseType" not in attr.fields_dict(FusionRenderInstance):
77+
kwargs["productType"] = kwargs.pop("productBaseType")
78+
6879
instance = FusionRenderInstance(
80+
**kwargs,
6981
tool=inst.data["transientData"]["tool"],
7082
workfileComp=comp,
71-
productType=product_type,
72-
family=product_type,
83+
family=product_base_type,
7384
families=instance_families,
7485
version=version,
7586
time="",

0 commit comments

Comments
 (0)