Jump to content

Custom locations


cielo

Recommended Posts

Posted

Hi Ftrack,

I am trying to write location plug-ins for our studio.

Assume I have two locations : server.a and server.b, how can I choose a location on a project basis?

ex. project_A -> server.a  and  project_B -> server.b

Posted
Hi!
 
There is currently no out of the box support for handling project specific locations.
 
1.) You could implement a custom DiskAcessor and override the `get_filesystem_path` method to return different file systems based on the resource_identifer.
 
2.) Implement your own Structure plugin, leaving your DiskAcessors prefix to "/" and moving the logic for selecting the disk into the Structure plugin. 
 
3.) Implement a custom ResourceIdentifierTransformer, this would allow you the ability to modify resource identifier before it is stored centrally and/or after it has been retrieved, but before it is used locally.
 
cheers
Eric
Posted

I am a bit confused, I have created two locations, twr.tp.x and twr.tp.y

Capture.JPG

And I need to configure storage scenario before publishing asset from ftrack-connect, but it looks like only one location can be configured.

Is it possible to configure two locations? What I want to do is to choose a location whenever a new project is created, is there any way to do that?

Capture2.JPG

Capture3.JPG

Posted

An alternative solution to handle multi disk scenarios with a proxy location. The idea being that you write a special proxy location that does not store the component but merely delegates adding components to other locations.

Setup would be something like this:

Proxy Location

priority: 1

When add_component is called, it inspects the component and what version -> project it is attached to. Depending on the project it decides another Location and call location.add_component(..) on it.

When a component's path is retrieved you will automatically pick up the correct Disk Location A, B etc. as that is where the component exists.

Disk Location A | Disk Location B | etc.

priority: 100 (so that they are not picked)

prefix: the mount points of the disk

Represents the different disks/storages that you have and want to save the files on.

 

Efestolab actually has a similar tool: http://docs.efestolab.uk/tools/proxy-location/index.html

Posted

I have seen the document of  Efesto Ftrack Proxy Location,  it says if I want to tweak the code, I need to 

1) Initialise an efesto-toolbelt shell
2) Append efesto-ftrack-proxy-location/source folder to the PYTHONPATH (or set it through the envs.py, but not recommended)
3) Now you can try to run the tests

What is an efesto-toolbelt shell? Do I need to download it from an external source?

Posted

 

Hi Again,

Sorry if there was any confusion, the proxy implementation mentioned by Mattias is a third party product just brought up as a example. If you want access to the source you would have to speak to Efestolabs directly. 
 
cheers
Eric
Posted

OK, I see.

Also, I found there's a disk setting in the system setting->connect location, if I add disks here, I can choose a location whenever a new project is created.

But there's another problem about publishing, when I publish asset from ftrack-connect-maya plug-in, the files can be published to the correct disks.

However, if I use ftrack-connect for publishing, it seems that the file can not be published to the disk.

(Please see the attachment) I've published a maya file (version 6) using ftrack connect, there is a record of publish on the webpage, but there is no v006 file folder on the disk.

How can I solve this problem?

Capture4.JPG

Posted

Which API are you writing the Locations in - the legacy one or ftrack-python-api?

The legacy disks are a bit confusing and we're still deciding where to go with them. They have two purposes in the legacy API:

  • The deprecated Connect Location uses them when publishing/importing.
  • The Un managed Location uses them to translate paths between. 

Though you can still use the disk locations in the new api / for your custom location.

Posted

I think setting disks in the system setting -> connect location can solve our problem about choosing a disk on a project basis.

But I am still trying to figure out why publish can work properly in ftrack-connect-maya but not in ftrack-connect.

When a version is published through ftrack-connect-maya, the files can be published to the right disk.

But it seems that no files will be published to the disk if ftrack-connect is used.

Do I need to configure something or write a plug-in ?

Posted
8 hours ago, Yipeng Lin said:

I think setting disks in the system setting -> connect location can solve our problem about choosing a disk on a project basis.

I see - so you are not using any custom written location / just aim to use the deprecated Connect location?

Connect would be using the un managed location as default when publishing - you can setup a plugin to bump the priority in Connect. Do you want me to send you some code to do this?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...