How are paths magically resolved ?


let's say I have a path defined like that :


how are Sequence, Shot and Step magically replaced by actual sequence, shot and step names ? Is that configured somewhere ? 
How could I introduce something else in this path, let's say the user name the task is assigned to, or the user name running the app ?



  • 0
    Ryan Mayeda

    Hi Stephane!

    At the moment, the template syntax is a bit magical as you say. The 
    capitalized variables stand in for Shotgun entities, and they get the 
    display name based on what's in the folder schema for the corresponding 
    place in the template (so if they don't line up with one another, an error 
    will occur). We are in the process of updating this to be a bit clearer 
    and it would be great to run the new syntax by you to get your thoughts! 
    Let me know if your'e up for that!


    As for the user work directory, this is something that we don't entirely 
    support yet. It should work to base this off of task assignees, although 
    we found a bug with that which will be fixed in the next core release. 
    But, this is separate from the ability to have a user work directory based 
    entirely off the user (i.e. someone who isn't assigned a task). Does your 
    workflow require the former or the latter case? If it's the former, I can 
    provide an example for how to do that once the next core drop comes out 
    that fixes the bug with it if that helps...


  • 0
    Stephane Deverly

    Hi Ryan,

    Regarding users work directories, supervisors or leads might have to check / fix / do some work without being assigned to a task, so I would say the latter case is needed.

    Happy to have a look at the new syntax !


  • 0
    Stephane Deverly

    Thinking out loud ...

    I think it would be great to be able to register a context_hook which would a bit of Python code to resolve path entities. The current implementation only allow to return a shotgun field, it would be better if it could resolve the value for the key itself.

    What do you think ?

Please sign in to leave a comment.