【发布时间】:2019-06-04 18:07:03
【问题描述】:
我正在尝试从 NurbsSurface 获取 SurfaceCV 索引。
当我使用 MItSurfaceCV 类时,我得到的索引太少了。
到目前为止,我的代码已选择 NurbsSphere:
sel = om.MSelectionList()
om.MGlobal.getActiveSelectionList(sel, 0)
dg = om.MDagPath()
sel.getDagPath(0, dg)
cvIter = om.MItSurfaceCV(dg)
inds = []
while not cvIter.isDone():
num1 = om.intPtr()
num2 = om.intPtr()
cvIter.getIndex(num1, num2)
inds.append([num1.value(), num2.value()])
cvIter.next()
我的输出:
[0, 0]
[1, 0]
[2, 0]
[3, 0]
[4, 0]
[5, 0]
[6, 0]
但应该是:
[0,0]
[0,1]
...
[0,7]
[1,0]
[1,1]
...
[1,7]
[2,0]
...
[6,7]
感谢任何研究它的人。
【问题讨论】:
标签: python maya pymel maya-api