[Bf-blender-cvs] [ec3dd16ebbf] sculpt-dev: Sculpt: Remove a few debug ATTR_NO_OPT's

Joseph Eagar noreply at git.blender.org
Thu Oct 28 19:58:10 CEST 2021


Commit: ec3dd16ebbf3daad2eef6a032d4932139646ddb7
Author: Joseph Eagar
Date:   Thu Oct 28 10:57:53 2021 -0700
Branches: sculpt-dev
https://developer.blender.org/rBec3dd16ebbf3daad2eef6a032d4932139646ddb7

Sculpt: Remove a few debug ATTR_NO_OPT's

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

M	source/blender/blenkernel/intern/brush_engine.c
M	source/blender/editors/sculpt_paint/sculpt_face_set.c
M	source/blender/editors/sculpt_paint/sculpt_smooth.c

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

diff --git a/source/blender/blenkernel/intern/brush_engine.c b/source/blender/blenkernel/intern/brush_engine.c
index 717bcad902e..543b4bd2218 100644
--- a/source/blender/blenkernel/intern/brush_engine.c
+++ b/source/blender/blenkernel/intern/brush_engine.c
@@ -1699,11 +1699,11 @@ void BKE_builtin_apply_hard_edge_mode(BrushChannelSet *chset, bool do_apply)
   }
 }
 
