Jump to content

Custom Location


Baloo

Recommended Posts

Hello there !

I'm currently trying to dig a bit into the API with my modest knowledge of Python. I've described what I want to do in a post last week.

"I've created a Storage Scenario in our local server (let's name it G:) and a new project for an episode of a TV Show. It goes like this in my project list : TV Show (project) -> Episode XX (episode) -> Shot_XXX (shot) -> compositing (task). Moreover, we're working on After Effects.

What I want to do is, when I press the "publish" button in the ftrack extension in AE, for him to render and publish a .mov in 

G:/TV Show/Episode XX/Shot_XXX called Shot_XXX_v001.mov

and then only, if other publishs happen, to create Shot_XXX_v002.movShot_XXX_v003.mov, etc....

but actualy is creating the following

G:/tv_show/episode_XX/shot_XXX/shot_XXX/v001 and then create a main.mov inside."

 

I've read all the API Menu, succeed in installing the API, Python 2.7, have connected to my session , went through the Locations Tutorial and even created my own via the API but I still don't get it...Is there any code examples that I can get inspired of ?

All along the tutorial, I didn't recognize any example of where I must put my path or  what I've to type to access what I want to change. I'm aware that it have something to do with the DiskAccessor plugin but how do I have to use it ?

Is there some script anywhere that I can read to learn ? Or have I a goal to hard for someone who have no solid python basis ?

Link to comment
Share on other sites

18 hours ago, Baloo said:

All along the tutorial, I didn't recognize any example of where I must put my path or  what I've to type to access what I want to change. I'm aware that it have something to do with the DiskAccessor plugin but how do I have to use it ?

There is something called a "Structure" that each location have that defines to the location how to generate a path from the component that you publish. You can see the Standard one that we ship with the centralised storage location here:

https://bitbucket.org/ftrack/ftrack-python-api/src/28a17e9f54b516369ea9f1a999d8fcda41a705b8/source/ftrack_api/structure/standard.py?at=master&fileviewer=file-view-default

When you configure your location you can use your own custom structure instead of the ftrack_api.structure.id.IdStructure(): http://ftrack-python-api.rtd.ftrack.com/en/stable/locations/configuring.html#configuring-automatically 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...