yes you can do this... But theres a suprising answer to all the cutting and splicing, I'm going to enlighten how you could have avoided the entire hustle. THis topic quite much reflect the difference between good problem solvers versus normal ones*.
For some reason people work in this manner, they do the base shape thats the whole mesh, then they consider this the target mesh (and rather literary orbit their thoughts about this unable to see the answer). Then they cut it into 2 to make symmetrical blendshapes. then model and combine back for each and every side (so they end up with the double amount of shapes), it could be more pieces too.
Then comes a curse the fact that the vertex order of their TARGET is different form their 1/2 half blends. And they allways want to proceed to fix the blendshapes (did the problem and solution dawn to you here). What they have failed to notice, is that the blends all have same order**, or a few permutations of orders, and never investigate the truth because they are so set on their target. To elaborate they have:
1 x order mesh and 2-120 y order meshes
Now they always want to make the vertex order of all the meshes match the x order mesh, which sends them running in panic never to think about it again, or go i must use API like you did. Well what about cutting up the TARGET mesh and doing it by exact same recombination like all the others? Well it turns out this will make your target y order.
Now when it comes to the API solution, be sure to recognize that you only need to work on the smaller set of differences! Don't work on the bigger. Secondly its easier to reconstruct each mesh by reading positional of the reworked indices than to rewrite them to a copy of the original.
However the closest point solution will not work... You will need some other way of finding this out. Such as embedding a blind data before splitting up, a user set scripted array etc etc.
Tough nothing states you CANNOT write the edge info all you need is to create a long int array and connect it to edge array of your node (its called edge, look it up in your node reference) Note after that you need to redo the faces.
- Trick here is not to give the solution any definitive starting constraints, that may or may not be appropriate. Now here i don't consider anything other than a working blendshape the target and not constrained on the imaginary TARGET notion. Understanding the real question (which is not hwat most people ask for) is the solution here.
** The trick here is always to do the recombination efforts in similar topographic manner, se Maya does not do this by random, like some of you may think, rather in order. So while you can work as relaxed as you wish, you need to FOCUS on doing the combines and merges in one order, and you'll end up with the same order ALL the times. Note it's usually easier to work ON one halve thats the both sides of your final target, reason being that now each sides vertex order is the same, so they are orderingly interchangeable, now all you must do is remember the order in which to combine (left hand left body right body head), NOTE the left hand notion in combine is spatial so in mirroring don't do it right hand just because your named it left, but rather left as in what you se on screen. Here follows a demonstration of session where i did this manually (yes i know it could be shortened by SO MUCH more by actually developing the script, but it's just a transcrypt animation for your benefit ,very quickly done too):
CODE
file -f -new;
window -e- vis 0 $gCommandWindow;
polyCube -w 1 -h 1 -d 1 -sx 2 -sy 2 -sz 2 -ax 0 1 0 -tx 1 -ch 1;
viewFit;
annotate -tx "Think this is head!" -p 0 0.8 0;
setAttr "annotationShape1.displayArrow" 0;
refresh; pause -sec 1;
select -r pCube1.f[0]
pCube1.f[2]
pCube1.f[4]
pCube1.f[6]
pCube1.f[8]
pCube1.f[10]
pCube1.f[12]
pCube1.f[14]
pCube1.f[20:23];
refresh; pause -sec 1;
delete;
setAttr -type "string" annotationShape1.text "Think this is head! (now half a head)";
refresh; pause -sec 1;
select -r pCube1;
duplicate -rr;
move -r 2 0 0;
viewFit -all;
refresh; pause -sec 1;
duplicate -rr;
move -r 2 0 0;
viewFit -all;
refresh; pause -sec 1;
duplicate -rr;
move -r 2 0 0;
viewFit -all;
refresh; pause -sec 1;
select -r persp;
for ($i=0;$i<4;$i++){
move -r (0.758996/4) (-1.121061/4) (0.0817991/4);
refresh;
}
select -r pCube2.vtx[5] pCube2.vtx[7] pCube2.vtx[9];
refresh; pause -sec 1;
for ($i=0;$i<4;$i++){
move -r 0.05 0.05 0;
refresh; pause -sec 0;
}
pause -sec 1;
select -r pCube3.vtx[3] pCube3.vtx[11] pCube3.vtx[16];
refresh; pause -sec 1;
for ($i=0;$i<4;$i++){
move -r -0.067 0 0;
refresh; pause -sec 0;
}
pause -sec 1;
select -r pCube4.vtx[1];
refresh; pause -sec 1;
for ($i=0;$i<4;$i++){
move -r 0.056 -0.04 0.08;
refresh; pause -sec 0;
}
setAttr -type "string" annotationShape1.text "Lets reasemble ME!";
refresh; pause -sec 1;
setAttr -type "string" annotationShape1.text "Lets reasemble ME.";
refresh; pause -sec 1;
setAttr -type "string" annotationShape1.text "Lets reasemble ME!";
refresh; pause -sec 1;
select -r pCube1;
refresh; pause -sec 1;
duplicate -rr;
duplicate -rr;
duplicate -rr;
duplicate -rr; scale -1 1 1;
duplicate -rr;
duplicate -rr;
duplicate -rr;
refresh; pause -sec 1;
select -r pCube1;
refresh;
select -add pCube11;
refresh; pause -sec 1;
constructionHistory -toggle false; // we dont need the extra shapes
CombinePolygons
refresh; pause -sec 1;
select -r polySurface1.e[8]
polySurface1.e[10]
polySurface1.e[12]
polySurface1.e[14]
polySurface1.e[16]
polySurface1.e[18]
polySurface1.e[20]
polySurface1.e[22]
polySurface1.e[36]
polySurface1.e[38]
polySurface1.e[40]
polySurface1.e[42]
polySurface1.e[44]
polySurface1.e[46]
polySurface1.e[48]
polySurface1.e[50];
refresh;
performPolySewEdge 0;
refresh; pause -sec 1;
select -r pCube2;
setAttr "pCube2.translateX" 0;
duplicate -rr; scale -1 1 1;
select -r pCube5 pCube11;
CombinePolygons;
select -r polySurface2.e[8]
polySurface2.e[10]
polySurface2.e[12]
polySurface2.e[14]
polySurface2.e[16]
polySurface2.e[18]
polySurface2.e[20]
polySurface2.e[22]
polySurface2.e[36]
polySurface2.e[38]
polySurface2.e[40]
polySurface2.e[42]
polySurface2.e[44]
polySurface2.e[46]
polySurface2.e[48]
polySurface2.e[50];
performPolySewEdge 0;
setAttr "polySurface2.translateX" -2;
refresh;
select -r pCube2 pCube8;
CombinePolygons;
select -r polySurface3.e[8]
polySurface3.e[10]
polySurface3.e[12]
polySurface3.e[14]
polySurface3.e[16]
polySurface3.e[18]
polySurface3.e[20]
polySurface3.e[22]
polySurface3.e[36]
polySurface3.e[38]
polySurface3.e[40]
polySurface3.e[42]
polySurface3.e[44]
polySurface3.e[46]
polySurface3.e[48]
polySurface3.e[50];
performPolySewEdge 0;
setAttr "polySurface3.translateX" 2;
select -r pCube3;
setAttr "pCube3.translateX" 0;
duplicate -rr; scale -1 1 1;
select -r pCube6 pCube11;
CombinePolygons;
select -r polySurface4.e[8]
polySurface4.e[10]
polySurface4.e[12]
polySurface4.e[14]
polySurface4.e[16]
polySurface4.e[18]
polySurface4.e[20]
polySurface4.e[22]
polySurface4.e[36]
polySurface4.e[38]
polySurface4.e[40]
polySurface4.e[42]
polySurface4.e[44]
polySurface4.e[46]
polySurface4.e[48]
polySurface4.e[50];
performPolySewEdge 0;
setAttr "polySurface4.translateX" -4;
select -r pCube3 pCube9;
CombinePolygons;
select -r polySurface5.e[8]
polySurface5.e[10]
polySurface5.e[12]
polySurface5.e[14]
polySurface5.e[16]
polySurface5.e[18]
polySurface5.e[20]
polySurface5.e[22]
polySurface5.e[36]
polySurface5.e[38]
polySurface5.e[40]
polySurface5.e[42]
polySurface5.e[44]
polySurface5.e[46]
polySurface5.e[48]
polySurface5.e[50];
performPolySewEdge 0;
setAttr "polySurface5.translateX" 4;
select -r pCube4;
setAttr "pCube4.translateX" 0;
duplicate -rr; scale -1 1 1;
select -r pCube7 pCube11;
CombinePolygons;
select -r polySurface6.e[8]
polySurface6.e[10]
polySurface6.e[12]
polySurface6.e[14]
polySurface6.e[16]
polySurface6.e[18]
polySurface6.e[20]
polySurface6.e[22]
polySurface6.e[36]
polySurface6.e[38]
polySurface6.e[40]
polySurface6.e[42]
polySurface6.e[44]
polySurface6.e[46]
polySurface6.e[48]
polySurface6.e[50];
performPolySewEdge 0;
setAttr "polySurface6.translateX" -6;
select -r pCube4 pCube10;
CombinePolygons;
select -r polySurface7.e[8]
polySurface7.e[10]
polySurface7.e[12]
polySurface7.e[14]
polySurface7.e[16]
polySurface7.e[18]
polySurface7.e[20]
polySurface7.e[22]
polySurface7.e[36]
polySurface7.e[38]
polySurface7.e[40]
polySurface7.e[42]
polySurface7.e[44]
polySurface7.e[46]
polySurface7.e[48]
polySurface7.e[50];
performPolySewEdge 0;
setAttr "polySurface7.translateX" 6;
viewFit -all;
refresh; pause -sec 1;
setAttr -type "string" annotationShape1.text "Now some center symmetries!";
refresh; pause -sec 1;
setAttr -type "string" annotationShape1.text "Now some center symmetries.";
refresh; pause -sec 1;
setAttr -type "string" annotationShape1.text "Now some center symmetries!";
refresh; pause -sec 1;
select -r polySurface1;
duplicate -rr;
move -r 0 2 0;
refresh; pause -sec 1;
duplicate -rr;
move -r 0 2 0;
refresh; pause -sec 1;
select -r polySurface8.vtx[4] polySurface8.vtx[6] polySurface8.vtx[8];
move -r -ls -wd 0 0.414941 0;
refresh;
select -r polySurface9.vtx[2];
move -r -ls -wd 0 0 1.729639;
setAttr -type "string" annotationShape1.text "DONE! blend me to chek indexes";
Paste and execute! don't be supprised each and every CUBE has the exact same order even tough i've cut it about and recombined.