Is there a Mel or Python command that returns the average position of the currently selected objects and/or components? I know that in component selection mode, selecting a set of vertices will cause the manipulator context to move to accommodate the selected vertices, but this does not seem to work in object mode.
In either case, my goal is to be able to easily obtain the average translation of the selected objects/components without having to write code specific to each sort of thing that may be selected.