How to disable Maya data loss warning on Open

Hi,

Does anyone know how to disable the attached Maya warning that can happen on opening a scene?

“Errors have occurred while reading this scene that may result in data loss. Please check the script Editor for details.”

I have a batch script for Maya scenes that is hanging on this dialog box, awaiting me to press “OK”, every time it opens a file. Batch would be much better if I didn’t have to babysit the process.

Thanks !

Tony

Use the -prompt flag to suppress all prompts

-prompt(-pmt) boolean
This flag controls the display of file prompting dialogs. Some examples of file prompting dialogs include error messages that require user confirmation and missing file reference dialogs. Once this flag is used, every instance of the file command will use the last set value of this flag. Some interactive file operations may post dialogs even when the flag is set to false, but every scripted file command will not display any dialogs when this flag is set to false. The default value is true.

http://download.autodesk.com/us/maya/2011help/Commands/file.html

1 Like

Awesome! Thanks for the help!

The same also works in Pymel, even though its not in the PyMel openFile documentation (that i could see! )

pm.openFile(target, prompt=False)