Fix T46392: Navmesh generator error.

We now have to explicitely enure tesselation of DMs when we need it.

Notes: Maybe we could use looptris here as well?

Not a regression (bug already present in 2.75, but not 2.74), nice to backport to 2.76 nontheless.
This commit is contained in:
Bastien Montagne
2015-10-06 15:58:45 +02:00
parent 8471362987
commit dded01aa52

View File

@@ -84,6 +84,7 @@ static void createVertsTrisData(bContext *C, LinkNode *obs,
for (oblink = obs; oblink; oblink = oblink->next) {
ob = (Object *) oblink->link;
dm = mesh_create_derived_no_virtual(scene, ob, NULL, CD_MASK_MESH);
DM_ensure_tessface(dm);
BLI_linklist_prepend(&dms, dm);
nverts += dm->getNumVerts(dm);