Tk-shotgun action menu submenu's?

Just to check, there is no way currently to create tk-shotgun apps that create submenu’s in the right click menu right?

I would like to create an app that will have quite a few commands and would love to submenu those so I don’t end up with a massive list of commands in my right click.

2 Likes

No unfortunately there isn’t. A good suggestion for our roadmap though.

2 Likes

I had already sent it to the roadmap just before I posted this :eyes:

1 Like

Come to think of it, where can I find the code to the pipeline configuration “clone” menu?
Because that pop’s up a little GUI, is that something we can use?

1 Like

That code is part of the Shotgun javascript code itself so it can’t be modified, unfortunately.

It’s not something I’ve ever played around with my self, but if you create a Shotgun Action menu item via the Shotgun AMI interface rather than through the Toolkit actions, then you can create modal dialogs in the page.

Though I appreciate that is a bit more work since you have to set up an AMI outside of Toolkit.

1 Like

You could try modifying and register_command() your own custom callbacks to the app.py in tk-shotgun-launchpublish if you’re using a custom project configuration.

You’ll need to have Shotgun Desktop running. Also, to refresh the menus:

  1. Modify the env/include/settings/tk-shotgun-launchpublish.yml. Just add a extra line or something and save to change the file modification time
  2. Reload Shotgun website, right click. This first time should trigger a fresh re-caching of menu actions
  3. Reload Shotgun website again, right click. Now your menu action should show up