I am trying bootstrap my Shotgrid for Maya using script key method but I am facing issue
-
So basically I haven’t added any code to select particular configuration, so for default its taking
Temporal_sync configuraiton even though its not one with the most recent id (or did i miss something) -
Is there anyway I can set the primary configuration while bootstrapping
- I don’t have descriptor in primary
- Have more than one configuration with plugin-id basic.*
- I have tried setting up using dev descriptor as well but it still getting boostrapped using Temporal Sync config.
This is the script I am trying to use for bootstrapping
import os
import sys
username = os.environ["USERNAME"]
pth = 'Q:/pipelines/shotgun/tk-core/python'
sys.path.append(pth)
import sgtk
def do_bootstrap(prj_id):
sgtk.LogManager().initialize_custom_handler()
authenticator = sgtk.authentication.ShotgunAuthenticator()
authenticator.clear_default_user()
# Create a user programmatically using the script's key.
user = authenticator.create_script_user(
api_script="----",
api_key="-----",
host="----.shotgun.com"
)
sgtk.set_authenticated_user(user)
mgr = sgtk.bootstrap.ToolkitManager(user)
mgr.plugin_id = "basic.maya"
mgr.base_configuration = "sgtk:descriptor:dev?windows_path=Q:\-------/sgtk-config"
project_id = prj_id
project = {"type": "Project", "id": project_id}
engine = mgr.bootstrap_engine("tk-maya", entity=project)
context = engine.context
tk = engine.sgtk
sg = engine.shotgun
return sg