Skip to content

Instantly share code, notes, and snippets.

@Meatplowz
Last active November 29, 2019 08:08
Show Gist options
  • Select an option

  • Save Meatplowz/bb1d71bbd0da66ddeba46d8c68108654 to your computer and use it in GitHub Desktop.

Select an option

Save Meatplowz/bb1d71bbd0da66ddeba46d8c68108654 to your computer and use it in GitHub Desktop.

Revisions

  1. Meatplowz revised this gist May 18, 2018. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion KillMaya.py
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,8 @@
    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)
    subprocess.call('taskkill /f /im maya.exe', shell=True)




  2. Meatplowz created this gist May 18, 2018.
    7 changes: 7 additions & 0 deletions KillMaya.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    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)