Not applicable
06-18-2018
08:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone
I need to open some large/messy scenes from other artists. It always prompts out a lot of warnings and freezes Maya for a long time. I try to write a custom "open file" with python to suppress warning messages. But it seems not really "mute" script editor entirely. Let's say, when I open Hypershade window after open file, warnings prompt out again since I have lots of missing textures. The script I use now is:
import maya.cmds as cmds import maya.mel as mel filename = cmds.fileDialog2(fileMode=1) reporter = mel.eval( 'string $tmp = $gCommandReporter;' ) cmds.scriptEditorInfo(reporter,suppressWarnings=True,suppressInfo=1,se=1,ch=1) cmds.disableIncorrectNameWarning() cmds.file( filename[0], i=True );
Not sure if I use this API correctly, Many thanks for your advice.
Thank you
Solved! Go to Solution.
Link copied