Template.yml changing naming conventions


I’m hoping I can get some help with this today . Internally at the studio we use a naming convention like this FOO_101_BG_SC006_001 But what is happening it is saving it as this LAM_LAM101_LAM_101_BG_SC006_001 . Can I please get some help on how to change this proparly just for internal purposes . The client files that get delivered something simlar to this FOO_ClassroomIntFooCageCUDay_DSN.jpg that set now, and that’s okay for client files but I want to make the client files into production files they should set to this FOO_101_BG_SC006_001 . Is there guide on how to change this ? Can I be shown on how to change this and do I need to unregister ? Is the teample.yml the right place to do it ?

Hi All,

If I have to rename in the teamplates.yml file . Do I have to unregister the whole project ? What specifically do I have to unregister ?

The question is not clear. So your internal naming convention is not what you want it to be, and also you want to translate client files into internal files?

For the former, you need to modify the templates, assuming you already deployed an sgtk config (in SG desktop this is “Advanced project configuration” or something like that).

For the latter, you just create a template for the input files as well, and then translate from one template to another, and copy the files in the target location.
You could do something like

source_template = tk.templates["input_frames"]
target_template = tk.templates["nuke_exr"]
fields = source_template.get_fields(input_path)
# ... maybe add more information to the fields here
target_path = target_template.apply_fields(fields)
# finally copy the file
shutil.copy(input_path, target_path)

That means of course you need to standardize the input paths too.

Hello @mmoshev Thank you for taking the time to respond to my question. I will clarify now. This is how my naming convention

  • Changing the naming convention mid-production would mean you will need to register and unregister things please be aware is what I found in the docs.
    definition: ‘work/@shot_root/{Shot}_{step_code}_v{version}.psd’
    would become:

    FOO_101_BG_SC001_v01.psd / FOO_102_BG_SC002_003_005_007_v02.psd

    photoshop_shot_work: (as I do not know what SC002_003_005_007 stands for it is hard to know the keyword but assuming scene/shot name)
    definition: ‘work/@shot_root/Foo_{Episode}{step_code}{Shot}_v{version}.psd’

What are the steps I need to follow in order to complete this ?