I’m attempting to set up naming restrictions for Assets in Projects where there previously were no such restrictions, by using the values in the templates.yml file for a couple of Projects. For the majority of Pipeline Steps, {Asset}_{Step}.v{version}.ma is exactly right for work/publish filenames, e.g. Toothbrush_MOD, Toothbrush_RIG, etc.
The one Pipeline Step where this doesn’t work is Surfacing, as there are, as a standard at my employer’s, two differently suffixed files that come out of that step (one manually created, the other automatically generated using the manual one as a source file), and neither of the suffixes use the pipeline step short name. Hypothetically e.g. Toothbrush_YY, Toothbrush_ZZ. This is legacy, there are already years worth of Asset work/publish files with this naming.
The easy part is making custom Asset keys in templates.yml (e.g. maya_asset_work_surf_yy), but beyond that I’m not sure what module hook to add for Pipeline Step logic that would determine which key to use based on the step.
Another consideration is that I’ll have to do this to both old and new style Shotgun configurations, as one of the Projects is locked into using the old style.
Advice is appreciated! If you need further clarification let me know.
Based on reading some other semi-related posts here, I’m going to try a core/hooks/pick_environment.py modification in conjunction with a custom asset_step_surfacing.yml, and see where that gets me.
Hi, trying to use the template_hook for dynamiccaly setting template based on the context.step
The problem is that inside the hook there is only the current context and not the new one being choosed for example when saving the scene.
For example:
start app (nuke)
workfiles - save
choose task
I can only see the “project context” in the hook without the selected step in 3…