Can you show a complete and concise example of the problem? It seems like you are calling closestPoint() on the Nurbsurface class and not an instance. Either that or a bug. I wouldn't think you should need to worry about the SafeApiPtr stuff as that is probably internal and it is referring to a problem of not being called on a valid instance.
On Fri, 8 May 2015 7:30 AM Ryan J Roberts <[email protected]> wrote: > So I'm trying to use pymel to get information about a point on a > nurbsSurface. First I make a PyNode > > nurbsSurface = pm.PyNode('nurbsPlaneShape1') > > which allows me at to use all the methods in the pymel nurbsSurface > nodetype. > > I'm able to get some information with no problem, but I'm trying to use > the method nurbsSurface.closestPoint(), and I'm giving it a list of 3 > numbers. > > closestPoint = surf.closestPoint( [0.1, 0.3, 0.2] ) > > and it's giving me this error: > > *unbound method get() must be called with SafeApiPtr instance as first > argument (got list instance instead)* > > Does anyone have any experience with *SafeApiPtr*? I'm having problems > finding out what it is and how to use it. > > Any help would be greatly appreciated :-) > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/5fb010d7-5ef3-45f8-9b78-6772ad1a2fdd%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/5fb010d7-5ef3-45f8-9b78-6772ad1a2fdd%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3XUC92L%3D-K7CS9b1AexEJ4fR08vqJ%3DRVj_fb1H4hZk1A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
