How to get the location of the 3D Transform Manipulator??


is there any possibility to get the coordinates of the 3D transfom manipulator?

I’d like to write a simple script that deals with coordinates of the current selection. I’d like to take advantage of the manipulator position to have the built-in functionalty of selecting different pivot points (active object, individual centers, median point,…).
Some scripts I saw are calculating for example the median point again, although is must be known because the 3D transform manipulator is already set.
Any help?


Do you mean this?

Hi macouno,

no, I don’t want the location of the 3D-cursor but the location of the transform manipulator which depends on the selected objects. It’s the thing you can grab to perform translation, scaling, rotation.


you cant at the moment

If it is possible to set the 3D cursor to location of the current selection (shift-s menu), then you could use that information to get the location of the manipulator. I am not exactly sure if you can snap 3D cursor that way via the API but that may be worth investigating.


hmm, I didn’t find anything in the API that lets you snap the cursor to the current selection programmatically.
But I remember having read something about manually inserting key press events into the Blender event queue . Should this be the way to go?



P.S. btw, is there any searchable format of the API available (.chm, …)?

Well. Basically snap just calculates the average of the vertice locations so it shouldn’t be that hard to emulate. You could write a function specifically for that.