mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Merge remote-tracking branch 'origin/develop' into enhancement/1296-product-base-types-support-in-integrator
This commit is contained in:
commit
85668a1b74
16 changed files with 223 additions and 82 deletions
|
|
@ -87,15 +87,19 @@ class ExtractOIIOTranscode(publish.Extractor):
|
|||
profile_output_defs = profile["outputs"]
|
||||
new_representations = []
|
||||
repres = instance.data["representations"]
|
||||
for idx, repre in enumerate(list(repres)):
|
||||
# target space, display and view might be defined upstream
|
||||
# TODO: address https://github.com/ynput/ayon-core/pull/1268#discussion_r2156555474
|
||||
# Implement upstream logic to handle target_colorspace,
|
||||
# target_display, target_view in other DCCs
|
||||
target_colorspace = False
|
||||
target_display = instance.data.get("colorspaceDisplay")
|
||||
target_view = instance.data.get("colorspaceView")
|
||||
|
||||
scene_display = instance.data.get(
|
||||
"sceneDisplay",
|
||||
# Backward compatibility
|
||||
instance.data.get("colorspaceDisplay")
|
||||
)
|
||||
scene_view = instance.data.get(
|
||||
"sceneView",
|
||||
# Backward compatibility
|
||||
instance.data.get("colorspaceView")
|
||||
)
|
||||
|
||||
for idx, repre in enumerate(list(repres)):
|
||||
self.log.debug("repre ({}): `{}`".format(idx + 1, repre["name"]))
|
||||
if not self._repre_is_valid(repre):
|
||||
continue
|
||||
|
|
@ -142,24 +146,18 @@ class ExtractOIIOTranscode(publish.Extractor):
|
|||
|
||||
transcoding_type = output_def["transcoding_type"]
|
||||
|
||||
# NOTE: we use colorspace_data as the fallback values for
|
||||
# the target colorspace.
|
||||
# Set target colorspace/display/view based on transcoding type
|
||||
target_colorspace = None
|
||||
target_view = None
|
||||
target_display = None
|
||||
if transcoding_type == "colorspace":
|
||||
# TODO: Should we fallback to the colorspace
|
||||
# (which used as source above) ?
|
||||
# or should we compute the target colorspace from
|
||||
# current view and display ?
|
||||
target_colorspace = (output_def["colorspace"] or
|
||||
colorspace_data.get("colorspace"))
|
||||
target_colorspace = output_def["colorspace"]
|
||||
elif transcoding_type == "display_view":
|
||||
display_view = output_def["display_view"]
|
||||
target_view = (
|
||||
display_view["view"]
|
||||
or colorspace_data.get("view"))
|
||||
target_display = (
|
||||
display_view["display"]
|
||||
or colorspace_data.get("display")
|
||||
)
|
||||
# If empty values are provided in output definition,
|
||||
# fallback to scene display/view that is collected from DCC
|
||||
target_view = display_view["view"] or scene_view
|
||||
target_display = display_view["display"] or scene_display
|
||||
|
||||
# both could be already collected by DCC,
|
||||
# but could be overwritten when transcoding
|
||||
|
|
|
|||
|
|
@ -163,7 +163,8 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
"flame",
|
||||
"unreal",
|
||||
"batchdelivery",
|
||||
"photoshop"
|
||||
"photoshop",
|
||||
"substancepainter",
|
||||
]
|
||||
|
||||
settings_category = "core"
|
||||
|
|
|
|||
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue