[Bf-blender-cvs] [19f27cf3e96] master: RNA: remove Mesh.update() calc_loop_triangles argument

Campbell Barton noreply at git.blender.org
Sun Aug 25 09:03:04 CEST 2019


Commit: 19f27cf3e964ed7db3879b73ffdd1b2971060aa8
Author: Campbell Barton
Date:   Sun Aug 25 12:38:10 2019 +1000
Branches: master
https://developer.blender.org/rB19f27cf3e964ed7db3879b73ffdd1b2971060aa8

RNA: remove Mesh.update() calc_loop_triangles argument

This calculated tessfaces, not loop-triangles.

Remove this since they aren't accessible from RNA anymore.

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

M	source/blender/editors/include/ED_mesh.h
M	source/blender/editors/mesh/mesh_data.c
M	source/blender/makesrna/intern/rna_mesh_api.c

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

diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 5ebba4e5d25..9e5ea4e1e32 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -368,11 +368,7 @@ void ED_mesh_edges_remove(struct Mesh *mesh, struct ReportList *reports, int cou
 void ED_mesh_vertices_remove(struct Mesh *mesh, struct ReportList *reports, int count);
 
 void ED_mesh_calc_tessface(struct Mesh *mesh, bool free_mpoly);
-void ED_mesh_update(struct Mesh *mesh,
-                    struct bContext *C,
-                    bool calc_edges,
-                    bool calc_edges_loose,
-                    bool calc_tessface);
+void ED_mesh_update(struct Mesh *mesh, struct bContext *C, bool calc_edges, bool calc_edges_loose);
 
 void ED_mesh_uv_texture_ensure(struct Mesh *me, const char *name);
 int ED_mesh_uv_texture_add(struct Mesh *me,
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index ee8de9d8ea9..63249544e1c 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -885,18 +885,8 @@ void MESH_OT_customdata_custom_splitnormals_clear(wmOperatorType *ot)
 
 /************************** Add Geometry Layers *************************/
 
-void ED_mesh_update(
-    Mesh *mesh, bContext *C, bool calc_edges, bool calc_edges_loose, bool calc_tessface)
+void ED_mesh_update(Mesh *mesh, bContext *C, bool calc_edges, bool calc_edges_loose)
 {
-  bool tessface_input = false;
-
-  if (mesh->totface > 0 && mesh->totpoly == 0) {
-    BKE_mesh_convert_mfaces_to_mpolys(mesh);
-
-    /* would only be converting back again, don't bother */
-    tessface_input = true;
-  }
-
   if (calc_edges_loose && mesh->totedge) {
     BKE_mesh_calc_edges_loose(mesh);
   }
@@ -905,15 +895,8 @@ void ED_mesh_update(
     BKE_mesh_calc_edges(mesh, calc_edges, true);
   }
 
-  if (calc_tessface) {
-    if (tessface_input == false) {
-      BKE_mesh_tessface_calc(mesh);
-    }
-  }
-  else {
-    /* default state is not to have tessface's so make sure this is the case */
-    BKE_mesh_tessface_clear(mesh);
-  }
+  /* Default state is not to have tessface's so make sure this is the case. */
+  BKE_mesh_tessface_clear(mesh);
 
   BKE_mesh_calc_normals(mesh);
 
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 283590fc529..0b3a7802082 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -311,11 +311,6 @@ void RNA_api_mesh(StructRNA *srna)
                   0,
                   "Calculate Loose Edges",
                   "Calculate the loose state of each edge");
-  RNA_def_boolean(func,
-                  "calc_loop_triangles",
-                  0,
-                  "Calculate Triangules",
-                  "Force recalculation of triangle tessellation");
   RNA_def_function_flag(func, FUNC_USE_CONTEXT);
 
   RNA_def_function(srna, "update_gpu_tag", "rna_Mesh_update_gpu_tag");



More information about the Bf-blender-cvs mailing list