lloydwood Posted July 11, 2018 Report Share Posted July 11, 2018 Hello, I'm new to Ftrack and I'm trying to write an action that displays info about what is selected (type, name, id etc). Mainly this is for us developers because I couldn't see a way to see the id of an object on the web front end. The problem I'm having is that whatever I select returns task as the entityType, whether it is a task or not. If you then query the session with the correct type and the entityId, you get a result otherwise you get None. My workaround for this would be to query every type until I got a result but in order to that I need a list of object types. How can I get that? Thanks, Dan Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted July 12, 2018 Report Share Posted July 12, 2018 Hi Dan, the task is an legacy style notation for what we in the current API have as TypedContext. To fetch a Task, Shot, Sequence, Folder, Milestone etc.. that are sub-types of the TypedContext you can use: session.query('TypedContext where id is "{0}"'.format(entity_id)').one() Link to comment Share on other sites More sharing options...
lloydwood Posted July 12, 2018 Author Report Share Posted July 12, 2018 Ah. Ok. Cool. That makes more sense now. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.