fnNode = OpenMaya.MFnDependencyNode(self.thisMObject()) print '%s failed to run some stuff' % fnNode.name()
On Sun, Feb 8, 2009 at 2:50 PM, jasonosipa <[email protected]> wrote: > > PS - A "type" isn't what I'm after, either, I mean the specific scene > object. I don't want "pyNode failed to run some stuff", I want, for > example "pyNode3 failed to run some stuff" > > On Feb 8, 2:48 pm, jasonosipa <[email protected]> wrote: > > I want to throw a specific print statement up if a node failed to do > > something. I'm finding it easy to just print a generic message, but > > how would I use a node's own name to make it easier to know which > > specific one is flaking? > > > > pseudo compute: > > > > try: > > runSomeStuff() > > except: > > print <myOwnNodeName> + ' failed to run some stuff' > > > > It's the <myOwnNodeName> that I'm curious about filling in. > > > > Thanks! -J. > > > -- www.chadvernon.com --~--~---------~--~----~------------~-------~--~----~ Yours, Maya-Python Club Team. -~----------~----~----~----~------~----~------~--~---
