To be clear, "myCustomShape" is an overridden MPxSurfaceShape node.

pymel ver 0.9.2

On Dec 15, 10:42 am, Paul Molodowitch <[email protected]> wrote:
> On Tue, Dec 15, 2009 at 8:37 AM, hapgilmore <[email protected]> wrote:
> > If I try to create a PyNode with a custom shape node: newNode = PyNode
> > ('myCustomShape')
> > I get the following error:
>
> > newNode = PyNode('myCustomShape')
> > # Error: object.__new__(X): X is not a type object (function)
> > # Traceback (most recent call last):
> > #   File "<maya console>", line 1, in <module>
> > #   File "d:\depot\toystory3\main\build\tools\maya\common\python\pymel
> > \core\general.py", line 1433, in __new__
> > #     self = super(PyNode, cls).__new__(newcls)
> > # TypeError: object.__new__(X): X is not a type object (function) #
>
> > I'm not a python guru, but it looks like PyMel doesn't recognize the
> > node type.  Shouldn't PyMel be loading custom node types when the
> > module is imported?
>
> > Yes... yes, it should. Not sure what's going on here, but it's a bug of
>
> some sort.
>
> One odd thing though... when I tested this, I got a slightly different
> error:
>
> MayaNodeError: Maya Node does not exist: u'spBasicShape'
>
> ...which is, at least, somewhat more to the point.  What version of pymel
> are you using?
>
> - Paul
>
> > --
> >http://groups.google.com/group/python_inside_maya
>
>

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to