Need Help on Mel scripting


hey am not a professional programmer i want a script please Help me with this the image shows what is does currently. but it works on a single object i want to execute that with multiple objects plz help

string $nos[] = ls -sl;

float $popd[] = pointPosition -w $nos;



string $obh[] = ls -sl -fl;

move -rpr $popd[0] $popd[1] $popd[2] ($obh[0]+".scalePivot") ($obh[0]+".rotatePivot");


Put the code in a separate function that recieves one parameter: The mesh.
Write a for-loop where you go through all meshes in your selection. Call your pivot-function for every mesh there.

How to write for-loops:


Doesn’t it actually take longer to do this than to snap the pivot manually toggling D-V?