I've found all the CV's on a curve, and I'd like to make a cluster on each one. But I'm getting an error that isn't super helpful. Here's the code:
# 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))
The error is on the arguments for the wn flag in cmds.cluster.
# Error: RuntimeError: file <maya console> line 211: Invalid transforms specified.
The docs say the arguments should be a strings. E.g. wn=("thing1", "thing2")
But even if I try manually entering the CV strings, it doesn't work.
cmds.cluster(wn=("targetPath.cv[14]", "targetPath.cv[14]"))
Is there another approach to take?