//STEP 3:
//Get new number of vertex count after creating more vertex
$newCountResult = getEdgeVertexCount($obj);
int $vertexCount = $newCountResult[1];
//Create and place random-sized sphere in all vertex location
string $edgeSpheres = $obj + "_edgeSpheres";
placeRandSpheres($obj, $vertexCount, $edgeSpheres);
//PROC: Place random-sized sphere in each vertex location
global proc placeRandSpheres(string $objName, int $verCount, string $edgeSpheres){
print $objName;
print $verCount;
string $mash1[];
select $objName;
int $i;
for($i=0; $i<$verCount; $i++){
float $randNum = `rand 0.05 0.2`;
string $cmd = $objName + ".vtx[" + $i + "]";
vector $vector = `pointPosition -w $cmd`;
string $name[] = `polySphere -r $randNum`;
move ($vector.x) ($vector.y) ($vector.z);
$mash1[$i] = $name[0];
}
select -r $mash1[0];
for($i=1; $i<$verCount; $i++){
select -tgl $mash1[$i];
}
group -n $edgeSpheres;
}