Skip to content

Commit

Permalink
Merge pull request #120 from BigRoy/enhancement/usd_allow_custom_aov_…
Browse files Browse the repository at this point in the history
…identifier

Allow to set an explicit AOV identifier for USD render product using attribute `ayon:aov_identifier`
  • Loading branch information
MustafaJafar authored Dec 27, 2024
2 parents 373a457 + a1d1daf commit 7f649e2
Showing 1 changed file with 10 additions and 0 deletions.
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.GetPath()}': '{aov_identifier}'")
return str(aov_identifier)

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

0 comments on commit 7f649e2

Please sign in to comment.