Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2019-10-31 20:09:53 +0300
committermano-wii <germano.costa@ig.com.br>2019-10-31 20:09:53 +0300
commit44d67b6dc8b973dd924ef8b8d1177d650f559790 (patch)
treee6f4d8d78b2dd8a22e0ef666dfa045d0935862ad /source/blender/makesrna/intern/rna_scene.c
parent3c32c5c2ddd04ef826d58bc3f8dd3f4420adeb73 (diff)
Transform: Add option to exclude back facing geometry from snapping
Add new `Backface Culling` option to the snapping properties. This option has nothing to do with the view3d display or the workbench `Backface Culling` option. Limitation: - In edit mode, this option only affects snap to faces. Maniphest Tasks: T71217 Differential Revision: https://developer.blender.org/D6155
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index f1e20b32ddc..b9bc7b2bbf5 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3035,6 +3035,11 @@ static void rna_def_tool_settings(BlenderRNA *brna)
"Project individual elements on the surface of other objects");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
+ prop = RNA_def_property(srna, "use_snap_backface_culling", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_BACKFACE_CULLING);
+ RNA_def_property_ui_text(prop, "Backface Culling", "Exclude back facing geometry from snapping");
+ RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
+
prop = RNA_def_property(srna, "use_snap_self", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "snap_flag", SCE_SNAP_NO_SELF);
RNA_def_property_ui_text(prop, "Project onto Self", "Snap onto itself (Edit Mode Only)");