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

Add ability to have folder[name] as a valid key for publish instance name #9

Closed
1 task done
moonyuet opened this issue Feb 5, 2025 · 2 comments · Fixed by #11 or ynput/ayon-core#1129
Closed
1 task done
Assignees
Labels
type: enhancement Improvement of existing functionality or minor addition

Comments

@moonyuet
Copy link
Member

moonyuet commented Feb 5, 2025

Is there an existing issue for this?

  • I have searched the existing issues and added correct labels.

Please describe the feature you have in mind and explain what the current shortcomings are?

Add ability to have
folder[name] as a valid key for publish instance name

Suggested implementation?

No response

Describe alternatives you've considered:

Note that in some creators this is specifically added already as "dynamic data", like e.g. here: https://github.com/ynput/ayon-houdini/blob/7f4b6b9464cf71bafeebe11e1c0f9f6dfa83ac36/client/ayon_houdini/plugins/create/create_staticmesh.py#L112-L134

@moonyuet moonyuet added the type: enhancement Improvement of existing functionality or minor addition label Feb 5, 2025
@moonyuet moonyuet self-assigned this Feb 5, 2025
@moonyuet moonyuet linked a pull request Feb 5, 2025 that will close this issue
@BigRoy
Copy link

BigRoy commented Feb 5, 2025

Is this referring to the publish instance name (like just how it's displayed in the UI?) or is it about the product name?

I wonder why the product name would need the folder[name] as part of it - since products are already per folder?
If for whatever reason it makes sense to allow formatting this into the product names I'd say it makes much more sense to just add that in core here: https://github.com/ynput/ayon-core/blob/d30d5b541994a2243d41252a44459d39d0696123/client/ayon_core/pipeline/create/product_name.py#L168

That way that would be supported everywhere. - it would most likely require us though to pass along the folder entity or alike to the get_product_name call - potentially changing the signature. But this oddly enough doesn't feel like "dynamic data" that should really be host implementation specific if there's a use case for it.

@munkybutt
Copy link

Hey @BigRoy - our use case is for materials that have a single output per file.
In these instances the name of the work file is the name of the published product, so to avoid duplication of effort and potential human error, having this be usable in the template name for the publish instance is ideal.
So the workfile auto-resolving to this template name will automatically cover the majority of our product names:
Stone_Gravel_001.sbs -> M_Stone_Gravel_001_Base

This is already exposed on the skeletal and static mesh creators via get_dynamic_data:

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
None yet
3 participants