Pivot location for vertex selection

How does one query/edit the location of the rotate/scale pivot for a subobject selection like vertices or faces using MEL. I can get it for objects, but I can't figure out how to get the subobject pivot. I know I can press 'insert' to go into edit mode - this isn't what I want. Thanks.

If I am understanding what you need...

Check xform and the flags -sp -rp and -piv.

--JeffD

I could be wrong, but I think xform only works with the object pivots and not the pivot of a group of selected vertices. I did figure out an obscure way to do it:

ctxEditMode;
scmh -a 10 10 10;
ctxEditMode;

This will move the pivot of whatever is select to 10 10 10. I can't find any documentation for the 'scmh' command, so I don't know if there are other useful flags. It is the command used for numerical input, and it is only used in that one script (numericalInput.mel). I discovered it by pure random luck.

Man, I hate undocumented commands. Here is what help scmh brings up...

help scmh;
// Result:

Synopsis: scmh [flags] Float Float Float Float Float Float [String...]
Flags:
-a -absolute
-i -ignore Index (multi-use)
-r -relative

Did anyone ever figure this out?

Ironically, I am now working on a script in which I would like to query the the pivot point for a current vert selection.

--JeffD

Is this one a lost cause?

--JeffD

I've still never figured out how to query the location. I ended up finding the average position of the selected vertices and assuming that was the correct position. It seemed to be correct for what I was doing.

Yeah, the averaged position is where the selection pivot starts. Hitting insert lets you move it, of course. It would be nice to be able to get the position of that pivot after the move. Oh well.

--JeffD