You can query the nurb's sphere attributes such as CVs, degrees, etc that will update the current results if they are changed. The fullPathName does return the path to the shape node... confirming the nfn is updating with the correct object. I ham having the same problem in 2008, where any of the UV queries return object does not exist.
Unless we are in it together your are not making a stupid mistake
-brian
www.meljunky.com
-------- Original Message --------
Subject: [Maya-Python] MFnNurbsSurface Bug?
From: Chadrik <[email protected]>
Date: Tue, February 24, 2009 7:17 pm
To: python_inside_maya <[email protected]>
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
-~----------~----~----~----~------~----~------~--~---
