Skip to content

Instantly share code, notes, and snippets.

@whaison
Created November 9, 2016 05:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whaison/bec67b403ca182559c73f1455993784a to your computer and use it in GitHub Desktop.
Save whaison/bec67b403ca182559c73f1455993784a to your computer and use it in GitHub Desktop.
mayapy.bat
set MayaWorkspace=%CD%
echo %MayaWorkspace%
set EscapedMayaWorkspace=%MayaWorkspace%
:: 置換
set old=:\
set new=//
call set EscapedMayaWorkspace=%%EscapedMayaWorkspace:%old%=%new%%%
set old=\
set new=/
call set EscapedMayaWorkspace=%%EscapedMayaWorkspace:%old%=%new%%%
echo %EscapedMayaWorkspace%
"C:\Program Files\Autodesk\Maya2017\bin\mayapy.exe" "D:\Maya\scripts\python\Simple00100.py" -c "import sys;'----comandpy-sys.argv---';print sys.argv;print '----comandpy-end---';" %EscapedMayaWorkspace%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment