Accessing Shot Step Sub-fields via Shotgun Shot Search

Hello there,

I’m trying to make some changes to the Submit App and am having some difficulty.
The end goal is to have various plugins checked, enabled, etc. based on the shot step.
The hangup is that I only have access to the shot name.

task_info = eng.shotgun.find_one(“Shot”, [[‘name’, ‘is’, ‘0000_0000’]], [‘tasks’])

I can use the shot’s name to get all the steps associated with it (example above), but only their type, id, and name. I can’t seem to get any of the step’s custom fields, which would determine which plugins to check/enable. What’s the best way to go about this?

Any help would be appreciated.

4 Likes

The “tasks” field on a Shot is multi-entity so it is not straightforward (or possible?) to get the linked tasks’ fields (see the last paragraph on this page https://support.shotgunsoftware.com/hc/en-us/articles/115000102934-Linked-fields)

Instead do the reverse, query for Task entities that are linked to your shot, eg

sg.find("Task", [["entity.Shot.code", "is", "0000_0000"]], ["step", "some_custom_task_field])

3 Likes