Jump to content

Get Link from Task


gabgren

Recommended Posts

Posted

Hi !

 

how can i get what's linked to a task ? i can get task name, project that the task belong to, but i need to know which shot, sequence or asset is linked to this task.

 

i messed with task.getLists but got no result :(

 

thanks !

Posted

Hi !

We are currently migrating from shotgun to ftrack, maybe we don't use it the right way so thank you if you can help us figure out!
 

this getParents() brings me the Project the task belong to:

 [12] => [, 'showid': '8642d8c4-a609-11e3-9f93-6805ca0c3872', 'enddate': , 'name': 'iga2014_3164', 'projectschemeid': '2de30f32-a4d3-11e3-8c4e-6805ca0c3872', 'entityType': 'show', 'isglobal': False, 'thumbid': None, 'entityId': '8642d8c4-a609-11e3-9f93-6805ca0c3872', 'root': '', 'fullname': 'IGA2014_3164', 'diskid': '2325924e-f228-11e2-91ea-f23c91dfaa16'}')>]('{'sort':>('{'sort':>('{'sort':>('{'status':>('{'sort':>('{'sort':>('{'sort':>('{'sort':>('{'sort':>('{'status':>('{'status':>('{'status':>('{'status':>

 

what i'm looking for is the 'folder hierarchy', or asset the task belongs to. for instance this task, 'Modeling', is in the project 'IGA2014_3164' but i need to know it's the modeling for the character 'Audrey', in the Asset Builds category. If you can, have a look at the screenshot of our ftrack project and you'll see what i'm talking about:

http://imgur.com/e8UgYqV

 

EDIT: i need to say that getAssets() returns an empty list

Thanks !
 

Posted

ok, found a way! thanks.

allTasks = user.getTasks(states=[ftrack.NOT_STARTED, ftrack.IN_PROGRESS])for task in allTasks:	allAssets = task.getParents()	for asset in allAssets:		name = asset.getName()		parent = parent + ' / ' + name		print parent

Archived

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

×
×
  • Create New...