Undo after changing Origin pivot will move entire Geometry #93122

Open
opened 2021-11-16 12:11:34 +01:00 by xeoncat · 9 comments

Blender 2.93.1

Short Description
In Edit Mode, use one of the Origin operations (Origin to Selected, to 3D Cursor, to Geometry, ...), then doing an Undo, will move the entire object's geometry to the Origin's new location, but with the relative location of the old Origin

Steps to Reproduce

  • Open default scene
  • Enable 3D Viewport Pie Menus addon
  • Switch to edit mode
  • Open pie menu to change origin location {key Ctrl Alt X}
  • And select Origin to Bottom (select any)
  • Undo

Workaround:
Undo has to be used again in Object mode to work

Blender 2.93.1 **Short Description** In Edit Mode, use one of the Origin operations (Origin to Selected, to 3D Cursor, to Geometry, ...), then doing an Undo, will move the entire object's geometry to the Origin's new location, but with the relative location of the old Origin **Steps to Reproduce** - Open default scene - Enable `3D Viewport Pie Menus` addon - Switch to edit mode - Open pie menu to change origin location {key Ctrl Alt X} - And select `Origin to Bottom` (select any) - Undo Workaround: Undo has to be used again in Object mode to work
Author

Added subscriber: @xeoncat

Added subscriber: @xeoncat
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

In Edit Mode, use one of the Origin operations (Origin to Selected, to 3D Cursor, to Geometry, ...)

How do you even execute this in Editmode? (this should not be allowed, giving you the Operation cannot be performed in editmode error)

> In Edit Mode, use one of the Origin operations (Origin to Selected, to 3D Cursor, to Geometry, ...) How do you even execute this in Editmode? (this should not be allowed, giving you the `Operation cannot be performed in editmode` error)
Author

I'm absolutely sure you can, both from the pie menu (Ctrl+Alt+X) and by searching the name of the operation, (and if it wasn't intended to be, it's easily one of the most useful operations)

Captura de ecrã 2021-11-17 133251.png

I'm absolutely sure you can, both from the pie menu (Ctrl+Alt+X) and by searching the name of the operation, (and if it wasn't intended to be, it's easily one of the most useful operations) ![Captura de ecrã 2021-11-17 133251.png](https://archive.blender.org/developer/F11819333/Captura_de_ecrã_2021-11-17_133251.png)
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Hi, Origin Menu is available with 3D Viewport Pie Menus add-on.

And I can reproduce this on master. Will mark this as confirmed :)

Hi, Origin Menu is available with `3D Viewport Pie Menus` add-on. And I can reproduce this on master. Will mark this as confirmed :)
Member

Ah, OK, wasnt aware the Addon would do this
Internally, all it does is this though:

        bpy.ops.object.mode_set(mode='OBJECT')
        bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
        bpy.ops.object.mode_set(mode='EDIT')

but wrapping this in a single undo step somehow confuses blender (I think this happens elsewhere as well if modeswitches are involved).
You would probably get around it by unchecking Global Undo in Preferences (but this is a worse workaround than is already suggested).

Ah, OK, wasnt aware the Addon would do this Internally, all it does is this though: ``` bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.origin_set(type='ORIGIN_CURSOR') bpy.ops.object.mode_set(mode='EDIT') ``` but wrapping this in a single undo step somehow confuses blender (I think this happens elsewhere as well if modeswitches are involved). You would probably get around it by unchecking `Global Undo` in Preferences (but this is a worse workaround than is already suggested).
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#93122
No description provided.