-
Notifications
You must be signed in to change notification settings - Fork 10
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
base: develop
Are you sure you want to change the base?
Allow to set an explicit AOV identifier for USD render product using attribute ayon:aov_identifier
#120
Conversation
…attribute `ayon:aov_identifier`
Hey! @BigRoy I tested this,
The above is the error log, when I tried to publish. I was just wondering where should I add the wrangle? |
tested again:
It got published successfully, skipping the bty and publishing the dcm alone |
@krishnaavril So did it work for your use case? :) By the way - with this fix you should be able to publish both the render products just fine from one publish instance in one go. |
No @BigRoy The best way I would imagine is I also noticed if we keep the log(checkpoint) option enabled in labs karma, ayon publishing checkpoint as new layer, we need same approach for dcm |
The thing is that This images shows what I mean. Let me create a quick PR. |
@@ -166,6 +166,15 @@ def get_aov_identifier(self, render_product): | |||
str: The AOV identifier | |||
|
|||
""" | |||
# Allow explicit naming through custom attribute on the render product | |||
aov_identifier = render_product.GetPrim().GetAttribute( | |||
"ayon:aov_identifier").Get() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: using time 0 may not be recommended although it's being used with render targets here
Anyways, we can use the earliest time.
but keep in mind, we still need to add this 👇 import at the top.
from pxr import Usd
"ayon:aov_identifier").Get() | |
"ayon:aov_identifier").Get(time=Usd.TimeCode.EarliestTime()) |
if aov_identifier: | ||
self.log.debug( | ||
"Using explicit ayon:aov_identifier on render product" | ||
" '{render_product}': {aov_identifier}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a missing f
here
" '{render_product}': {aov_identifier}") | |
f" '{render_product}': {aov_identifier}") |
Changelog Description
Allow to set an explicit AOV identifier for USD render product using attribute
ayon:aov_identifier
Additional info
This is a way to override the default behavior that defines what "AOV" identifier is computed for a Render Product. You can now set a string attribute on the Render Product prim called
ayon:aov_identifier
.For example a Attribute Wrangle LOP could do:
So that publish logic will make that render product interpreted as the "dcm" AOV - separating it from other layers.
This may fix (or workaround) #105
Testing notes: