UI: make snap self inactive if proportional editing

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.

Reviewed By: mano-wii

Differential Revision: https://developer.blender.org/D14496
This commit is contained in:
Ethan-Hall 2022-04-11 17:30:37 -03:00 committed by Germano Cavalcante
parent 4aa9888854
commit b3525c3487
1 changed files with 4 additions and 2 deletions

View File

@ -6746,8 +6746,10 @@ class VIEW3D_PT_snapping(Panel):
col.prop(tool_settings, "use_snap_backface_culling")
if obj:
if object_mode == 'EDIT':
col.prop(tool_settings, "use_snap_self")
if object_mode == 'EDIT' and obj.type not in {'LATTICE', 'META', 'FONT'}:
sub = col.column()
sub.active = not (tool_settings.use_proportional_edit and obj.type == 'MESH')
sub.prop(tool_settings, "use_snap_self")
if object_mode in {'OBJECT', 'POSE', 'EDIT', 'WEIGHT_PAINT'}:
col.prop(tool_settings, "use_snap_align_rotation")