cielo Posted May 20, 2017 Report Posted May 20, 2017 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
Eric Hermelin Posted May 22, 2017 Report Posted May 22, 2017 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
cielo Posted May 23, 2017 Author Report Posted May 23, 2017 I am a bit confused, I have created two locations, twr.tp.x and twr.tp.y 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?
Mattias Lagergren Posted May 23, 2017 Report Posted May 23, 2017 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
cielo Posted May 24, 2017 Author Report Posted May 24, 2017 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?
Eric Hermelin Posted May 24, 2017 Report Posted May 24, 2017 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
cielo Posted May 24, 2017 Author Report Posted May 24, 2017 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?
Mattias Lagergren Posted May 24, 2017 Report Posted May 24, 2017 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.
cielo Posted May 25, 2017 Author Report Posted May 25, 2017 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 ?
Mattias Lagergren Posted May 25, 2017 Report Posted May 25, 2017 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?
cielo Posted May 26, 2017 Author Report Posted May 26, 2017 Yes, please. That would be very helpful. Please contact me at yipeng.lin@twrglobal.com Thank you for your help.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.