Need someone to double check me to make sure i'm not making a stupid
mistake:

import maya.cmds as cmds
import maya.OpenMaya as api

#make sphere
t, h = cmds.sphere()
s = cmds.listRelatives( t, shapes=1)[0]
sel = api.MSelectionList()

# get mfn
sel.add( s )
dag = api.MDagPath()
sel.getDagPath( 0, dag )
nfn = api.MFnNurbsSurface(dag)

# get UVs
u = api.MFloatArray()
v = api.MFloatArray()
nfn.getUVs(u,v)
# Error: (kFailure): Object does not exist
# Traceback (most recent call last):
#   File "<maya console>", line 4, in <module>
# RuntimeError: (kFailure): Object does not exist #

getting this error in maya 2009. i can't get any of the UV methods to
work, setUV, getUV, getUVs...  Nurbs objects are supposed to have UV
sets by default, so i'm not sure what else i need to do....

-chad





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

Reply via email to