// // copyVertex 1.0 // bora dayioglu 2007 // www.borafx.com boradayioglu@gmail.com // ------------------------------------------------------------ // desciption; // copies the selected vertex positions to other selected same topology meshes. // select the vertices you wanted to copy and one or more target mesh and execute the script // global proc copyVertex(){ string $sel[],$dest[],$str[]; int $k,$dnum; clear $sel; clear $dest; clear $str; float $tmp[]; $sel=`ls -fl -sl`; $k=0; for($n=0;$n<`size($sel)`;$n++){ $str=`ls -st $sel[$n]`; if(`strcmp $str[1] "transform"`==0) $k++; } for($n=0;$n<$k;$n++) $dest[$n]=$sel[(size($sel)-$k+$n)]; for($n=0;$n<(size($sel)-$k);$n++){ $tmp=`xform -q -t -os $sel[$n]`; tokenize $sel[$n] "[" $str; $dnum=substring($str[1],1,(size($str[1])-1)); for($k=0;$k<`size($dest)`;$k++) move -ls $tmp[0] $tmp[1] $tmp[2] ($dest[$k]+".vtx["+$dnum+"]"); clear $str; } }