[Bf-blender-cvs] [b3525c3487c] master: UI: make snap self inactive if proportional editing
Ethan-Hall
noreply at git.blender.org
Mon Apr 11 22:33:18 CEST 2022
Commit: b3525c3487ca893aac5bb8241ce154f491508224
Author: Ethan-Hall
Date: Mon Apr 11 17:30:37 2022 -0300
Branches: master
https://developer.blender.org/rBb3525c3487ca893aac5bb8241ce154f491508224
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
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 2e924d5b4c9..ecd48aab697 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -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")
More information about the Bf-blender-cvs
mailing list