Message 1 of 2

Not applicable
07-19-2018
01:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Okay, I've figured out how to create a NURBS circle and find out the relative positions of the control points.
import maya.cmds as cmds myObjName = "nurbsCircle1" myObj = cmds.circle( nr = (0, 1, 0), c = (0, 0, 0), sw = 360, r = 1, d = 3, ut = 0, tol = 0.1, s = 8, ch = 1, n = myObjName) numCVs = cmds.getAttr( myObjName + "Shape.spans") numDegs = cmds.getAttr( myObjName + ".degree" ) for i in range (0, numCVs): cv = myObjName + ".cv" + "[" + str(i) + "]" print str(cmds.pointPosition( cv )) # [0.783611624891225, 4.798237340988468e-17, -0.7836116248912238] # [-1.2643170607829326e-16, 6.785732323110913e-17, -1.108194187554388] # [-0.7836116248912243, 4.798237340988471e-17, -0.7836116248912243] # [-1.108194187554388, 1.966335461618786e-32, -3.21126950723723e-16] # [-0.7836116248912245, -4.7982373409884694e-17, 0.783611624891224] # [-3.3392053635905195e-16, -6.785732323110915e-17, 1.1081941875543881] # [0.7836116248912238, -4.798237340988472e-17, 0.7836116248912244] # [1.108194187554388, -3.644630067904792e-32, 5.952132599280585e-16]
The question is now that I have each point position, how do I move each point?
Cheers
Solved! Go to Solution.