-ATTR_NO_OPT void BKE_builtin_commandlist_create(Brush *brush,
-                                                BrushChannelSet *chset,
-                                                BrushCommandList *cl,
-                                                int tool,
-                                                BrushMappingData *mapdata)
+void BKE_builtin_commandlist_create(Brush *brush,
+                                    BrushChannelSet *chset,
+                                    BrushCommandList *cl,
+                                    int tool,
+                                    BrushMappingData *mapdata)
 {
   BrushCommand *cmd;
   BrushChannel *ch;
diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c
index 78c32e589bf..3272070a6e7 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.c
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c
@@ -301,14 +301,14 @@ static void sculpt_faceset_bm_end(SculptSession *ss, BMesh *bm)
 
 /* Draw Face Sets Brush. */
 
-ATTR_NO_OPT static int new_fset_apply_curve(SculptSession *ss,
-                                            SculptFaceSetDrawData *data,
-                                            int new_fset,
-                                            float poly_center[3],
-                                            float no[3],
-                                            SculptBrushTest *test,
-                                            BrushChannel *curve_ch,
-                                            int count)
+static int new_fset_apply_curve(SculptSession *ss,
+                                SculptFaceSetDrawData *data,
+                                int new_fset,
+                                float poly_center[3],
+                                float no[3],
+                                SculptBrushTest *test,
+                                BrushChannel *curve_ch,
+                                int count)
 {
   float fade2;
   float tmp[3];
diff --git a/source/blender/editors/sculpt_paint/sculpt_smooth.c b/source/blender/editors/sculpt_paint/sculpt_smooth.c
index aa9a185de14..44b21777163 100644
--- a/source/blender/editors/sculpt_paint/sculpt_smooth.c
+++ b/source/blender/editors/sculpt_paint/sculpt_smooth.c
@@ -18,9 +18,9 @@
  * All rights reserved.
  */
 
- /** \file
-  * \ingroup edsculpt
-  */
+/** \file
+ * \ingroup edsculpt
+ */
 
 #include "MEM_guardedalloc.h"
 
@@ -69,7 +69,7 @@
 #include "atomic_ops.h"
 #include "bmesh.h"
 #ifdef PROXY_ADVANCED
-  /* clang-format off */
+/* clang-format off */
 #include "BKE_DerivedMesh.h"
 #include "../../blenkernel/intern/pbvh_intern.h"
 /* clang-format on */
@@ -81,9 +81,9 @@
 #include "BLI_utildefines.h"
 
 void SCULPT_reproject_cdata(SculptSession *ss,
-  SculptVertRef vertex,
-  float origco[3],
-  float origno[3])
+                            SculptVertRef vertex,
+                            float origco[3],
+                            float origno[3])
 {
   BMVert *v = (BMVert *)vertex.i;
 
@@ -99,8 +99,8 @@ void SCULPT_reproject_cdata(SculptSession *ss,
 
   if (ldata->typemap[CD_MLOOPUV] != -1) {
     for (int i = ldata->typemap[CD_MLOOPUV];
-      i < ldata->totlayer && ldata->layers[i].type == CD_MLOOPUV;
-      i++) {
+         i < ldata->totlayer && ldata->layers[i].type == CD_MLOOPUV;
+         i++) {
       totuv++;
     }
 
@@ -113,14 +113,14 @@ void SCULPT_reproject_cdata(SculptSession *ss,
   float origin[3];
   float ray[3];
 
-  copy_v3_v3(origin,v->co);
-  copy_v3_v3(ray,v->no);
+  copy_v3_v3(origin, v->co);
+  copy_v3_v3(ray, v->no);
   negate_v3(ray);
 
   struct IsectRayPrecalc precalc;
-  isect_ray_tri_watertight_v3_precalc(&precalc,ray);
+  isect_ray_tri_watertight_v3_precalc(&precalc, ray);
 
-  float *lastuvs = BLI_array_alloca(lastuvs,totuv * 2);
+  float *lastuvs = BLI_array_alloca(lastuvs, totuv * 2);
 
   e = v->e;
 
@@ -138,10 +138,10 @@ void SCULPT_reproject_cdata(SculptSession *ss,
       l->next->head.hflag &= ~tag;
       l->prev->head.hflag &= ~tag;
     } while ((l = l->radial_next) != e->l);
-  } while ((e = BM_DISK_EDGE_NEXT(e,v)) != v->e);
+  } while ((e = BM_DISK_EDGE_NEXT(e, v)) != v->e);
 
   BMLoop **ls = NULL;
-  BLI_array_staticdeclare(ls,32);
+  BLI_array_staticdeclare(ls, 32);
 
   bool first = true;
   bool bad = false;
@@ -174,11 +174,11 @@ void SCULPT_reproject_cdata(SculptSession *ss,
       }
 
       l2->head.hflag |= tag;
-      BLI_array_append(ls,l2);
+      BLI_array_append(ls, l2);
 
       for (int i = 0; i < totuv; i++) {
         const int cd_uv = uvlayer[i].offset;
-        MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l2,cd_uv);
+        MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l2, cd_uv);
 
         // check that we are not part of a uv seam
         if (!first) {
@@ -204,7 +204,7 @@ void SCULPT_reproject_cdata(SculptSession *ss,
     if (bad) {
       break;
     }
-  } while ((e = BM_DISK_EDGE_NEXT(e,v)) != v->e);
+  } while ((e = BM_DISK_EDGE_NEXT(e, v)) != v->e);
 
   if (bad || !BLI_array_len(ls)) {
     return;
@@ -214,25 +214,25 @@ void SCULPT_reproject_cdata(SculptSession *ss,
 
   const float *v_proj_axis = v->no;
   float v_proj[3][3];
-  MSculptVert *mv = BKE_PBVH_SCULPTVERT(ss->cd_sculpt_vert,v);
+  MSculptVert *mv = BKE_PBVH_SCULPTVERT(ss->cd_sculpt_vert, v);
 
-  project_plane_normalized_v3_v3v3(v_proj[1],mv->origco,v_proj_axis);
+  project_plane_normalized_v3_v3v3(v_proj[1], mv->origco, v_proj_axis);
 
   /* original (l->prev, l, l->next) projections for each loop ('l' remains unchanged) */
 
   char *_blocks = alloca(ldata->totsize * totloop);
-  void **blocks = BLI_array_alloca(blocks,totloop);
+  void **blocks = BLI_array_alloca(blocks, totloop);
 
-  for (int i = 0; i < totloop; i++,_blocks += ldata->totsize) {
+  for (int i = 0; i < totloop; i++, _blocks += ldata->totsize) {
     blocks[i] = (void *)_blocks;
   }
 
-  float vco[3],vno[3];
+  float vco[3], vno[3];
 
-  copy_v3_v3(vco,v->co);
-  copy_v3_v3(vno,v->no);
+  copy_v3_v3(vco, v->co);
+  copy_v3_v3(vno, v->no);
 
-  BMFace _fakef,*fakef = &_fakef;
+  BMFace _fakef, *fakef = &_fakef;
 
 #if 0
   BMFace *projf = NULL;
@@ -264,8 +264,8 @@ void SCULPT_reproject_cdata(SculptSession *ss,
     BMLoop *l = ls[i];
     float no[3] = {0.0f, 0.0f, 0.0f};
 
-    BMLoop *fakels = BLI_array_alloca(fakels,l->f->len);
-    BMVert *fakevs = BLI_array_alloca(fakevs,l->f->len);
+    BMLoop *fakels = BLI_array_alloca(fakels, l->f->len);
+    BMVert *fakevs = BLI_array_alloca(fakevs, l->f->len);
     BMLoop *l2 = l->f->l_first;
     BMLoop *fakel = fakels;
     BMVert *fakev = fakevs;
@@ -279,14 +279,15 @@ void SCULPT_reproject_cdata(SculptSession *ss,
       *fakev = *l2->v;
       fakel->v = fakev;
 
-      SCULPT_vertex_check_origdata(ss,(SculptVertRef) { .i = (intptr_t)l2->v });
+      SCULPT_vertex_check_origdata(ss, (SculptVertRef){.i = (intptr_t)l2->v});
 
       if (l2->v == v) {
-        copy_v3_v3(fakev->co,origco);
-        copy_v3_v3(fakev->no,origno);
-        add_v3_v3(no,origno);
-      } else {
-        add_v3_v3(no,l2->v->no);
+        copy_v3_v3(fakev->co, origco);
+        copy_v3_v3(fakev->no, origno);
+        add_v3_v3(no, origno);
+      }
+      else {
+        add_v3_v3(no, l2->v->no);
       }
 
       fakel++;
@@ -302,7 +303,7 @@ void SCULPT_reproject_cdata(SculptSession *ss,
     // copy_v3_v3(fakef->no, no);
 
     // interpolate
-    BMLoop _interpl,*interpl = &_interpl;
+    BMLoop _interpl, *interpl = &_interpl;
 
     MSculptVert saved = *mv;
 
@@ -310,11 +311,11 @@ void SCULPT_reproject_cdata(SculptSession *ss,
     interpl->head.data = blocks[i];
     // memcpy(interpl->head.data, l2->head.data, ldata->totsize);
 
-    BM_loop_interp_from_face(ss->bm,interpl,fakef,false,false);
+    BM_loop_interp_from_face(ss->bm, interpl, fakef, false, false);
 
     *mv = saved;
 
-    CustomData_bmesh_copy_data(&ss->bm->ldata,&ss->bm->ldata,interpl->head.data,&l->head.data);
+    CustomData_bmesh_copy_data(&ss->bm->ldata, &ss->bm->ldata, interpl->head.data, &l->head.data);
   }
 
   BLI_array_free(ls);
@@ -332,9 +333,9 @@ MINLINE float safe_shell_angle_to_dist(const float angle)
 }
 
 void SCULPT_neighbor_coords_average_interior(SculptSession *ss,
-  float result[3],
-  SculptVertRef vertex,
-  SculptSmoothArgs *args)
+                                             float result[3],
+                                             SculptVertRef vertex,
+                                             SculptSmoothArgs *args)
 {
   if (args->do_origco) {
     // copy_v3_v3(result, SCULPT_vertex_co_get(ss, vertex));
@@ -349,13 +350,13 @@ void SCULPT_neighbor_coords_average_interior(SculptSession *ss,
   bool do_origco = args->do_origco;
   SculptCustomLayer *bound_scl = args->bound_scl;
 
-  MSculptVert *mv = SCULPT_vertex_get_mdyntopo(ss,vertex);
+  MSculptVert *mv = SCULPT_vertex_get_mdyntopo(ss, vertex);
 
-  float bound1[3],bound2[3];
+  float bound1[3], bound2[3];
   int totbound = 0;
 
   if (do_origco) {
-    SCULPT_vertex_check_origdata(ss,vertex);
+    SCULPT_vertex_check_origdata(ss, vertex);
   }
 
   float total = 0.0f;
@@ -364,30 +365,31 @@ void SCULPT_neighbor_coords_average_interior(SculptSession *ss,
 
   int bflag = SCULPT_BOUNDARY_MESH | SCULPT_BOUNDARY_SHARP;
 
-  slide_fset = MAX2(slide_fset,bound_smooth);
+  slide_fset = MAX2(slide_fset, bound_smooth);
 
   if (check_fsets) {
     bflag |= SCULPT_BOUNDARY_FACE_SET | SCULPT_BOUNDARY_SEAM;
   }
 
-  const SculptBoundaryType is_boundary = SCULPT_vertex_is_boundary(ss,vertex,bflag);
+  const SculptBoundaryType is_boundary = SCULPT_vertex_is_boundary(ss, vertex, bflag);
 
-  const float *co = do_origco ? mv->origco : SCULPT_vertex_co_get(ss,vertex);
+  const float *co = do_origco ? mv->origco : SCULPT_vertex_co_get(ss, vertex);
   float no[3];
 
   PBVH_CHECK_NAN(co);
 
   if (true || proj

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list