Optional SequenceKey in Template

Hi Support, 

I would like to set my template path for my texture having an optional "SequenceKey", such that users are able to publish texture of either a single image or a sequence of frames. I've set a path like this:

  • maya_shot_publish_tex: '@shot_root/publish/maya/sourceimages/{Shot}_{Step}[_{name}]/v{version}/{node}[.{SEQ}].{ext}'

When I use sgtk core API to apply an empty string to "SEQ" field, error is prompted:

# Error: <Sgtk SequenceKey SEQ> Illegal value '', expected an Integer, a frame spec or format spec.
# Valid frame specs: ['%04d', '####', '@@@@', '$F4', '<UDIM>', '$UDIM']
# Valid format strings: ['FORMAT: %d', 'FORMAT: #', 'FORMAT: @', 'FORMAT: $F', 'FORMAT: <UDIM>', 'FORMAT: $UDIM']

However when I try not to insert "SEQ" field, it returns the path with frame spec, which is not I want for the case of a single image

  • 'N:\\mnt\\job\\myProj\\sequences\\ts\\ts9040\\Light\\publish\\maya\\sourceimages\\ts9040_Light_testPublish\\v001\\myObj.%04d.tif'

I've tried managed this successfully, but with lots of logic, really exhausting. And I'm now trying to add some more cache file types with optional SequenceKey...

Would there be any smarter way to make it? Better by just giving an appropriate setting in template file?



Please sign in to leave a comment.