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:
authorCampbell Barton <ideasman42@gmail.com>2012-02-20 04:18:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-20 04:18:35 +0400
commit818e19713a089ffb500201bf3e1c3d8327c75fb9 (patch)
treee8f9ca03165d6fd7599bb6844a099cfe485ac7dc /source/blender/editors
parent40c59b1a3d8497dd77601971aac73d9db9cee187 (diff)
fix [#30266] B-Mesh: Issue with Weight Painting
thanks to Nicholas Bishop for finding the cause of the problem. don't tesselate on load, this means me->mface will be NULL by default. we may need to have this set if existing uses of this array are not resolved before release - so add a define USE_TESSFACE_DEFAULT, to change this easily. this is a rather indirect fix - need to take care here.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/mesh/bmesh_tools.c3
-rw-r--r--source/blender/editors/mesh/bmesh_utils.c7
2 files changed, 8 insertions, 2 deletions
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;