Skip to content

Instantly share code, notes, and snippets.

@Meatplowz
Last active November 29, 2019 08:08
Show Gist options
  • Save Meatplowz/bb1d71bbd0da66ddeba46d8c68108654 to your computer and use it in GitHub Desktop.
Save Meatplowz/bb1d71bbd0da66ddeba46d8c68108654 to your computer and use it in GitHub Desktop.
Quickly Kill Maya Processes
import maya.cmds as cmds
string = "Kill all Maya Processes?"
result = cmds.confirmDialog(message = string, button = ["Kill", "Cancel"], defaultButton = "Kill", cancelButton = "Cancel", dismissString = "Cancel", icon = "Warning")
if result == "Kill":
import subprocess
subprocess.call('taskkill /f /im maya.exe', shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment