-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuserSetup.py
More file actions
20 lines (18 loc) · 787 Bytes
/
userSetup.py
File metadata and controls
20 lines (18 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import maya.cmds as cmds
import os
def start_autosave_plus():
try:
#Replace this path, notice UNIX style forward slashes /
autosave_script_path = "C:/Users/yourUserName/Documents/maya/2022/scripts/autosavePlus.py"
if os.path.exists(autosave_script_path):
with open(autosave_script_path, "r") as script_file:
exec(script_file.read(), globals())
if "start_autosave_job" in globals():
start_autosave_job()
else:
cmds.warning("Autosave+ script did not define 'start_autosave_job'.")
else:
cmds.warning("Autosave+ script not found!")
except Exception as e:
cmds.warning(f"Failed to start Autosave+: {e}")
cmds.evalDeferred(start_autosave_plus)