Cleanup: remove BMeshToMeshParams.calc_tessface
authorCampbell Barton <ideasman42@gmail.com>
Mon, 19 Feb 2018 06:41:37 +0000 (17:41 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 19 Feb 2018 06:41:37 +0000 (17:41 +1100)
This wasn't used, tessface is being phased out.
Caller can run explicitly if needed.

source/blender/bmesh/intern/bmesh_mesh_conv.c
source/blender/bmesh/intern/bmesh_mesh_conv.h
source/blender/bmesh/intern/bmesh_opdefines.c
source/blender/bmesh/operators/bmo_mesh_conv.c

index 4b86ac03d7f577bd5cba614844ff684d68c6ff91..474b4656a6826b2bd1c9be9e7a17199fbfb95b31 100644 (file)
@@ -808,11 +808,7 @@ void BM_mesh_bm_to_me(
                if (vertMap) MEM_freeN(vertMap);
        }
 
-       if (params->calc_tessface) {
-               BKE_mesh_tessface_calc(me);
-       }
-
-       BKE_mesh_update_customdata_pointers(me, params->calc_tessface);
+       BKE_mesh_update_customdata_pointers(me, false);
 
        {
                BMEditSelection *selected;
index e6072f7b5f29eeb3b98e6064de1c9ceac5adb7ed..6e9d62349ea283e6bd0398f4d5a2f578daee580c 100644 (file)
@@ -55,7 +55,6 @@ void BM_mesh_bm_from_me(
 ATTR_NONNULL(1, 3);
 
 struct BMeshToMeshParams {
-       uint calc_tessface : 1;
        /** Update object hook indices & vertex parents. */
        uint calc_object_remap : 1;
        int64_t cd_mask_extra;
index 8e0e905cf883e567c2d713fefd9d3af66af52a66..4847ae4be4209fb45fcf07c161a14715e598c854 100644 (file)
@@ -843,7 +843,6 @@ static BMOpDefine bmo_bmesh_to_mesh_def = {
         {"mesh", BMO_OP_SLOT_PTR, {(int)BMO_OP_SLOT_SUBTYPE_PTR_MESH}},
        /* pointer to an object structure */
         {"object", BMO_OP_SLOT_PTR, {(int)BMO_OP_SLOT_SUBTYPE_PTR_OBJECT}},
-        {"skip_tessface", BMO_OP_SLOT_BOOL},  /* don't calculate mfaces */
         {{'\0'}},
        },
        {{{'\0'}}},  /* no output */
index 981930705b3681c22c61d36bc526fbdcd4ab7307..7311ed5ce64f283539dba92db8a65e98d56a55b0 100644 (file)
@@ -62,20 +62,18 @@ void bmo_object_load_bmesh_exec(BMesh *bm, BMOperator *op)
        Mesh *me = ob->data;
 
        BMO_op_callf(bm, op->flag,
-                    "bmesh_to_mesh mesh=%p object=%p skip_tessface=%b",
-                    me, ob, true);
+                    "bmesh_to_mesh mesh=%p object=%p",
+                    me, ob);
 }
 
 void bmo_bmesh_to_mesh_exec(BMesh *bm, BMOperator *op)
 {
        Mesh *me = BMO_slot_ptr_get(op->slots_in, "mesh");
        /* Object *ob = BMO_slot_ptr_get(op, "object"); */
-       const bool dotess = !BMO_slot_bool_get(op->slots_in, "skip_tessface");
 
        BM_mesh_bm_to_me(
                bm, me,
                (&(struct BMeshToMeshParams){
-                   .calc_tessface = dotess,
                    .calc_object_remap = true,
                }));
 }