QUOTE
And if you checked Joojaa you'd have recognised: If you really select stuff on different shapes Maya DOES store the selection order for some obscure reason! ![]()
It does, blimey. Talk about not being consequent. But alas it dont work perfectly! it appears to:
make 2 cubes.
QUOTE
file -f -new;
polyCube;
polyCube;
select -r pCube2.vtx[2] ;
select -tgl pCube1.vtx[3] ;
select -tgl pCube2.vtx[1] ;
select -tgl pCube1.vtx[2] ;
ls -sl;
so far so good but
QUOTE
file -f -new;
polyCube;
polyCube;
select -r pCube2.vtx[2] ;
select -tgl pCube1.vtx[3] ;
select -tgl pCube1.vtx[1] ;
select -tgl pCube2.vtx[4] ;
ls -sl;
The shit craps up so the store token is the change of object, but the order goes totaly haywire. So unless it truly interleaves its going to be broken anyway. Code not to be trusted.
QUOTE
The bigger problem (and old problem of mel too) is you'd have an arbitrary number of lists!
But in that case its rather simple, What you have is a interleave wich to all effect is a 2 dimensional array. (but )
And managing that interleave is rather simple
CODE
for ($i=0;$i<length($list);$i=$i+2){
$newlist={$list[$i],$list[$i+1]};
//use this list in this block next time around its the next list.
}
if not tricky or you could use soemthing like
CODE
global proc string getInterleave(string $list[],int $i){
if (size($list)<$i*2+1) return {};
return {$list[$i*2],$list[$i*2+1]};
}
if you need arbitrary access. So you could use something like:
CODE
$list1=getInterleave($list,0);
$list2=getInterleave($list,2);
And do something to the interleaved parts and then yoiu can reuse the lists in your code, if you need to update the main list make a
CODE
global proc string insertInterleave(string $list[],$newlist[],int $i){
list[$i*2]=$newlist[0];
list[$i*2+1]=$newlist[1];
}