0
$\begingroup$

What I always do is:

(1)Return from edit mode to object mode (2)Shift+S → Cursor to Selected (3)Return to edit mode (4)Set the pivot point to 3D cursor

If I can set the cursor to the object's origin directly in edit mode, or if I could choose the origin of the object at the pivot point, that would be very nice to me.

I'm not the person who cares about efficiency so much, (Even the pie menu that everyone loves is not for me!) but I use this process so much, so It's so glad if there's some solution. My hope is to do just this simply, without adding any extra features as much as possible.

Thank you!

$\endgroup$

1 Answer 1

0
$\begingroup$

Not possible. There is only Python to solve this:

bl_info = {
    "name": "Cursor to origin from edit mode",
    "author": "Martynas Žiemys",
    "version": (1, 0),
    "blender": (3, 5, 1),
    "location": "3D Viewport, Alt+Shift+Ctrl+E",
    "description": "Cursor to origin from edit mode",
    "category": "Modelling",
}
import bpy

class OBJECT_OT_cursor_origin_edit_mode(bpy.types.Operator):
    """Cursor to origin from edit mode"""
    bl_idname = "object.cursor_to_origin_edit_mode"
    bl_label = "Cursor to origin from edit mode"
    bl_options = {'REGISTER', 'UNDO'}

    @classmethod
    def poll(cls, context):
        return context.object is not None

    def execute(self, context):
        o = context.object
        o.update_from_editmode()
        context.scene.cursor.location = o.location
        context.scene.tool_settings.transform_pivot_point = 'CURSOR'
        return {'FINISHED'}

        
addon_keymaps = []
def register():
    bpy.utils.register_class(OBJECT_OT_cursor_origin_edit_mode)

    kcfg = bpy.context.window_manager.keyconfigs.addon
    if kcfg:
        km = kcfg.keymaps.new(name='3D View Generic', space_type='VIEW_3D')
        kmi = km.keymap_items.new("object.cursor_to_origin_edit_mode", 'E', 'PRESS', any=False, alt=True, ctrl=True,shift=True)
        addon_keymaps.append((km, kmi.idname))
def unregister():

    for km, kmi_idname in addon_keymaps:
        for kmi in km.keymap_items:
            if kmi.idname == kmi_idname:
                km.keymap_items.remove(kmi)
    addon_keymaps.clear()

    bpy.utils.unregister_class(OBJECT_OT_cursor_origin_edit_mode)
    
    
if __name__ == "__main__":
    register()

This will install as add-on if saved with .py extension from Blender's Text Editor. You can change the code to set different shortcut than Ctrl + Shift + Alt + E

It does pretty much exactly what you do manually.

$\endgroup$
1
  • $\begingroup$ Thank you so much! I'll give it a try. $\endgroup$
    – Misago
    Commented Jul 4, 2023 at 15:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .