Assuming you always want the very first CV, it will always be position [0]. So curve1.cv[0].
If you want your script to work on any curve selection, you can store your selection first
{
// stores current selection
string $curve[] = `ls -sl`;
// for loop allows script to work on any number of curves at one time
for ($i=0; $i<`size $curve`; ++$i) {
// skips anything that doesn't have CVs
if (objExists ($curve[$i] + ".cv[0]")) {
delete ($curve[$i] + ".cv[0]" );
}
}
}
Replies
SelectAllNURBSCurves; string $c[] = `ls -sl`; for ($i in $c) { delete ($i + ".cv[0]"); }If you want your script to work on any curve selection, you can store your selection first
{ // stores current selection string $curve[] = `ls -sl`; // for loop allows script to work on any number of curves at one time for ($i=0; $i<`size $curve`; ++$i) { // skips anything that doesn't have CVs if (objExists ($curve[$i] + ".cv[0]")) { delete ($curve[$i] + ".cv[0]" ); } } }