We would like to use action menu item in our pipeline.
Here is what we would like to achieve.
When the artists right click on an e.g. Asset entity, in the Shotgun page, we want to popup a UI (e.g. File Dialog) so that we can include the path obtained from the File Dialog and include it as part of the payload we are sending to the handler.
Is this possible ? How can we do that ? Are the example code we can use as a starting point ?
I think a good generalization of your question is, “How do you deal with user input with AMIs?”
I just dealt with this in an AMI for sending assets between projects. I needed to prompt the user for which Project they wanted to transfer the asset to. To accomplish this we created a Flask server to handle all AMI requests. Our Flask server responds to the initial AMI request with a webpage that has a form with a project selector dropdown. In the AMI fields you can set the AMI to open in a Modal Dialog. This pops up the response the AMI request receives in an iframe. At that point the possibilities are endless.
Here is the webpage we built for the Send to Project tool I’m talking about. We styled the page to look similar to the standard Shotgun dialogs.
To go back to your specific problem. You could provide a webpage as a response to the AMI request that allows dragging and dropping files, or simply has a browse button that allows users to select a file/s from their system.