Set origin to selected

For an extended utility, use this add-on. Added supports for Curves and Armature object types.

Hotkey is [Ctrl + Shift + C]

If you are in Object Mode and happens to press this hotkey, it will take you to Edit Mode for any respective supported object types. :slight_smile:

9 Likes

perfect just what I need thank you

Unfortunately, it doesn’t seem to work in 2.83 anymore. Can you have al look at it?

1 Like

It works still fine on my system with the official release of 2.83

Can anyone else also confirm if there is any issue with this script with the LTS version?

And if so,

  • what’s the error log in the console?
  • when was the last time it worked for you?
  • is there any possibility of hotkey conflicts?

I was looking for this feature just last week, and here it is. Great job! Works on 2.90 build from june 2nd just fine :slight_smile:

It seems a conflict with “jmesh tools” When I disable this, the origin scipts works fine.

Traceback (most recent call last):
File “/home/dom/.config/blender/2.83/scripts/addons/jmesh-tools-master/widgets/bl_ui_draw_op.py”, line 27, in invoke
self.on_invoke(context, event)
File “/home/dom/.config/blender/2.83/scripts/addons/jmesh-tools-master/fc_circle_array_mode_op.py”, line 62, in on_invoke
self.init_widget_values()
File “/home/dom/.config/blender/2.83/scripts/addons/jmesh-tools-master/fc_circle_array_mode_op.py”, line 74, in init_widget_values
select_active(self.active_obj)
File “/home/dom/.config/blender/2.83/scripts/addons/jmesh-tools-master/utils/fc_bool_util.py”, line 25, in select_active
bpy.ops.object.select_all(action=‘DESELECT’)
File “/snap/blender/39/2.83/scripts/modules/bpy/ops.py”, line 201, in call
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.select_all.poll() failed, context is incorrect

location: :-1

1 Like

From 2.831 LTS error message

any chance this amazing tool can be updated in blender 2.8x ?
also maybe set the shortcut to alt+c ?

It works fine with 2.83.1 LTS.

The issue originated from some other add-on you have got installed.
Similar to a post, just above yours.

The reason behind not having Alt + C as hotkey is stated here in this comment.

If you do not wish to have the added feature of handling curves and armatures, you might use the previous version.

From Edit mode, select a face to Shift+S cursor to active to origin to cursor… to this!!! Thanks a lot! Having it for only a few minutes and already Loving it :slight_smile:

You rock!

Ray

How to set the script to quick favorites?

Thanks, this is a huge help!

But I am a little bit confused… this is a python script, not an add on.

Am I missing something? Is there a way to create an add on from a python script? Or a way to set a script to auto-load with Blender?

just use this https://blender-addons.org/origin-at-selected-addon/

2 Likes

all Blender addons are python scripts…

2 Likes

Ha! Mind just blown, thanks, Felt like I was getting pretty advanced until suddenly I realized I wasn’t.

1 Like

No worries. Often Blender addons are several scripts and assets bundled together for easy installation in a zip-file (and you never actually see any script), but sometimes, a small python script is all you need :slight_smile:

Does anyone know if there are plans to update this addon?
It would be cool if this function works for Grease Pensil objects as well.

Anyone has blender 3.0 version of this little addon? The ones mentioned leads to deleted drive sources

import bpy

bpy.ops.view3d.snap_cursor_to_selected()
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
bpy.ops.view3d.snap_cursor_to_center()

# bpy.ops.object.mode_set(mode='EDIT')

use PME for easy mapping