我发现所有 CV 都在一条曲线上,我想在每个 CV 上创建一个集群。但是我遇到了一个不是很有帮助的错误。这是代码:
# Find all the CVs on the curve, loop through and create a cluster on each
curveCVs = cmds.ls(targetCurve + ".cv[0:]",fl=True)
for i, cv in enumerate(curveCVs):
print i, cv
cmds.cluster(wn=(cv, cv))
错误出现在 cmds.cluster 中 wn 标志的参数上。
# Error: RuntimeError: file <maya console> line 211: Invalid transforms specified.
文档说参数应该是一个字符串。例如 wn=("thing1", "thing2")
但即使我尝试手动输入 CV 字符串,它也不起作用。
cmds.cluster(wn=("targetPath.cv[14]", "targetPath.cv[14]"))
还有其他方法可以采取吗?