Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Maya rig USD contribution directly into USD asset #931

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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
Maya "rig" 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"]

Expand Down