Here's some oddness - try executing the following set of commands:

===================================

def delayedError():
    import maya.OpenMaya as api
    import maya.cmds as cmds

    dagMod = api.MDagModifier()
    manip = dagMod.createNode("textButtonManip")
    dagMod.doIt()
    mfnDag = api.MFnDagNode(manip)
    name = mfnDag.fullPathName()
    typeName1 = cmds.nodeType( name )

def testDelayedError():
    delayedError()
    import sys

def testNoDelayedError():
    delayedError()
    print "foo"
    import sys

testNoDelayedError()
testDelayedError()

===================================

You should get a TypeError on on the "import sys" statement of
testDelayedError.
But notice that testNoDelayedError does NOT raise a TypeError.

Confused? Good, so am I.

It seems that the 'cmds.nodeType( name )' statement is trying to raise
a TypeError - which makes sense, since manipulators are supposed to be
hidden from mel - only the TypeError somehow gets delayed.  ie, if you
execute delayedError, nothing will happen... BUT, you will get
TypeError raised on the very next statement you execute - in this
case, a simple "import sys".

Yay! Magic delayed TypeError!

BUT... if the very next statement is a print statement, your TypeError
is magically cleared!

Yay! Magic disappearing delayed TypeError!

...

Anyway, I'm posting this here so someone else can confirm they get
this behavior too, before I make a bug report / throw it on
http://spreadsheets.google.com/ccc?key=pdI8BlSwGdr0btApDuZEcKQ&[EMAIL 
PROTECTED]&t=8576439777983784710&guest.

I was using Maya 2008 Ext 2, x64, Windows XP x64 Service Pack 2

...by the way, anyone know the reason that Autodesk "hides" their bug
lists?  It must mean lots more duplicated bug reports...
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to