Page MenuHome

UV Editing - Snap cursor to origin
ClosedPublic

Authored by Tomek Gubala (VGT) on May 28 2022, 4:35 PM.

Details

Summary

UV Editing: Add option to reset position of cursor to default [0,0] position

Adds support for "ORIGIN" target in uv.snap_cursor
Adds "Cursor to Origin" option in Shift+S pie menu and uv->snap top menu


In 3D view there is option to quickly bring back cursor to world origin with Shift+S -> 1 key sequence:

The same pie menu with some similar options is available in uv editor but option to revert cursor position to [0,0] is missing.

Patch is adding support for this option and putting it also in pie menu and in top menu: uv->snap->cursor to origin


One thing I'm not sure of is how pie menu ordering works. I wanted this option to be under "1" number similar to 3D view, but I didn't saw any controls for it in the code. I noticed that it shows under different numbers depending on order of pie menu elements in the code so I "brute force" it to check in which position it will be under "1" number. Not sure if this is error prone though.

Diff Detail

Repository
rB Blender

Event Timeline

Tomek Gubala (VGT) requested review of this revision.May 28 2022, 4:35 PM
Tomek Gubala (VGT) created this revision.
Tomek Gubala (VGT) edited the summary of this revision. (Show Details)May 28 2022, 9:25 PM
Tomek Gubala (VGT) added a project: Restricted Project.May 29 2022, 12:07 AM
Tomek Gubala (VGT) added a comment.EditedJun 2 2022, 9:30 AM

From what I learned from blender-coders chat I should add subscribers to the diff choosing owners from module I'm changing to request review of it. @Brecht Van Lommel (brecht) and @Campbell Barton (campbellbarton) I would like to request a review of this diff and if you could let me know if this is something that could be added to Blender.

Tomek Gubala (VGT) edited the summary of this revision. (Show Details)Jun 2 2022, 10:04 AM
Brecht Van Lommel (brecht) edited reviewers, added: Campbell Barton (campbellbarton); removed: Restricted Project.

Looks good to me, will wait for @Campbell Barton (campbellbarton) to be sure this was not intentionally left out.

@Campbell Barton (campbellbarton) will you find some time to take a look at it if it could be merged?

@Brecht Van Lommel (brecht) Do you know how I could reach Campbell Barton to push this pull request further?

He should see emails like this, maybe just accidentally missed the last ones. In general developers can be found in #blender-coders on blender.chat.

Anyway, I think it's fine to commit this now.

This revision is now accepted and ready to land.Jul 19 2022, 7:27 PM
This revision was automatically updated to reflect the committed changes.