Batch opening and editing files

Hi, i wrote a script to go through some files and the do an camera export but the issue is that when I open the file I get a error message

// Error: line 1688: The default image may not be modified. Use the -i/image flag instead.

I then have to press ok to go on, this is a issue cause I do not want to sit and just press ok every minute.
is ther a way to ignore an error when I open a maya file.

The only other fix is to go into every maya files and my prefs file and replace this

\n\t\t\t\t-defaultImage [b]"vacantCell.xP:[/b]/\"\n\t\t\t\t-image

 with this

\n\t\t\t\t-defaultImage \"\"\n\t\t\t\t-image

this is not realy a option cause I can not do all at once before it starts corupting again

1 Like

Well done sir, this helps me indeed with this error message, but in my case it happened with XGen, It forced me to also try to modify userprefs.mel or use a fresh new prefs file if I don’t already have a clean backup of it with my prefferred prefs