import maya.OpenMaya as om
om.MGlobal.displayInfo("my grey info message")
om.MGlobal.displayWarning("my pink warning")
om.*MGlobal.displayError*("my red error message

Is this one is good ??

http://groups.google.com/group/python_inside_maya/msg/27c842be4005c8e3

On Tue, Dec 2, 2008 at 6:52 PM, John Creson <[EMAIL PROTECTED]> wrote:

>
> You can write a little function that wraps this as well.
> Then you can re-use it.
> And it will feel more pythonic
> ###################
>
> import maya.mel as mel
>
> def pyWarn(warnString):
>    warnMe = 'warning "'+warnString + '"'
>    mel.eval( warnMe )
>
> pyWarn('Hey There!')
>
> On Tue, Dec 2, 2008 at 11:16 AM, NPuetz <[EMAIL PROTECTED]> wrote:
> >
> > You can use the mel module to evaluate that warning command in MEL.
> >
> > import maya.mel as mel
> > mel.eval( 'warning "Hey There!"' )
> >
> > On Dec 2, 4:25 am, rambelly <[EMAIL PROTECTED]> wrote:
> >> Hi Guys,
> >>
> >> How do I do the purple warning as in mel:
> >>
> >> warning("my warning message")
> >>
> >> in python - without quiting my script?
> >>
> >> At the moment I have:
> >>
> >> raise Warning("my warning message")
> >>
> >> But this produces a red error (i think because 'raise' is used).
> >>
> >> Thanks,
> >> rambelly
> > >
> >
>
> >
>


-- 
സ്നേഹിക്കയില്ല ഞാന്‍
നോവുമാത്മാവിനെ സ്നേഹിച്ചിടാത്തൊരു
തത്വശാസ്ത്രത്തെയും

--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

  • ... rambelly
    • ... NPuetz
      • ... John Creson
        • ... kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട!
          • ... John Creson

Reply via email to