Thanks for the help... this is a good workaround, unfortunatly it's really messy to capture the command return in a python variable. I think i'll live with the warnings
On Wed, Jan 14, 2009 at 11:49 AM, John Creson <[email protected]> wrote: > catchQuiet is built to do this, but is in mel only... > So use mel.eval > But it doesn't get to the except situation... > Though you can use it in mel to quiet an if... > > * > import maya.cmds as cmds > import maya.mel as mel > circle_X = cmds.circle(c=(1.1,0,0), nr=(0,1,0), s=8)[0] > circle_Y = cmds.circle(c=(-1.1,0,0), nr=(0,1,0), s=8)[0] > try: > mel.eval('catchQuiet ("curveIntersect circle_X circle_Y")') > #warning messages to suppress ... > except: > pass* > > > On Wed, Jan 14, 2009 at 10:28 AM, sberger <[email protected]>wrote: > >> >> Hi, I am trying to suppress maya warning message, but the try:/except: >> clause don't supress it. >> >> Anyone know how to do this? >> >> Here is a peice of code that repro the problem >> >> import maya.cmds as cmds >> circle_X = cmds.circle(c=(1.1,0,0), nr=(0,1,0), s=8)[0] >> circle_Y = cmds.circle(c=(-1.1,0,0), nr=(0,1,0), s=8)[0] >> try: >> cmds.curveIntersect( circle_X, circle_Y ) #warning messages to >> suppress ... >> except: >> pass >> >> >> >> > > > > -- They say, "Evil prevails when good men fail to act." What they ought to say is, "Evil prevails." Nicolas Cage as Yuri Orlov in Lord of War. --~--~---------~--~----~------------~-------~--~----~ Yours, Maya-Python Club Team. -~----------~----~----~----~------~----~------~--~---
