Hi guys,
I'm struggling a little bit with our asset template definitions. Our token separators are '_' and we also allow the use of '_' in the asset names.
So given the template attached, a call to template.get_fields for a model named 'tk_asset_01_mod_lo' leads to the following error message:
Template <Sgtk TemplateString asset_model_name: {Asset}_{Step}_[{name}_]{lod}>: Ambiguous values found for key 'Asset' could be any of: 'tk', 'tk_asset', 'tk_asset_01'
The first workaround I found to make this work is to force the length of the Step token to 3, as our steps use currently 3 char names . An other way is to add an exclusion list to the Step token. What bothers me doing that is the Step token is linked to Shotgun entity and I don't want to duplicate the list of possible values nor force the length to a value that may change when I add a new Step to our pipeline.
Is there another more elegant solution?
Why not allow the template system to check those values from Shotgun using a new template option. Directly using Shotgun will slowdown the templates resolution so maybe we can use the path_cache for that purpose.
Meanwhile I will limit the length of the token but I would really like to use another solution.
Thanks
asset_name_template.yml