Template.yml per-project includes

Hey Patrick – That all makes sense. And you’re not alone in wanting this functionality; @kporangehat asks pretty much the exact same question in this post.

And I hear what you’re saying about the risks – perfectly coordinating the schema and templates is always a challenge; this definitely complicates it further, and makes me wonder if there’s not a better way to manage both in one go.

Having said all that, I did try this with a distributed config, and it worked fine for me. Here are the details of my case:

  • My distributed config is brand new, based on tk-config-default2, and identical to it, save for the modified pipeline_configuration_init.py file.
  • The contents of roots.yml (cached to ~/Library/Caches/Shotgun/tannaz/p272c319.basic.desktop/cfg/config/core/):
primary:
  default: true
  linux_path: /sgtk/projects
  mac_path: /sgtk/projects
  shotgun_storage_id: 2
  windows_path: G:\blahlbah
  • What I’m logging in pipeline_configuration_init.py (cached to ~/Library/Caches/Shotgun/bundle_cache/sg/tannaz/v1385/core/hooks/)

log.warning("STORAGE ROOT PATH: %s" % self.parent._storage_roots.default_path)

  • And the value I’m getting in the log:

STORAGE ROOT PATH: <Path win:'G:\blahlbah', linux:'/sgtk/projects', macosx:'/sgtk/projects'>

So… it should work – I’m not sure what the difference is between my case and yours, but maybe this information jogs something for you?

As a side note, I’m going to make a note to the product team about this desired functionality – the fact that it’s come up twice in a matter of days makes me think it’ll come up even more.

L:et me know if you make any progress or have any follow-up questions!

2 Likes