Hey there,
I’d like to automatize some API stuff and folder creation after an Advanced Project Setup has been done on a project.
Is there a hook which would do that?
Thanks
Hey there,
I’d like to automatize some API stuff and folder creation after an Advanced Project Setup has been done on a project.
Is there a hook which would do that?
Thanks
Hey Ben – We don’t have any hooks in the advanced config setup process. If you’re running the Advanced Setup wizard in Desktop to create your configs, I don’t have any suggestions, but you could potentially write a commandline tool to setup the project then do any post-processing that you specify.
We have a tank command, tank setup_project
, that is used for this process. You could write a python script that runs the setup_project
command, followed by your desired logic.
Here are some useful links:
tank
command via API. In this case the command in question is unregister_folders
, but the general idea should work for setup_project
setup_project.py
module
setup_project
via API from one of our unit testsHope that helps! Let us know if you have any other questions.
Thanks for you answer!
Handy stuff!
Do you know if it’s possible to define the pipeline config uri to specify the branch to use? or will it only pull from master?
Alternatively, I thought I could use a shotgun descriptor to pull from the current site config, but it looks like the setup_project.py module only accepts either paths on disk, or a git repo url.
Hm wait, there is tk-config-default/after_project_create.py at master · shotgunsoftware/tk-config-default · GitHub
which looks like what you need. We have been using this for a while.
This file sits in your config root directory, not in hooks.