If I was you, I’d turn that around.
For example.
fixIt.py
# Gain access to maya.cmds
from maya import standalone
standalone.initialize()
# Use maya.cmds to do magic
from maya import cmds
cmds.file("d:/test.ma", open=True)
print("Fixing it")
That you could run as such:
"c:\program files\autodesk\maya2023\bin\mayapy.exe" "d:/fixIt.py"
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAEUzAD19O%3DZ8-7LnmSfp1-b0FzvBLfAREjzcLkXaktsvUOd-_A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCOxpnvS3yUxbThrzmsuQa4xfX1VYVVgxqQGrRoR0E3Pg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAEUzAD06VfSf6LCB7kh8J1L1b1whwqeZFcB68bybAO8FmaZZhQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODErN5mz3STn0gR%2BeW%2Bhhg_TzpnKQso3fb-qgKUSuh0wQ%40mail.gmail.com.