Page MenuHome

UI: make snap self inactive if proportional editing
ClosedPublic

Authored by Ethan Hall (Ethan1080) on Mar 30 2022, 2:48 AM.

Details

Summary

When using proportional editing, the 'project onto self' snap setting
is ignored since proportional editing does not allow snapping to
self. The UI should reflect this fact. This patch makes 'project onto
self' active only when proportional editing is off.


This patch:

Diff Detail

Repository
rB Blender

Event Timeline

Ethan Hall (Ethan1080) requested review of this revision.Mar 30 2022, 2:48 AM
Ethan Hall (Ethan1080) created this revision.
Germano Cavalcante (mano-wii) requested changes to this revision.Mar 31 2022, 3:20 PM

The change makes sense, but if I'm not mistaken, proportional edit doesn't work for bones, so this limitation shouldn't exist for bones.
I noticed here that curves strangely continue to self snap even with proportional edit.
The shake it generates isn't as bad as it would be with meshes, so perhaps this was deliberate.
So I recommend limiting this to Meshes only.

This revision now requires changes to proceed.Mar 31 2022, 3:20 PM
  • Fixed the conditions for when to show the snap settings

The change makes sense, but if I'm not mistaken, proportional edit doesn't work for bones, so this limitation shouldn't exist for bones.
I noticed here that curves strangely continue to self snap even with proportional edit.
The shake it generates isn't as bad as it would be with meshes, so perhaps this was deliberate.
So I recommend limiting this to Meshes only.

Good point. In addition, the setting does not apply with or without proportional editing for grease pencil, lattice, metaball, and text objects.
Also, unless I am missing something, snap does not apply to weight paint mode, so I don't understand why it appears in the conditional.

@Germano Cavalcante (mano-wii) Would it make since, as a part of this patch or another patch, to remove proportional edit from the UI when in edit/pose mode for armature objects and when in edit mode for text objects?

Germano Cavalcante (mano-wii) requested changes to this revision.Mar 31 2022, 5:01 PM
Germano Cavalcante (mano-wii) added inline comments.
release/scripts/startup/bl_ui/space_view3d.py
6753

'GPENCIL' does not have the 'EDIT' mode. It only has the 'EDIT_GPENCIL' mode.
I don't know why it's different from the others but it doesn't need to be here.

6757

Transform applies to 'WEIGHT_PAINT' when you have the rig and mesh selected.

This revision now requires changes to proceed.Mar 31 2022, 5:01 PM

@Germano Cavalcante (mano-wii) Would it make since, as a part of this patch or another patch, to remove proportional edit from the UI when in edit/pose mode for armature objects and when in edit mode for text objects?

For the font object editing mode, I don't know why we have snap options. But I might be forgetting something.
For bones, I'm not sure proportional edit doesn't apply. I don't think it would be difficult to implement, but I would have to ask the animation team first.

Ethan Hall (Ethan1080) marked 2 inline comments as done.Mar 31 2022, 5:16 PM

@Germano Cavalcante (mano-wii) Would it make since, as a part of this patch or another patch, to remove proportional edit from the UI when in edit/pose mode for armature objects and when in edit mode for text objects?

For the font object editing mode, I don't know why we have snap options. But I might be forgetting something.
For bones, I'm not sure proportional edit doesn't apply. I don't think it would be difficult to implement, but I would have to ask the animation team first.

For font objects the snap settings apply to the 3D cursor and ruler tool. Although, Project Individual Elements might not apply since these two only snap one at a time. I still think proportional editing might not apply for font objects.
Proportional edit is already not displayed when in pose mode, but if bone proportional editing is planed to be implemented soon, there is not really a need change things twice.

It looks good to me.
I would just add a comment explaining the reason for these exclusions.
Something like:
# Snap to Lattice, Metaball and Font data geometry is not supported.

Maybe someone from the User Interface team wanted to check before the commit?
Otherwise I think I can land the patch on the master this week.

This revision is now accepted and ready to land.Mar 31 2022, 6:14 PM

Wouldn't it be nice to show a hint that explains why the option is greyed-out, inside the tooltip? I believe Blender supports this in a few places already, and such messages appear in red.

@Germano Cavalcante (mano-wii) I was going to report this as a bug. I need proportional editing with snap onto self for architecture and urban design as well as terrain. It is inconvenient to have to create other duplicate guide vertices of the object itself and separate them to use them when the same object already has this information.

Looking at the code this is how it worked before but for some reason this doesn't work:

please, could you leave me a script that allows me to override this via python. only if this is not a problem, and if it is something easy