Action Menu Item: launch task in given context

Hi,
I’ve been digging through the Action Menu Item docs trying to figure out if there is a way of creating an AMI that when I am in my tasks will open the application of a certain task to use that asset with its given context that will include the project and the product context.

In different words what I need is to open the application that will know that you are in the whole context that includes the project, product, what type of asset it is, what type of task it is and with that information it opens the related application and the scene directly to work on it.


this image is for contextualization only :blush:

Thanks in advance

If you would use Toolkit/ShotGrid desktop this is functionality thatv would be handled by the Tookit Menu’s.

Another way you can do it via AMI is to use teh ami to bootstrap sgtk and the engine and set the context.

The first one works out of the box, or if you use custom entities (Products?), with a little tweaking of the default config.

1 Like

Hi @fcrespo !

This sounds like exactly the kind of functionality that ShotGrid Desktop provides. It will launch your DCC into the context that you launched it from (it will not open the latest scene directly but that could be changed).
If for some reason you cannot use that, then you can always query the information you need with the shotgun_api. As a rule of thumb: AMI will always send along the entity that it was launched from. In your case a task with its ID. From there you can query the linked asset/shot, Project and whatever else you need.

Hope that helps a little!

Cheers Fabian

2 Likes

Thank you so much for your help

1 Like