-
Notifications
You must be signed in to change notification settings - Fork 37
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
Use product name for render templates #841
Conversation
this is fixing issue where product name templates were hardcoded. Old behavior is enabled by default but deprecation warning is issued
This needs to solve |
also removing need for project settings
this solution is a little hack. proper one would be probably introducing product group name templates as mentioned in the code comment
So I've tested it in Houdini and it works. There is one specific question about the product group names - strings that are used to group related publishes together in the UI. So far the product group names were hardcoded - basically original hardcoded product name. This didn't include AOV names as they are added when render job is published so it correctly grouped together all renderpass AOVs. But with this PR, you can define product names with templates and so the group name itself cannot be that static. In this PR, I've made decision to explicitly "drop' aov name from the template data. So if you have product name template like so:
and you have render layer called
and all of them will be grouped under But at the end, we should probably have something more robust, like templates for the group name itself. This is topic for another potential PR. |
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.
I have tested both the legacy
workflow and the templated
workflow within maya
and arnold
renderer.
All seems working fine...my rendered files and folders follows the template
and also using tokens renderlayer
and aov
and also for product name
.
Here is my output with using those tokens within folderpath:
Co-authored-by: Jakub Trllo <[email protected]>
Co-authored-by: Jakub Trllo <[email protected]>
Co-authored-by: Jakub Trllo <[email protected]>
Co-authored-by: Jakub Trllo <[email protected]>
Co-authored-by: Jakub Trllo <[email protected]>
Co-authored-by: Jakub Trllo <[email protected]>
Co-authored-by: Jakub Trllo <[email protected]>
Co-authored-by: Jakub Trllo <[email protected]>
@LiborBatek could you please test it quickly for one last time? Thanks |
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.
description="Use product naming templates for renders. " | ||
"This is for backwards compatibility enabled by default." | ||
"When enabled, it will ignore any templates for renders " | ||
"that are set in the product name profiles.") |
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.
This description seems a bit awkward. First it states "use product naming templates for renders." but if this is enabled, it does not do that, but it does the opposite...
So the description is actually "Ignore product naming templates for renders but use a hardcoded template. This is for backwards compatibility..." etc. ?
check your product name templates to ensure that resolved names are | ||
sufficiently unique. You can find that settings: | ||
|
||
ayon+settings://core/tools/creator/product_name_profiles |
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.
It would be epic if somehow we can make this a hyperlink in the UI that actually links to the AYON web frontend at those settings? @dee-ynput ?
Remove the offending instances or rename to have a unique name. Also, please | ||
check your product name templates to ensure that resolved names are | ||
sufficiently unique. You can find that settings: |
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.
Admittedly as a user I wouldn't know 'what to do' at those settings to ensure the resolved uniqueness. Nothing critical - but if anyone gets this invalidation message I have a feeling we might start getting questions about this. Let's see what comes up.
Changelog Description
This is fixing the issue where product names for render products were hardcoded. Old behavior is enabled by default, but deprecation warning is issued. New behavior (where product name templates are used) is controlled by option in the settings:
ayon+settings://core/tools/creator/product_name_profiles/use_legacy_for_renders
Note
This is continuation and refactor of #447 - look there for previous discussions.
Additional info
Old behavior was bypassing any template set in
ayon+settings://core/tools/creator/product_name_profiles
. With this change, one can set template like this:{product[type]}<{Renderlayer}><_{Aov}>
resulting in:
renderMainlayer_normal
It is up to TD to set correctly such template to make sure, product name will be stable enough. As a side-effect, optional keys can be used now in product name templates adding flexibility (and perhaps some danger of misuse).
Warning
To make use of this feature,
renderlayer
need to be set on the instance along withaov
and is then collected to anatomy data. This is not in the scope of this PR (apart of the collection) and it must be implemented if following PRs to individual host addons.It can be used in template formatting so you can use template for renders like:
Note
Already collected anatomy data (when available) could be passed to
get_product_name()
to allow even more keys to be used, but is there any real use case for it?Also, as a point for discussion - there is
variant
that is now ignored in this case. It could be reasonable to use it exactly for this and move templating to "variant templates" but maybe it is breaking settings to even smaller unmanagable bits.Testing notes:
renderlayer
oraov
keys (can be optional using<{key}>
syntax){renderlayer}
or{aov}
in anatomy templatesTesting notes:
Main points:
a) It should behave as before without any changes.
b) When option is set in the settings, new behavior should kick-in and renders should start to use product name templates.
Testing steps: