Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from maya.OpenMaya import *
- def outputSurfacePoints(obj):
- fn = MFnNurbsSurface(obj)
- vts = MPointArray()
- fn.getCVs(vts)
- print "NumCVsU:"
- print fn.numCVsInU()
- print "NumCVsV:"
- print fn.numCVsInV()
- for i in range(0, vts.length()):
- print str(vts[i].x) + " " + str(vts[i].y) + " " + str(vts[i].z)
- it = MItDag(MItDag.kDepthFirst, MFn.kNurbsSurface)
- while not it.isDone():
- fn = MFnNurbsSurface(it.item())
- if not fn.isIntermediateObject():
- print "Object Name: " + fn.name()
- outputSurfacePoints(it.item())
- it.next()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement