[Bf-blender-cvs] [1d440b10bfe] temp-sculpt-normals-masking: temp-sculpt-normals-masking: Fix warnings

Joseph Eagar noreply at git.blender.org
Thu Sep 29 08:19:59 CEST 2022


Commit: 1d440b10bfe2b9b98ca3447ffcbcabe5d285f68e
Author: Joseph Eagar
Date:   Wed Sep 28 23:19:41 2022 -0700
Branches: temp-sculpt-normals-masking
https://developer.blender.org/rB1d440b10bfe2b9b98ca3447ffcbcabe5d285f68e

temp-sculpt-normals-masking: Fix warnings

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

M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_automasking.cc
M	source/blender/makesrna/intern/rna_sculpt_paint.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index c95ddd6e06e..7fc5df8237a 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -6014,7 +6014,7 @@ void SCULPT_fake_neighbors_free(Object *ob)
 }
 
 void SCULPT_automasking_node_begin(Object *ob,
-                                   const SculptSession *ss,
+                                   const SculptSession *UNUSED(ss),
                                    AutomaskingCache *automasking,
                                    AutomaskingNodeData *node_data,
                                    PBVHNode *node)
@@ -6036,7 +6036,7 @@ void SCULPT_automasking_node_begin(Object *ob,
   }
 }
 
-void SCULPT_automasking_node_update(SculptSession *ss,
+void SCULPT_automasking_node_update(SculptSession *UNUSED(ss),
                                     AutomaskingNodeData *automask_data,
                                     PBVHVertexIter *vd)
 {
diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.cc b/source/blender/editors/sculpt_paint/sculpt_automasking.cc
index 0e245d80414..100eb69ac48 100644
--- a/source/blender/editors/sculpt_paint/sculpt_automasking.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_automasking.cc
@@ -133,7 +133,7 @@ static int sculpt_automasking_mode_effective_bits(const Sculpt *sculpt, const Br
   return sculpt->automasking_flags;
 }
 
-bool SCULPT_automasking_needs_normal(const SculptSession *ss,
+bool SCULPT_automasking_needs_normal(const SculptSession *UNUSED(ss),
                                      const Sculpt *sculpt,
                                      const Brush *brush)
 {
@@ -142,8 +142,7 @@ bool SCULPT_automasking_needs_normal(const SculptSession *ss,
   return flags & (BRUSH_AUTOMASKING_BRUSH_NORMAL | BRUSH_AUTOMASKING_VIEW_NORMAL);
 }
 
-static float sculpt_automasking_normal_calc(AutomaskingCache *automasking,
-                                            SculptSession *ss,
+static float sculpt_automasking_normal_calc(SculptSession *ss,
                                             PBVHVertRef vertex,
                                             float3 &normal,
                                             float limit_lower,
@@ -186,10 +185,9 @@ static bool SCULPT_automasking_needs_factors_cache(const Sculpt *sd, const Brush
     return true;
   }
 
-  if (automasking_flags & (BRUSH_AUTOMASKING_BOUNDARY_EDGES,
-                           BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS,
-                           BRUSH_AUTOMASKING_BRUSH_NORMAL,
-                           BRUSH_AUTOMASKING_VIEW_NORMAL)) {
+  if (automasking_flags &
+      (BRUSH_AUTOMASKING_BOUNDARY_EDGES | BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS |
+       BRUSH_AUTOMASKING_BRUSH_NORMAL | BRUSH_AUTOMASKING_VIEW_NORMAL)) {
     return brush && brush->automasking_boundary_edges_propagation_steps != 1;
   }
   return false;
@@ -210,8 +208,7 @@ static float automasking_brush_normal_factor(AutomaskingCache *automasking,
     initial_normal = ss->filter_cache->initial_normal;
   }
 
-  return sculpt_automasking_normal_calc(automasking,
-                                        ss,
+  return sculpt_automasking_normal_calc(ss,
                                         vertex,
                                         initial_normal,
                                         automasking->settings.start_normal_limit - falloff * 0.5f,
@@ -235,8 +232,7 @@ static float automasking_view_normal_factor(AutomaskingCache *automasking,
     view_normal = ss->filter_cache->view_normal;
   }
 
-  return sculpt_automasking_normal_calc(automasking,
-                                        ss,
+  return sculpt_automasking_normal_calc(ss,
                                         vertex,
                                         view_normal,
                                         automasking->settings.view_normal_limit,
@@ -248,7 +244,7 @@ static float automasking_view_occlusion_factor(AutomaskingCache *automasking,
                                                SculptSession *ss,
                                                PBVHVertRef vertex,
                                                uchar stroke_id,
-                                               AutomaskingNodeData *automask_data)
+                                               AutomaskingNodeData *UNUSED(automask_data))
 {
   char f = *(char *)SCULPT_vertex_attr_get(vertex, ss->attrs.automasking_occlusion);
 
@@ -771,9 +767,9 @@ static void SCULPT_automasking_cache_settings_update(AutomaskingCache *automaski
   }
 }
 
-void sculpt_normal_occlusion_automasking_fill(AutomaskingCache *automasking,
-                                              Object *ob,
-                                              eAutomasking_flag mode)
+static void sculpt_normal_occlusion_automasking_fill(AutomaskingCache *automasking,
+                                                     Object *ob,
+                                                     eAutomasking_flag mode)
 {
   SculptSession *ss = ob->sculpt;
   const int totvert = SCULPT_vertex_count_get(ss);
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index b885a26b91c..5348cf80d22 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -990,7 +990,7 @@ static void rna_def_sculpt(BlenderRNA *brna)
   RNA_def_property_range(prop, 0.0001f, 1.0f);  
   RNA_def_property_ui_text(prop,
                            "Area Normal Falloff",
-                           "Extend the angular range with a falloff gradient.");
+                           "Extend the angular range with a falloff gradient");
   RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
 
   prop = RNA_def_property(srna, "automasking_view_normal_limit", PROP_FLOAT, PROP_ANGLE);
@@ -1008,7 +1008,7 @@ static void rna_def_sculpt(BlenderRNA *brna)
   RNA_def_property_range(prop, 0.0001f, 1.0f);  
   RNA_def_property_ui_text(prop,
                            "View Normal Falloff",
-                           "Extend the angular range with a falloff gradient.");
+                           "Extend the angular range with a falloff gradient");
   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