Merge pull request #1560 from BigRoy/bugfix/reshow_initialize_as_attribute

USD Contribution: Re-show 'initialize as' attribute for USD publishes
This commit is contained in:
Roy Nieterau 2025-12-01 10:39:19 +01:00 committed by GitHub
commit 0b29621760
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -500,7 +500,7 @@ class CollectUSDLayerContributions(pyblish.api.InstancePlugin,
"asset"
if profile.get("contribution_target_product") == "usdAsset"
else "shot")
init_as_visible = False
init_as_visible = True
# Attributes logic
publish_attributes = instance["publish_attributes"].get(
@ -844,6 +844,7 @@ class ExtractUSDAssetContribution(publish.Extractor):
# If no existing publish of this product exists then we initialize
# the layer as either a default asset or shot structure.
init_type = instance.data["contribution_target_product_init"]
self.log.debug("Initializing layer as type: %s", init_type)
asset_layer, payload_layer = self.init_layer(
asset_name=asset_name, init_type=init_type
)
@ -925,7 +926,7 @@ class ExtractUSDAssetContribution(publish.Extractor):
payload_layer.Export(payload_path, args={"format": "usda"})
self.add_relative_file(instance, payload_path)
def init_layer(self, asset_name, init_type):
def init_layer(self, asset_name: str, init_type: str):
"""Initialize layer if no previous version exists"""
if init_type == "asset":