Brian Posted April 3 Report Share Posted April 3 When I use Quote selections = event['data']['selection'] to get folder, shots or milestones, the returned entityName is task. How can I read the correct entityName Link to comment Share on other sites More sharing options...
Lorenzo Angeli Posted April 4 Report Share Posted April 4 Hi @Brian, as you are provided with the id , you can use entity = session.get('Context', "<id>") print(entity['name']) let us know if this is what you are after. Hope it helps. L. Link to comment Share on other sites More sharing options...
Brian Posted April 10 Author Report Share Posted April 10 Thanks, Lorenzo. I'm so sorry, I misdescribed the problem, what I can't get the return value correctly is the entityType. When I am at the entity of Folder, Shot, or Milestone, the entityType return value is always a task. I try to use _context = self.session.get('Context',selection['entityId']) but the return is None. I can query the folders with session.query("Folder") but I can't catch them from event['data']['selection'] Link to comment Share on other sites More sharing options...
Lorenzo Angeli Posted April 21 Report Share Posted April 21 Hi @Brian, I see what you mean. Please have a look here to see how the ftrack-action-handler implements a robust solution. Hope it helps. L. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now