Reload templates.yml with engine reload..


     Often when developing new apps / workflows in Maya with tk-maya, I make changes to the templates.yml file. As it currently stands, I believe I must quit Maya and reload it to get sgtk to refresh its templates index.. I've tried reloading the engine via the Shotgun->Work Area Info->Reload Engine and Apps option, but it does not seem to refresh the template. Is there a way to do this without reloading Maya? 


Thanks for any help, and keep up the cool updates.. really enjoying working with sgtk! 





  • 0
    Manne Öhrström

    Hello there Seth!

    That's a great feature request! We should add this and I will create a ticket and add to our backlog.

    In the meantime, you can work around this shortcoming by calling some private API methods from inside of maya:

    import sgtk
    from sgtk.template import read_templates
    e = sgtk.platform.current_engine()
    tk = e.sgtk
    tk.templates = read_templates(tk.pipeline_configuration)

    Try that and see how it goes - and please note that this is a temporary solution while we put more official measures in place! :)

  • 0
    Manne Öhrström

    To follow up, this has now been as an official method to the Toolkit Core API: https://support.shotgunsoftware.com/entries/95441117



Please sign in to leave a comment.