[Bf-blender-cvs] [8b0bc7e3e8b] sculpt-dev: Cleanup: Clang format

Pablo Dobarro noreply at git.blender.org
Wed Mar 17 01:53:20 CET 2021


Commit: 8b0bc7e3e8ba7e68078552b68df93f3b6ff528e0
Author: Pablo Dobarro
Date:   Tue Mar 16 21:25:56 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rB8b0bc7e3e8ba7e68078552b68df93f3b6ff528e0

Cleanup: Clang format

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

M	source/blender/editors/sculpt_paint/sculpt_filter_mask.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mask.c b/source/blender/editors/sculpt_paint/sculpt_filter_mask.c
index e09f8551c04..1dc6886f699 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_mask.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_mask.c
@@ -319,7 +319,6 @@ void SCULPT_OT_mask_filter(struct wmOperatorType *ot)
 /******************************************************************************************/
 /* Interactive Preview Mask Filter */
 
-
 #define SCULPT_IPMASK_FILTER_MIN_MULTITHREAD 1000
 #define SCULPT_IPMASK_FILTER_GRANULARITY 100
 
@@ -332,7 +331,6 @@ typedef enum eSculptIPMaskFilterType {
   IPMASK_FILTER_INVERT,
 } eSculptIPMaskFilterType;
 
-
 typedef enum MaskFilterStepDirectionType {
   MASK_FILTER_STEP_DIRECTION_FORWARD,
   MASK_FILTER_STEP_DIRECTION_BACKWARD,
@@ -963,14 +961,19 @@ static int sculpt_ipmask_filter_modal(bContext *C, wmOperator *op, const wmEvent
   return OPERATOR_RUNNING_MODAL;
 }
 
-static void sculpt_ipmask_store_initial_undo_step(Object *ob) {
+static void sculpt_ipmask_store_initial_undo_step(Object *ob)
+{
   SculptSession *ss = ob->sculpt;
   for (int i = 0; i < ss->filter_cache->totnode; i++) {
     SCULPT_undo_push_node(ob, ss->filter_cache->nodes[i], SCULPT_UNDO_MASK);
   }
 }
 
-static FilterCache *sculpt_ipmask_filter_cache_init(Object *ob, Sculpt *sd, const eSculptIPMaskFilterType filter_type, const bool init_automasking) {
+static FilterCache *sculpt_ipmask_filter_cache_init(Object *ob,
+                                                    Sculpt *sd,
+                                                    const eSculptIPMaskFilterType filter_type,
+                                                    const bool init_automasking)
+{
   SculptSession *ss = ob->sculpt;
   FilterCache *filter_cache = MEM_callocN(sizeof(FilterCache), "filter cache");
 
@@ -1042,13 +1045,12 @@ static int sculpt_ipmask_filter_exec(bContext *C, wmOperator *op)
   sculpt_ipmask_store_initial_undo_step(ob);
   sculpt_ipmask_store_reference_step(ss);
 
-  const float target_step = direction == MASK_FILTER_STEP_DIRECTION_FORWARD? 1 : -1;
+  const float target_step = direction == MASK_FILTER_STEP_DIRECTION_FORWARD ? 1 : -1;
   if (sculpt_ipmask_filter_uses_apply_from_original(filter_type)) {
     sculpt_ipmask_apply_from_original_mask_data(ob, filter_type, strength * target_step);
   }
   else {
-    sculpt_ipmask_filter_update_to_target_step(
-        ss, target_step, iteration_count, 0.0f);
+    sculpt_ipmask_filter_update_to_target_step(ss, target_step, iteration_count, 0.0f);
   }
 
   SCULPT_tag_update_overlays(C);
@@ -1074,46 +1076,45 @@ void SCULPT_OT_ipmask_filter(struct wmOperatorType *ot)
 
   ot->flag = OPTYPE_REGISTER;
 
+  static EnumPropertyItem prop_ipmask_filter_types[] = {
+      {IPMASK_FILTER_SMOOTH_SHARPEN,
+       "SMOOTH_SHARPEN",
+       0,
+       "Smooth/Sharpen",
+       "Smooth and sharpen the mask"},
+      {IPMASK_FILTER_GROW_SHRINK, "GROW_SHRINK", 0, "Grow/Shrink", "Grow and shirnk the mask"},
+      {IPMASK_FILTER_HARDER_SOFTER,
+       "HARDER_SOFTER",
+       0,
+       "Harder/Softer",
+       "Makes the entire mask harder or softer"},
+      {IPMASK_FILTER_ADD_SUBSTRACT,
+       "ADD_SUBSTRACT",
+       0,
+       "Add/Substract",
+       "Adds or substract a value to the mask"},
+      {IPMASK_FILTER_CONTRAST,
+       "CONTRAST",
+       0,
+       "Contrast",
+       "Increases or decreases the contrast of the mask"},
+      {IPMASK_FILTER_INVERT, "INVERT", 0, "Invert", "Inverts the mask"},
+      {0, NULL, 0, NULL, NULL},
+  };
 
-static EnumPropertyItem prop_ipmask_filter_types[] = {
-    {IPMASK_FILTER_SMOOTH_SHARPEN,
-     "SMOOTH_SHARPEN",
-     0,
-     "Smooth/Sharpen",
-     "Smooth and sharpen the mask"},
-    {IPMASK_FILTER_GROW_SHRINK, "GROW_SHRINK", 0, "Grow/Shrink", "Grow and shirnk the mask"},
-    {IPMASK_FILTER_HARDER_SOFTER,
-     "HARDER_SOFTER",
-     0,
-     "Harder/Softer",
-     "Makes the entire mask harder or softer"},
-    {IPMASK_FILTER_ADD_SUBSTRACT,
-     "ADD_SUBSTRACT",
-     0,
-     "Add/Substract",
-     "Adds or substract a value to the mask"},
-    {IPMASK_FILTER_CONTRAST,
-     "CONTRAST",
-     0,
-     "Contrast",
-     "Increases or decreases the contrast of the mask"},
-    {IPMASK_FILTER_INVERT, "INVERT", 0, "Invert", "Inverts the mask"},
-    {0, NULL, 0, NULL, NULL},
-};
-
-static EnumPropertyItem prop_ipmask_filter_direction_types[] = {
-    {MASK_FILTER_STEP_DIRECTION_FORWARD,
-     "FORWARD",
-     0,
-     "Forward",
-     "Apply the filter in the forward direction"},
-    {MASK_FILTER_STEP_DIRECTION_BACKWARD,
-     "BACKWARD",
-     0,
-     "Backward",
-     "Apply the filter in the backward direction"},
-    {0, NULL, 0, NULL, NULL},
-};
+  static EnumPropertyItem prop_ipmask_filter_direction_types[] = {
+      {MASK_FILTER_STEP_DIRECTION_FORWARD,
+       "FORWARD",
+       0,
+       "Forward",
+       "Apply the filter in the forward direction"},
+      {MASK_FILTER_STEP_DIRECTION_BACKWARD,
+       "BACKWARD",
+       0,
+       "Backward",
+       "Apply the filter in the backward direction"},
+      {0, NULL, 0, NULL, NULL},
+  };
 
   /* RNA. */
   RNA_def_enum(ot->srna,



More information about the Bf-blender-cvs mailing list