• Content Count

  • Joined

  • Last visited

  1. So I have custom actions for launching maya/nuke aso and I want to filter when these actions are displayed and how. 1. I only want an action to be discovered if a task is selected, not proj/seq/shot. The problem is that the event['data'] type based on selection returns "task" for both task/shot and sequences so I can't filter based on that. I'm currently getting the ['object_type']['name'] for the typedContext based on the entityId and checking if it's "Task" but this forces a session query per action which is slow. Is there a better/faster way of doing this? 2. I want to filter the applications based on a custom attribute. Our projects/sq/sh/task have a custom hierarchical attribute called "application_maya" where we can specify which version of maya should be used and I want to only show that variant as an option upon discovery. At the moment I have to query the custom attribute on the task/sq/sh and proj, ie parent chain, in order to get that value and then ignore variants that doesn't match the attribute. This works but yet again is really slow as there's a big session query for each action. Is there a better/faster way of doing this? Cheers, Alex
  2. We're currently using a custom number attribute for FPS but during our latest project we noticed that the number attribute type seems to round of the amount of decimal points to 2 which caused some issues for us as the project was running at 23.976 FPS and fTrack rounded it of to 23.98 FPS. Is there a reason for the limit of 2 decimal points and is there a way around that without having to switch to a text type attribute? If we have to switch our FPS attribute to a text type will it keep the values it had for all existing and old projects or will it be erased/reset?
  3. So currently we're launching our apps with "source.user.username" filtering which works great as long as a user is only logged in on one machine, but if for some reason a user is logged in on multiple machines at the same time that action is launched on all machines instead of just the current one that actually launched it. Is there a way to make sure an action only runs on the local machine?
  4. Hey Steve, Thanks for the answer and I understand the approach your suggesting but I can't for the life of me figure out how I would "get the ids of each relevant ObjectType".
  5. We're using a form in our custom actions to gather some info before launching our apps and I was wondering if it's possible to change the label on the "submit" button?
  6. I'm trying to make an event that runs some code whenever a shot is created, deleted or renamed. I'm running into 1 problem and 1 annoyance/slowdown which both stem from the same issue of several types, ie sequence, shot and task, all being handled as entityType "task". - I currently have to use the entityId and query TypedContext and check if entity isinstance session.types['Shot']. This adds an unnecessary 0.3 second query every time the event is run in order to just check if an entity is a shot. Is this really the most optimized way to figure out if something is a sequence, shot or task? Seems like having a subEntityType attribute in the event data dict that stores what subtype it is would save a lot of querying. - I'm also running into the problem of once a shot is removed I can no longer query the removed entityId, as it returns None, to check if what was deleted was of type shot or not. How do I figure out if it was specifically a shot that was just deleted?