In Maya, if the reference is cut off, you will have to specify each time to reconnect or leave it.
Here are some tips for skipping this dialog.
Let's write the file open process as follows.
import maya.cmds as cmds
_show_dialog = cmds.file(q=True, prompt=True)
cmds.file(prompt=False)
cmds.file(
"hoge.ma",
f=True,
options="v=0;",
ignoreVersion=True,
typ="mayaAscii",
o=True)
cmds.file(prompt=_show_dialog)
This way of writing makes it possible to open the data without displaying a dialog.
Recommended Posts