[Bf-blender-cvs] [484337f4f71] temp-sculpt-normals-masking: temp-sculpt-normals-masking: Patch changes

Joseph Eagar noreply at git.blender.org
Wed Jun 29 08:44:55 CEST 2022


Commit: 484337f4f714e552cb2f07b9b5e2f8bf1c0e087a
Author: Joseph Eagar
Date:   Tue Jun 28 23:43:16 2022 -0700
Branches: temp-sculpt-normals-masking
https://developer.blender.org/rB484337f4f714e552cb2f07b9b5e2f8bf1c0e087a

temp-sculpt-normals-masking: Patch changes

* Changed name 'Occlusion' to 'View Normal'
* Changed name 'Initial Normal' to 'Area Normal'
* Added missing RNA for brush automasking.
* Added normals automasking modes to brush advanced panel.

===================================================================

M	release/scripts/startup/bl_ui/properties_paint_common.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/makesrna/intern/rna_brush.c
M	source/blender/makesrna/intern/rna_sculpt_paint.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index f0034a3d710..2ce178e6494 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -946,6 +946,23 @@ def brush_settings_advanced(layout, context, brush, popover=False):
         col.prop(brush, "use_automasking_boundary_face_sets", text="Face Sets Boundary")
         col.prop(brush, "automasking_boundary_edges_propagation_steps")
 
+        col.prop(brush, "use_automasking_start_normal", text="Area Normal")
+        col.prop(brush, "use_automasking_view_normal", text="View Normal")
+
+        sculpt = context.tool_settings.sculpt
+
+        if brush.use_automasking_start_normal:
+            col.separator()
+
+            col.prop(sculpt, "automasking_start_normal_limit")
+            col.prop(sculpt, "automasking_start_normal_falloff")
+
+        if brush.use_automasking_view_normal:
+            col.separator()
+
+            col.prop(sculpt, "automasking_view_normal_limit")
+            col.prop(sculpt, "automasking_view_normal_falloff")
+
         layout.separator()
 
         # sculpt plane settings
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 102531426d2..f0a99ea0979 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -970,8 +970,8 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
         col.prop(sculpt, "use_automasking_topology", text="Topology")
         col.prop(sculpt, "use_automasking_face_sets", text="Face Sets")
         col.prop(sculpt, "use_automasking_boundary_edges", text="Mesh Boundary")
-        col.prop(sculpt, "use_automasking_start_normal", text="Initial Normal")
-        col.prop(sculpt, "use_automasking_view_normal", text="Occlusion")
+        col.prop(sculpt, "use_automasking_start_normal", text="Area Normal")
+        col.prop(sculpt, "use_automasking_view_normal", text="View Normal")
 
         if sculpt.use_automasking_start_normal:
             col.separator()
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 80a61543b5a..87abc78d130 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -3127,6 +3127,22 @@ static void rna_def_brush(BlenderRNA *brna)
                            "Do not affect vertices that belong to a Face Set boundary");
   RNA_def_property_update(prop, 0, "rna_Brush_update");
 
+  prop = RNA_def_property(srna, "use_automasking_start_normal", PROP_BOOLEAN, PROP_NONE);
+  RNA_def_property_boolean_sdna(
+      prop, NULL, "automasking_flags", BRUSH_AUTOMASKING_BRUSH_NORMAL);
+  RNA_def_property_ui_text(prop,
+                           "Area Normal",
+                           "Only include vertices with similar normal to initial brush dab");
+  RNA_def_property_update(prop, 0, "rna_Brush_update");
+
+  prop = RNA_def_property(srna, "use_automasking_view_normal", PROP_BOOLEAN, PROP_NONE);
+  RNA_def_property_boolean_sdna(
+      prop, NULL, "automasking_flags", BRUSH_AUTOMASKING_VIEW_NORMAL);
+  RNA_def_property_ui_text(prop,
+                           "View Normal",
+                           "Mask back facing vertices");
+  RNA_def_property_update(prop, 0, "rna_Brush_update");
+  
   prop = RNA_def_property(srna, "use_scene_spacing", PROP_ENUM, PROP_NONE);
   RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
   RNA_def_property_enum_items(prop, brush_spacing_unit_items);
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 8bafe5f6e41..b599c7bb449 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -905,7 +905,7 @@ static void rna_def_sculpt(BlenderRNA *brna)
   RNA_def_property_boolean_sdna(
       prop, NULL, "automasking_flags", BRUSH_AUTOMASKING_BRUSH_NORMAL);
   RNA_def_property_ui_text(prop,
-                           "Initial Normal",
+                           "Area Normal",
                            "Only include vertices with similar normal to initial brush dab");
   RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
 
@@ -913,8 +913,8 @@ static void rna_def_sculpt(BlenderRNA *brna)
   RNA_def_property_boolean_sdna(
       prop, NULL, "automasking_flags", BRUSH_AUTOMASKING_VIEW_NORMAL);
   RNA_def_property_ui_text(prop,
-                           "Occlusion",
-                           "Ignore back facing vertices");
+                           "View Normal",
+                           "Mask back facing vertices");
   RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
 
   prop = RNA_def_property(srna, "automasking_start_normal_limit", PROP_FLOAT, PROP_ANGLE);
@@ -922,8 +922,8 @@ static void rna_def_sculpt(BlenderRNA *brna)
       prop, NULL, "automasking_start_normal_limit");
   RNA_def_property_range(prop, 0.0001f, M_PI);  
   RNA_def_property_ui_text(prop,
-                           "Initial Limit",
-                           "Initial normal limit");            
+                           "Area Normal Limit",
+                           "");            
   RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
 
   prop = RNA_def_property(srna, "automasking_start_normal_falloff", PROP_FLOAT, PROP_FACTOR);
@@ -931,8 +931,8 @@ static void rna_def_sculpt(BlenderRNA *brna)
       prop, NULL, "automasking_start_normal_falloff");
   RNA_def_property_range(prop, 0.0001f, 1.0f);  
   RNA_def_property_ui_text(prop,
-                           "Initial Falloff",
-                           "Initial normal falloff");
+                           "Area Normal Falloff",
+                           "");
   RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
 
   prop = RNA_def_property(srna, "automasking_view_normal_limit", PROP_FLOAT, PROP_ANGLE);
@@ -940,8 +940,8 @@ static void rna_def_sculpt(BlenderRNA *brna)
       prop, NULL, "automasking_view_normal_limit");
   RNA_def_property_range(prop, 0.0001f, M_PI);  
   RNA_def_property_ui_text(prop,
-                           "Occlusion Limit",
-                           "Occlusion normal limit");            
+                           "View Normal Limit",
+                           "");            
   RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
 
   prop = RNA_def_property(srna, "automasking_view_normal_falloff", PROP_FLOAT, PROP_FACTOR);
@@ -949,8 +949,8 @@ static void rna_def_sculpt(BlenderRNA *brna)
       prop, NULL, "automasking_view_normal_falloff");
   RNA_def_property_range(prop, 0.0001f, 1.0f);  
   RNA_def_property_ui_text(prop,
-                           "Occlusion Falloff",
-                           "Occlusion normal falloff");
+                           "View Normal Falloff",
+                           "");
   RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
   
   prop = RNA_def_property(srna, "symmetrize_direction", PROP_ENUM, PROP_NONE);



More information about the Bf-blender-cvs mailing list