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

Render layer name collector #67

Merged
merged 10 commits into from
Sep 20, 2024

Conversation

antirotor
Copy link
Member

@antirotor antirotor commented Aug 8, 2024

Changelog Description

This PR adds collector for render layer names - so they can be used later on in anatomy templates (either for publishing or delivery).

Warning

Due to the dynamic nature of product templates it is difficult to determine good group_name from that. It should be basically product_name without aov data in it, but since the product name template might look like {product[type]}<{Renderlayer}><_{Aov}>, it is difficult to get it just from the resolved string.

Additional info

Note

To make use of the collected data, you need ynput/ayon-core#841. This is continuation of ynput/ayon-core#447

Testing notes:

  1. With mentioned ayon-core PR enable new behavior in the settings
  2. Set render product name template correctly
  3. Render something (locally and on farm)

@antirotor antirotor added the type: enhancement Improvement of existing functionality or minor addition label Aug 8, 2024
@antirotor antirotor self-assigned this Aug 8, 2024
@antirotor antirotor marked this pull request as ready for review August 9, 2024 12:34
Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a simple test with both local and farm rendering mantra. It is rendered successfully.
image
I will test it with different template later to double confirm

@MustafaJafar
Copy link
Contributor

MustafaJafar commented Aug 12, 2024

I need to say, that adding a wrong/bad value for templates name profiles can lead to this error.
image

and, they may be clueless until they open the details page.
for reference, Here's my render profile template {product[type]}<_{Renderlayer}>
image

So, could we do something to help about it ?
maybe CollectLocalRenderInstances message about creating instances with the same name.

@moonyuet
Copy link
Member

I need to say, that adding a wrong/bad value for templates name profiles can lead to this error.

This product name template is not applicable for the houdini host only, guess we should check if there is wrong template name generally.

So, could we do something to help about it ? maybe CollectLocalRenderInstances message about creating instances with the same name.

From your screenshot, it seems there is something wrong when creating render instances with specific name which these variants name doesn't get check which leads to the duplicates. It is supposed that it is always checking(it works at least when we create rop instance with the same names.

antirotor and others added 2 commits August 19, 2024 15:36
…nces.py

Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com>
@antirotor
Copy link
Member Author

I've added some help in ynput/ayon-core@f752940

With product name templates (not just connected to these PRs), they need to be configured really carefuly. Any mistake can break a lot of things so it shouldn't be something artists themselves hit that often.

Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firstly, I must have a template profile for render in Houdini, otherwise the publisher will complain about having multiple instances with the same name.
image


Farm doesn't use the correct naming but it works locally.
image

Local Log:
image

From Farm job json file:

{
    .
    .
    "instances": [
        {
            "aov": "beauty",
            "productGroup": "renderCfxMantra_ropTest",
            "productName": "renderCfxMantra_ropTest_beauty",
            "productType": "render",
            "renderlayer": "mantra_ropTest",
            .
            .
        },
        {
            "aov": "N",
            "productGroup": "renderCfxMantra_ropTest",
            "productName": "renderCfxMantra_ropTest_N",
            "productType": "render",
            "renderlayer": "mantra_ropTest",
            .
            .
        },
        {
            "aov": "P",
            "productGroup": "renderCfxMantra_ropTest",
            "productName": "renderCfxMantra_ropTest_P",
            "productType": "render",
            "renderlayer": "mantra_ropTest",
            .
            .
        }
    ],
    .
    .
}

Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, this works fine on my side.
My local render and farm render are following my render product template {product[type]}<_{Renderlayer}><_{Aov}>

For information this toggle works only for farm.
Should we port its logic to CollectLocalRenderInstances?

  • ayon+settings://core/tools/creator/use_legacy_product_names_for_renders
    image

@antirotor
Copy link
Member Author

For information this toggle works only for farm. Should we port its logic to CollectLocalRenderInstances?

ah, we definitely should...

Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now is working in local and farm.
Both respect use_legacy_product_names_for_renders logic.

@antirotor
Copy link
Member Author

Tested and it works indeed, thanks.

@antirotor antirotor merged commit 68c8892 into develop Sep 20, 2024
1 check passed
@antirotor antirotor deleted the enhancement/collect-render-layer-name-from-rop branch September 20, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants