0

Reload templates.yml with engine reload..

Hello, 

     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! 

 

Seth

 

2 comments

  • 0
    Avatar
    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
    Avatar
    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

    Screen_Shot_2013-10-31_at_22.55.01.png

     

Please sign in to leave a comment.