[Bf-blender-cvs] [9cfa8b945a2] master: Cleanup: format

Campbell Barton noreply at git.blender.org
Thu Sep 29 02:12:43 CEST 2022


Commit: 9cfa8b945a2f24e96005223c4801497191fab281
Author: Campbell Barton
Date:   Thu Sep 29 09:46:46 2022 +1000
Branches: master
https://developer.blender.org/rB9cfa8b945a2f24e96005223c4801497191fab281

Cleanup: format

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

M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/draw/intern/draw_manager_data.c
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_automasking.cc
M	source/blender/editors/sculpt_paint/sculpt_ops.c
M	source/blender/makesdna/DNA_brush_types.h
M	source/blender/makesrna/intern/rna_brush.c
M	source/blender/nodes/geometry/nodes/node_geo_input_control_point_neighbors.cc

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

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 153bce78ec2..d18b75e78af 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -939,6 +939,7 @@ class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel):
 
         layout.operator("object.voxel_remesh", text="Remesh")
 
+
 # TODO, move to space_view3d.py
 class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
     bl_context = ".sculpt_mode"  # dot on purpose (access from topbar)
@@ -985,10 +986,10 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
             props.use_automask_settings = True
 
             col2 = col.column()
-            
+
             col2.prop(sculpt, "automasking_cavity_factor", text="Cavity Factor")
             col2.prop(sculpt, "automasking_cavity_blur_steps", text="Cavity Blur")
-            
+
             col2.prop(sculpt, "use_automasking_custom_cavity_curve", text="Use Curve")
 
             if sculpt.use_automasking_custom_cavity_curve:
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c
index 3e0708d8b49..060617764f7 100644
--- a/source/blender/draw/intern/draw_manager_data.c
+++ b/source/blender/draw/intern/draw_manager_data.c
@@ -34,9 +34,9 @@
 #include "BLI_hash.h"
 #include "BLI_link_utils.h"
 #include "BLI_listbase.h"
+#include "BLI_math_bits.h"
 #include "BLI_memblock.h"
 #include "BLI_mempool.h"
-#include "BLI_math_bits.h"
 
 #ifdef DRW_DEBUG_CULLING
 #  include "BLI_math_bits.h"
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index ac77e007081..54810436d20 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -3548,7 +3548,8 @@ static void do_brush_action(Sculpt *sd,
     SCULPT_bmesh_topology_rake(sd, ob, nodes, totnode, brush->topology_rake_factor);
   }
 
-  if (!SCULPT_tool_can_reuse_cavity_mask(brush->sculpt_tool) || (ss->cache->supports_gravity && sd->gravity_factor > 0.0f)) {
+  if (!SCULPT_tool_can_reuse_cavity_mask(brush->sculpt_tool) ||
+      (ss->cache->supports_gravity && sd->gravity_factor > 0.0f)) {
     /* Clear cavity mask cache. */
     ss->last_automasking_settings_hash = 0;
   }
diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.cc b/source/blender/editors/sculpt_paint/sculpt_automasking.cc
index 47856c50b57..cb59b591e5c 100644
--- a/source/blender/editors/sculpt_paint/sculpt_automasking.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_automasking.cc
@@ -141,8 +141,7 @@ static bool SCULPT_automasking_needs_factors_cache(const Sculpt *sd, const Brush
   return false;
 }
 
-static float sculpt_cavity_calc_factor(AutomaskingCache *automasking,
-                                       float factor)
+static float sculpt_cavity_calc_factor(AutomaskingCache *automasking, float factor)
 {
   float sign = signf(factor);
 
@@ -323,14 +322,14 @@ int SCULPT_automasking_settings_hash(Object *ob, AutomaskingCache *automasking)
 
   if (automasking->settings.flags & BRUSH_AUTOMASKING_CAVITY_ALL) {
     hash = BLI_hash_int_2d(hash, automasking->settings.cavity_blur_steps);
-    hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint*>(&automasking->settings.cavity_factor));
+    hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint *>(&automasking->settings.cavity_factor));
 
     if (automasking->settings.cavity_curve) {
       CurveMap *cm = automasking->settings.cavity_curve->cm;
 
       for (int i = 0; i < cm->totpoint; i++) {
-        hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint*>(&cm->curve[i].x));
-        hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint*>(&cm->curve[i].y));
+        hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint *>(&cm->curve[i].x));
+        hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint *>(&cm->curve[i].y));
         hash = BLI_hash_int_2d(hash, (uint)cm->curve[i].flag);
         hash = BLI_hash_int_2d(hash, (uint)cm->curve[i].shorty);
       }
diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.c b/source/blender/editors/sculpt_paint/sculpt_ops.c
index d5edd5708ad..965351c76d6 100644
--- a/source/blender/editors/sculpt_paint/sculpt_ops.c
+++ b/source/blender/editors/sculpt_paint/sculpt_ops.c
@@ -1242,8 +1242,24 @@ static void SCULPT_OT_mask_from_cavity(wmOperatorType *ot)
                   "Use Automask Settings",
                   "Use default settings from Options panel in sculpt mode.");
 
-  RNA_def_float(ot->srna, "factor", 0.5f, 0.0f, 5.0f, "Cavity Factor", "The contrast of the cavity mask", 0.0f, 1.0f);
-  RNA_def_int(ot->srna, "blur_steps", 2, 0, 25, "Cavity Blur", "The number of times the cavity mask is blurred", 0, 25);
+  RNA_def_float(ot->srna,
+                "factor",
+                0.5f,
+                0.0f,
+                5.0f,
+                "Cavity Factor",
+                "The contrast of the cavity mask",
+                0.0f,
+                1.0f);
+  RNA_def_int(ot->srna,
+              "blur_steps",
+              2,
+              0,
+              25,
+              "Cavity Blur",
+              "The number of times the cavity mask is blurred",
+              0,
+              25);
   RNA_def_boolean(ot->srna, "use_curve", false, "Use Curve", "");
 
   RNA_def_boolean(ot->srna, "invert", false, "Cavity (Inverted)", "");
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index c0beb89392b..a415122579e 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -391,7 +391,7 @@ typedef struct Brush {
 
   int automasking_cavity_blur_steps;
   float automasking_cavity_factor;
-  
+
   struct CurveMapping *automasking_cavity_curve;
 } Brush;
 
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 1bff91ca84e..5962e6cd81d 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -3247,7 +3247,6 @@ static void rna_def_brush(BlenderRNA *brna)
     RNA_def_property_update(prop, 0, "rna_Brush_update");
   } while ((++entry)->identifier);
 
-  
   prop = RNA_def_property(srna, "automasking_cavity_factor", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "automasking_cavity_factor");
   RNA_def_property_ui_text(prop, "Cavity Factor", "The contrast of the cavity mask");
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_control_point_neighbors.cc b/source/blender/nodes/geometry/nodes/node_geo_input_control_point_neighbors.cc
index a0f285f0904..7af4b13cd57 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_control_point_neighbors.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_control_point_neighbors.cc
@@ -8,9 +8,7 @@
 
 namespace blender::nodes {
 
- int apply_offset_in_cyclic_range(const IndexRange range,
-                                        const int start_index,
-                                        const int offset)
+int apply_offset_in_cyclic_range(const IndexRange range, const int start_index, const int offset)
 {
   BLI_assert(range.contains(start_index));
   const int start_in_range = start_index - range.first();



More information about the Bf-blender-cvs mailing list