From 781f2a5e4a5f59f233d80492f677ccf26dcbbd38 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 1 Oct 2024 20:09:36 +0200 Subject: [PATCH 1/2] Initial draft for publishing maya rigs into the USD asset and groundwork to publish the loaded assets as animation instances directly into the shots --- .../extract_usd_layer_contributions.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py b/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py index acdc5276f7..eda8e8710a 100644 --- a/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py +++ b/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py @@ -308,6 +308,8 @@ def process(self, instance): instance.data.get("productGroup") or "USD Layer" ) + instance.data["has_usd_contribution"] = True + # Allow formatting in variant set name and variant name data = instance.data.copy() data["layer"] = attr_values["contribution_layer"] @@ -562,6 +564,27 @@ def get_attribute_defs(cls): return defs +class CollectUSDLayerContributionsMayaRig(CollectUSDLayerContributions): + """ + This is solely here to expose the attribute definitions for the + Houdini "look" family. + """ + # TODO: Improve how this is built for the rig family + hosts = ["maya"] + families = ["rig"] + label = CollectUSDLayerContributions.label + " (Rig)" + + @classmethod + def get_attribute_defs(cls): + defs = super().get_attribute_defs() + + # Update default for department layer to look + layer_def = next(d for d in defs if d.key == "contribution_layer") + layer_def.default = "rig" + + return defs + + class ValidateUSDDependencies(pyblish.api.InstancePlugin): families = ["usdLayer"] From 6ea3e9bcd6a2005c2511a46a24d32395272a19d6 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 1 Oct 2024 20:13:28 +0200 Subject: [PATCH 2/2] Fix docstring --- .../plugins/publish/extract_usd_layer_contributions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py b/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py index eda8e8710a..4e5977766b 100644 --- a/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py +++ b/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py @@ -567,7 +567,7 @@ def get_attribute_defs(cls): class CollectUSDLayerContributionsMayaRig(CollectUSDLayerContributions): """ This is solely here to expose the attribute definitions for the - Houdini "look" family. + Maya "rig" family. """ # TODO: Improve how this is built for the rig family hosts = ["maya"]