Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/editors/mesh/bmesh_tools.c3
-rw-r--r--source/blender/editors/mesh/bmesh_utils.c7
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c4
5 files changed, 17 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 981f9cedcfd..5d21b36710c 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3703,7 +3703,11 @@ static void lib_link_mesh(FileData *fd, Main *main)
* waiting until edit mode has been entered/exited, making it easier
* to recognize problems that would otherwise only show up after edits).
*/
+#ifdef USE_TESSFACE_DEFAULT
BKE_mesh_tessface_calc(me);
+#else
+ BKE_mesh_tessface_clear(me);
+#endif
me->id.flag -= LIB_NEEDLINK;
}
diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c
index f97a8e1b9a9..4f7fab75f7e 100644
--- a/source/blender/editors/mesh/bmesh_tools.c
+++ b/source/blender/editors/mesh/bmesh_tools.c
@@ -3262,7 +3262,8 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO
EDBM_CallOpf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_VERTS);
BM_mesh_normals_update(bmnew);
- BMO_op_callf(bmnew, "bmesh_to_mesh mesh=%p object=%p", basenew->object->data, basenew->object);
+ BMO_op_callf(bmnew, "bmesh_to_mesh mesh=%p object=%p notesselation=%i",
+ basenew->object->data, basenew->object, TRUE);
BM_mesh_free(bmnew);
((Mesh *)basenew->object->data)->edit_btmesh = NULL;
diff --git a/source/blender/editors/mesh/bmesh_utils.c b/source/blender/editors/mesh/bmesh_utils.c
index 29404a6e46a..92011b46815 100644
--- a/source/blender/editors/mesh/bmesh_utils.c
+++ b/source/blender/editors/mesh/bmesh_utils.c
@@ -296,6 +296,11 @@ void EDBM_LoadEditBMesh(Scene *scene, Object *ob)
BMesh *bm = me->edit_btmesh->bm;
BMO_op_callf(bm, "object_load_bmesh scene=%p object=%p", scene, ob);
+
+#ifdef USE_TESSFACE_DEFAULT
+ BKE_mesh_tessface_calc(me);
+#endif
+
}
void EDBM_FreeEditBMesh(BMEditMesh *tm)
@@ -520,7 +525,7 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata)
#endif
- BMO_op_callf(em->bm, "bmesh_to_mesh mesh=%p notesselation=%i", &um->me, 1);
+ BMO_op_callf(em->bm, "bmesh_to_mesh mesh=%p notesselation=%i", &um->me, TRUE);
um->selectmode = em->selectmode;
return um;
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index ae9a68fac18..290defaec0c 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -229,4 +229,7 @@ typedef struct TFace {
#define USE_BMESH_SAVE_WITHOUT_MFACE
+/* enable this so meshes get tessfaces calculated by default */
+// #define USE_TESSFACE_DEFAULT
+
#endif
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 4f5fc2a59ce..7cb1fc4a9ff 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -2074,7 +2074,7 @@ static void rna_def_mesh_polygons(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
FunctionRNA *func;
- PropertyRNA *parm;
+ //PropertyRNA *parm;
RNA_def_property_srna(cprop, "MeshPolygons");
srna= RNA_def_struct(brna, "MeshPolygons", NULL);
@@ -2087,7 +2087,7 @@ static void rna_def_mesh_polygons(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "add", "ED_mesh_polys_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of polygons to add", 0, INT_MAX);
+ RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of polygons to add", 0, INT_MAX);
}