Wednesday, 8 July 2015

adding or removing vertices to cluster sets. selectcluster then verts run script

string $sel[] = `ls -sl`;
string $cluster[] = `listConnections $sel[0]`;
string $clusterSet[] = `listConnections -type objectSet $cluster`;
int $num = size($sel);
for ($i = 1; $i < $num; $i++)
{
string $item = $sel[$i];
sets -add $clusterSet $item;
}


string $sel[] = `ls -sl`;
string $cluster[] = `listConnections $sel[0]`;
string $clusterSet[] = `listConnections -type objectSet $cluster`;
int $num = size($sel);
for ($i = 1; $i < $num; $i++)
{
string $item = $sel[$i];
sets -rm $clusterSet $item;
}

might have to explicitly name the cluster set if things go awry.. eg.#

sets -add cluster2Set $item