[Bf-blender-cvs] [038b87b8b21] soc-2021-porting-modifiers-to-nodes-extrude-and-move: Cleanup

Fabian Schempp noreply at git.blender.org
Mon Aug 16 07:53:48 CEST 2021


Commit: 038b87b8b21efbb82a6357734de3e0cbd71d210b
Author: Fabian Schempp
Date:   Mon Aug 16 07:53:30 2021 +0200
Branches: soc-2021-porting-modifiers-to-nodes-extrude-and-move
https://developer.blender.org/rB038b87b8b21efbb82a6357734de3e0cbd71d210b

Cleanup

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

M	source/blender/bmesh/operators/bmo_inset.c

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

diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c
index 23d63bbe5ab..4833290aa0b 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -419,9 +419,6 @@ void bmo_inset_individual_exec(BMesh *bm, BMOperator *op)
   BMOIter oiter;
   MemArena *interp_arena = NULL;
 
-  const bool use_attributes = BMO_slot_bool_get(op->slots_in, "use_attributes");
-  const float *thickness_array = BMO_slot_ptr_get(op->slots_in, "thickness_array");
-  const float *depth_array = BMO_slot_ptr_get(op->slots_in, "depth_array");
   const float thickness = BMO_slot_float_get(op->slots_in, "thickness");
   const float depth = BMO_slot_float_get(op->slots_in, "depth");
   const bool use_even_offset = BMO_slot_bool_get(op->slots_in, "use_even_offset");
@@ -436,37 +433,19 @@ void bmo_inset_individual_exec(BMesh *bm, BMOperator *op)
   if (use_interpolate) {
     interp_arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, __func__);
   }
-  int i = 0;
-  if (use_attributes) {
-    BMO_ITER_INDEX (f, &oiter, op->slots_in, "faces", BM_FACE, i) {
-      bmo_face_inset_individual(bm,
-                                f,
-                                interp_arena,
-                                thickness_array[i],
-                                depth_array[i],
-                                use_even_offset,
-                                use_relative_offset,
-                                use_interpolate);
 
-      if (use_interpolate) {
-        BLI_memarena_clear(interp_arena);
-      }
-    }
-  }
-  else {
-    BMO_ITER (f, &oiter, op->slots_in, "faces", BM_FACE) {
-      bmo_face_inset_individual(bm,
-                                f,
-                                interp_arena,
-                                thickness,
-                                depth,
-                                use_even_offset,
-                                use_relative_offset,
-                                use_interpolate);
+  BMO_ITER (f, &oiter, op->slots_in, "faces", BM_FACE) {
+    bmo_face_inset_individual(bm,
+                              f,
+                              interp_arena,
+                              thickness,
+                              depth,
+                              use_even_offset,
+                              use_relative_offset,
+                              use_interpolate);
 
-      if (use_interpolate) {
-        BLI_memarena_clear(interp_arena);
-      }
+    if (use_interpolate) {
+      BLI_memarena_clear(interp_arena);
     }
   }
 
@@ -698,16 +677,12 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
   const bool use_outset = BMO_slot_bool_get(op->slots_in, "use_outset");
   const bool use_boundary = BMO_slot_bool_get(op->slots_in, "use_boundary") &&
                             (use_outset == false);
-
   const bool use_even_offset = BMO_slot_bool_get(op->slots_in, "use_even_offset");
   const bool use_even_boundary = use_even_offset; /* could make own option */
   const bool use_relative_offset = BMO_slot_bool_get(op->slots_in, "use_relative_offset");
   const bool use_edge_rail = BMO_slot_bool_get(op->slots_in, "use_edge_rail");
   const bool use_interpolate = BMO_slot_bool_get(op->slots_in, "use_interpolate");
   const float thickness = BMO_slot_float_get(op->slots_in, "thickness");
-  const bool use_attributes = BMO_slot_bool_get(op->slots_in, "use_attributes");
-  const float *thickness_array = BMO_slot_ptr_get(op->slots_in, "thickness_array");
-  const float *depth_array = BMO_slot_ptr_get(op->slots_in, "depth_array");
   const float depth = BMO_slot_float_get(op->slots_in, "depth");
 #ifdef USE_LOOP_CUSTOMDATA_MERGE
   const bool has_math_ldata = (use_interpolate && CustomData_has_math(&bm->ldata));
@@ -1121,12 +1096,7 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
             }
 
             /* apply the offset */
-            if (use_attributes) {
-              madd_v3_v3fl(v_split->co, tvec, thickness_array[v_split->head.index]);
-            }
-            else {
-              madd_v3_v3fl(v_split->co, tvec, thickness);
-            }
+            madd_v3_v3fl(v_split->co, tvec, thickness);
           }
 
           /* this saves expensive/slow glue check for common cases */



More information about the Bf-blender-cvs mailing list