Importing Shotgun Toolkit config

By using standard command line Shotgun (SG) activation SG create project config that attached to the main “studio” configuration thus it’s not localized and not portable.

Command line based activation

By using “localize” Tank command config can be imported into single self contain folder that can be copied anywhere.

But copy of this config have no use until it hooked up with SG project. What if we want to hooked it up with the project that already has a internal studio config. In this example I brought a copy of my config home.

# Create SG instance
base_url = ""
sg = Shotgun(base_url, 'api_test', 'cf1e303b91800d89f596410f25690a41ba21d6211797d1daf')

def create_config(project, config_name, windows_path, mac_path, linux_path):

	data = {'project' : {'type':'Project','id':project_info(project)["id"]},
			'code' : config_name,
    		'windows_path': windows_path,
    		'mac_path' : mac_path,
    		'linux_path' : linux_path}

	create = sg.create("PipelineConfiguration", data)
	return create

create_config('Pipeline Research Project', 'External', 'Z:\software\shotgun\pipeline_research_project', '/Volumes/mnt', '/Volumes/mnt')


You will get permission denied error if you create “sg” object by authenticating “humanUser”. Shotgun object has to be constructed from API script.


Since the path where I want to store my project at home doesnt necessary match my studio setup we want to tell Shotgun where to look bu configure Local File Storage in SH Website Preferences.


There are couple files that need to be corrected in you duplicated config folder that it corresponds with the new Pipeline Configuration on SG website.

config/core/pipeline_configuration.yml should look something like that

{pc_id: 41, pc_name: External, project_id: 278, project_name: pipeline_research_project, published_file_entity_type: PublishedFile,
  use_shotgun_path_cache: true}



primary: {linux_path: /Volumes/mnt/projects, mac_path: /Volumes/mnt/projects, windows_path: 'Z:\projects'}
external: {linux_path: /Volumes/mnt/projects, mac_path: /Volumes/mnt/projects, windows_path: 'Z:\projects'}


I mounted “Z:” network drive to make it consistent among all external artist.


Author: Kirill Kovalevskiy

I'm an engineer artist and entrepreneur who mostly focused on technology and automation across wide range of domains. I'm passionate about mixing technology and art which I express trough visual effects and videography.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s