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

Allow to set an explicit AOV identifier for USD render product using attribute ayon:aov_identifier #120

Merged
Merged
Changes from 11 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
10 changes: 10 additions & 0 deletions client/ayon_houdini/plugins/publish/collect_render_products.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import hou
import pxr.UsdRender
from pxr import Usd

import pyblish.api

Expand Down Expand Up @@ -168,6 +169,15 @@ def get_aov_identifier(self, render_product):
str: The AOV identifier

"""
# Allow explicit naming through custom attribute on the render product
attr = render_product.GetPrim().GetAttribute("ayon:aov_identifier")
if attr:
aov_identifier = attr.Get(time=Usd.TimeCode.EarliestTime())
self.log.debug(
"Using explicit ayon:aov_identifier on render product"
f" '{render_product}': {aov_identifier}")
BigRoy marked this conversation as resolved.
Show resolved Hide resolved
return str(aov_identifier)

targets = render_product.GetOrderedVarsRel().GetTargets()
if len(targets) > 1:
# Cryptomattes usually are combined render vars, for example:
Expand Down
Loading