Merge branch 'develop' into enhancement/launcher_action_to_create_folder_structure

This commit is contained in:
Roy Nieterau 2025-03-10 12:11:20 +01:00 committed by GitHub
commit 1cf0cc5736
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 2 deletions

View file

@ -479,6 +479,7 @@ class CollectUSDLayerContributions(pyblish.api.InstancePlugin,
profile = {} profile = {}
# Define defaults # Define defaults
default_enabled = profile.get("contribution_enabled", True)
default_contribution_layer = profile.get( default_contribution_layer = profile.get(
"contribution_layer", None) "contribution_layer", None)
default_apply_as_variant = profile.get( default_apply_as_variant = profile.get(
@ -513,7 +514,7 @@ class CollectUSDLayerContributions(pyblish.api.InstancePlugin,
"In both cases the USD data itself is free to have " "In both cases the USD data itself is free to have "
"references and sublayers of its own." "references and sublayers of its own."
), ),
default=True), default=default_enabled),
TextDef("contribution_target_product", TextDef("contribution_target_product",
label="Target product", label="Target product",
tooltip=( tooltip=(

View file

@ -91,6 +91,15 @@ class CollectUSDLayerContributionsProfileModel(BaseSettingsModel):
" creating from within that task type." " creating from within that task type."
), ),
) )
contribution_enabled: bool = SettingsField(
True,
title="Contribution Enabled (default)",
description=(
"The default state for USD Contribution being marked enabled or"
" disabled for this profile."
),
section="Instance attribute defaults",
)
contribution_layer: str = SettingsField( contribution_layer: str = SettingsField(
"", "",
title="Contribution Department Layer", title="Contribution Department Layer",
@ -99,7 +108,6 @@ class CollectUSDLayerContributionsProfileModel(BaseSettingsModel):
" matching this profile. The layer name should be in the" " matching this profile. The layer name should be in the"
" 'Department Layer Orders' list to get a sensible order." " 'Department Layer Orders' list to get a sensible order."
), ),
section="Instance attribute defaults",
) )
contribution_apply_as_variant: bool = SettingsField( contribution_apply_as_variant: bool = SettingsField(
True, True,
@ -1082,6 +1090,7 @@ DEFAULT_PUBLISH_VALUES = {
{ {
"product_types": ["model"], "product_types": ["model"],
"task_types": [], "task_types": [],
"contribution_enabled": True,
"contribution_layer": "model", "contribution_layer": "model",
"contribution_apply_as_variant": True, "contribution_apply_as_variant": True,
"contribution_target_product": "usdAsset" "contribution_target_product": "usdAsset"
@ -1089,6 +1098,7 @@ DEFAULT_PUBLISH_VALUES = {
{ {
"product_types": ["look"], "product_types": ["look"],
"task_types": [], "task_types": [],
"contribution_enabled": True,
"contribution_layer": "look", "contribution_layer": "look",
"contribution_apply_as_variant": True, "contribution_apply_as_variant": True,
"contribution_target_product": "usdAsset" "contribution_target_product": "usdAsset"
@ -1096,6 +1106,7 @@ DEFAULT_PUBLISH_VALUES = {
{ {
"product_types": ["groom"], "product_types": ["groom"],
"task_types": [], "task_types": [],
"contribution_enabled": True,
"contribution_layer": "groom", "contribution_layer": "groom",
"contribution_apply_as_variant": True, "contribution_apply_as_variant": True,
"contribution_target_product": "usdAsset" "contribution_target_product": "usdAsset"
@ -1103,6 +1114,7 @@ DEFAULT_PUBLISH_VALUES = {
{ {
"product_types": ["rig"], "product_types": ["rig"],
"task_types": [], "task_types": [],
"contribution_enabled": True,
"contribution_layer": "rig", "contribution_layer": "rig",
"contribution_apply_as_variant": True, "contribution_apply_as_variant": True,
"contribution_target_product": "usdAsset" "contribution_target_product": "usdAsset"
@ -1110,6 +1122,7 @@ DEFAULT_PUBLISH_VALUES = {
{ {
"product_types": ["usd"], "product_types": ["usd"],
"task_types": [], "task_types": [],
"contribution_enabled": True,
"contribution_layer": "assembly", "contribution_layer": "assembly",
"contribution_apply_as_variant": False, "contribution_apply_as_variant": False,
"contribution_target_product": "usdShot" "contribution_target_product": "usdShot"