Page MenuHome

Fix T63470: Snap Selection to Cursor does not respect cursor rotation
Needs ReviewPublic

Authored by Habib Gahbiche (zazizizou) on May 19 2019, 10:25 PM.

Details

Summary

Since we have a 3D cursor now, we should consider rotation when snapping objects to cursor. Also, the user can chose to apply a rotation offset, i.e. either add or copy the cursor's rotation to the selected objects.

Moved transform locks to Ed_util.

Example:

Diff Detail

Repository
rB Blender
Branch
snap_rot (branched from master)
Build Status
Buildable 3653
Build 3653: arc lint + arc unit

Event Timeline

@Germano Cavalcante (mano-wii)

Hi Germano, I was wondering if you could review this patch for the snap improvements project?

I just wrote a patch to do basically the same thing and then saw this, oops! I bet it would happen again though, it's good low hanging fruit.

I'm happy to rebase to current master if if Habib isn't around. The only functional differences in my patch were not including a "rotation offset" mode and putting rotation snapping behind an on-by-default option. Personally I don't see the use case for the "Rotation Offset" included in this patch.

Thanks!

I have plans to move all of those view3d_snap operations to be transform operators. Since they repeat many similar features.
So regarding the proposal, I don't like the idea of moving internal functions, and incrementing this similar code.
But this is something that I have to discuss with other developers first.

After discussed, I can add the proposal to T73993: Snapping & precision modeling improvements

That sounds good! This did feel like basic stuff that must be implemented elsewhere.

If there's anything with a lower priority that you would want to delegate, I'd be happy to help improve this area.

Is this still being considered? Its an important feature that I find myself wanting a lot. I've set up a script to automate setting the Transform Orientation to Cursor and running 'Align to Transform Orientation', but it's a conspiciously missing option ever since the introduction of rotation to the 3d cursor

I agree, this is an important patch and feature, @Hans Goudey (HooglyBoogly) maybe this cannot be implemented in 2.93, but it should be reviewed ASAP for Master I think, so we don't miss the opportunity again, what do you think?

I worked on an alternative patch that reuses the features of the transform operators instead of adding new ones to the view_3d operator:
D7780: Transform: Replace View3d Snap operators with a transform ops version

I need to revisit it. (But I don't mind if someone commandeer the revision)