Set origin to selected

Bored by the obligation to set the 3d cursor to change the pivot of an object, try this little script which permit to set the object pivot directly from Edit Mode Selection.

A little tutorial and the script download link can be found here.


Amazing ! :smiley:

this is nice

also, you can also use dynamic spacebar menu…

it has

under “transform menu”

geometry to origin

origin to geometry

origin to 3d Cursor.

looks like Dynamic Spacebar menu needs an update to include this… :slight_smile:

certainly if you give permissions I can add your code to the spacebar menu

Yes it is. Those are the small things that allow us to work a lot faster.
Very handy, thanks.

Cool! This is how it should be. Thanks for the addon, hopefully it will get into trunk.

Eventually somebody noticed&corrected that Blender’s built-in moronism ((…, Congratulations and thank you !!

Thank you Ghigi! What a pleasure to be able to set the pivot this way! :slight_smile:
Should be in trunk indeed!!!

A question - rhetorical?
Since you succedeed to solve Pivot point functionality - it’d be also smart to move Origin with it.
Moving Origin moves Coordinate System(from eg. Global/World) to some user’s/local one-thus you move a reference for any manipulation
referred to such point. Of coure it’d be nice to have possibility of defining such Origin w/ 3 points also…-)
Could someone explain it to me please what kind of logic stands behind separating in Blender those two vital points (Pivot&Origin) ??

I didn’t really understood the difference between the pivot and the origin, can you help me on that point ?
Actually I dont know wheteher there is a difference between pivot and origin. And if when you select the option “set pivot to 3d cursor” does it do the good thing ?
Thanks a lot for your comments !

Correct me if i am wrong (iam noob in blender still…-D): a Pivot point is that little bold orange dot(You ve just made functional properly!) around which rotates Command Rotate. An Origin is that X,Y,Z tripod (red-gree-something) that makes a 0,0,0 starting point for all the coordinates. In eg CAD/Arc.Viz world thereis no such thing a separate ‘Pivot’ and ‘Origin’ point causeif you scale,rotate etc. you do it either RELATIVE to some 0,0,0 or ABSOLUTE to it (or just in reference to some other existing object). Wheather sbdy likes it or not every geometrical transformation takes place in some coordinate system, that has its origin (0,0,0). Np. to submit screenshots if they could help you understand my understanding of Pivot vs. Origin (or maybe Origin means still sth different from what i knew so far…8-).

Hello !
I finnaly understood what you want to say. Actually, the orange pivot point is the only thing relative to object data, but you can use another point as a pivot if you want.

Use snapping for defining the new pivot location could be great but it seems to be complex to program, and it is not ultra useful. The most simple is certainly to add a point, to snap it and to set the origin to this point.

How can I ask to permit the publication of this script in releases in Graphicall ?

Really sorry for my bad English ><

Moving orgin this way is definitly not a good idea. Cause while you are modeling something for example with mirror modifier then this type of of changing pivot point is garbage. Instead of this, I would like to have something similar to circle select “c”. Circle select is very cool because it works in edit mode, it is independent (it blocks any modification to model and you can’t move/rotate/etc). But during this you cant use “Snap during transform” and “Type of element to snap to” which they are essential.

How this should work:

  1. i have selected some verts/edges/polys
  2. I see that i have pivot point (not orgin point) located in 3d space that i dont want.
  3. I type “alt C” (realy nice shortcut :stuck_out_tongue_winking_eye: ", than i enter a new “Pivot point snap mode”. New type of cursor shows
  4. Everthing blocks (cant rotate/pan just like in Circle Select), I can use “Mesh Select Mode” and “Snap Type”
  5. While holding ctrl the new type of cursor snaps to vert/edge/poly etc.
  6. After releaseasing it, Pivot point snap mode dissapears and blender’s default cursor goes to place where we choose in point 5
    If you can code this than you will be my master :stuck_out_tongue:

Regards, Rice

When you use a mirror modifier you have to set properly the origin before to add the modifier. Do the opposite seems me stupid ^^

Simple, and oh-so-useful. Trunk!

Very useful add-on! I see no problem with moving the origin this way as care must be taken when moving the origin regardless.
Here’s a few tips I hope will help others:
The orange dot referred to previously is not actually the pivot point but the origin of the object. (The origin can also be used as a reference to the center of a Cartesian grid)
The pivot point is dependent upon what is set in the 3D view toolbar
When snapping the cursor to an object it will go to the object’s origin
Moving the object origin changes the object location coordinates so it may be necessary to apply the location (ctrl+a) afterwards
When mirroring an object it will be mirrored along the selected axises of the objects origin

Getting to know how the object origins, cursor, snapping and pivots work is highly beneficial and can save a lot of time modeling.
Thanks again!

main could be a little shorter

def main(context):
    cursorPosition = bpy.context.scene.cursor_location
    bpy.ops.object.origin_set(type='ORIGIN_CURSOR', center='MEDIAN')
    bpy.context.scene.cursor_location = cursorPosition

@ghigi123: holy . . . !!! thanks thanks thanks and 50 more times thanks . . . uf . . . finally someone . . . eh thanks man . . . it is relief . . .

I also found paleajed’s script (Fast Origin addon) andd your way is faster and user more friendly

Anyway, have you seen this addon?


1 Like

No I didn’t seen it. I just did this add-on to try Python programming and to discover Blender API. I never used it before. My target was to do a very simple but useful script. How can I post it to an add on repository ? I’d like to do others scripts like that but I haven’t other ideas …