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.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5fb010d7-5ef3-45f8-9b78-6772ad1a2fdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 <ryan.j....@fuhu.com> 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 python_inside_maya+unsub...@googlegroups.com.
import pymel.core as pm
import maya.cmds as cmds
plane = cmds.nurbsPlane(ch=False)[0]
pos = pm.dt.Point(0,0,0)
shape = pm.PyNode(plane)
shape.closestPoint(pos, space='world')
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5fb010d7-5ef3-45f8-9b78-6772ad1a2fdd%40googlegroups.com.
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/73681b39-44ad-4b3e-947a-b3b694d03c4f%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5fb010d7-5ef3-45f8-9b78-6772ad1a2fdd%40googlegroups.com.
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 python_inside_maya+unsub...@googlegroups.com.