Executing a system command

What does it look like to send a terminal command out from SG? I have toolkit running in default. I’d like to try setting up a command from SG that sends out a DOS/Terminal command to launch After Effects and start a render. I’ve been looking at the toolkit docs for a while but it’s all still an overload so I definitely don’t have a good grasp of where to look and what to start with.

2 Likes

Hey Byron!

Can you tell us a little more about what you’re after? It sounds like you may not need to Toolkit for this at all. There are a few features that Shotgun and Toolkit offer around running custom code:

  • Toolkit Software launchers: we use these to launch Software like Maya, Nuke, etc. in a Shotgun-aware way – either from Shotgun Desktop, Create, or from Shotgun itself. Usually we use Software launchers to launch existing content creation platforms, so that they’ll have Toolkit apps available
    within them, based on what’s specified in your pipeline configuration. But you could ostensibly point to any executable. You can learn more about Software launchers here.
  • Toolkit custom apps: We provide a platform that you can use to build custom Toolkit apps – UIs within content creation software that can build on UI widgets we provide and use our APIs to access your Shotgun data. I feel like this may be overkill for what you’re after, but you can learn more about Toolkit app development here.
  • Finally, the Shotgun web app supports Action Menu Items, or AMIs. This is a framework where you can create context menu items on entities in Shotgun that run arbitrary code that you specify. Note that this isn’t part of the Toolkit platform, just a feature of the Shotgun web app itself. Based on what you’ve said, I think this may be your best bet. You can learn more about AMIs here (links are in the left nav).

Hope that helps! Let us know if you have any other questions.

1 Like

Thanks for the reply @tannaz. I do agree that the AMI may be what I’m after. What I’d like to set up, is the ability to right click on a shot and have the option to render it in After Effects. After Effects has a command line render option (aerender.exe). I have all the information I need in Shotgun already ( published file location for the latest AE project, name of the composition, etc…). The resulting command line argument sent to the system should be pretty simple. I would just need to get those few pieces of data from SG and then send that command to the command line.

2 Likes

Yeah, that sounds like an AMI to me… =)

1 Like