fix [#35555] Collada: export destroys mesh in some cases

add arguments to calculate normals when converting to bmesh:
  BM_mesh_bm_from_me, DM_to_bmesh

This gives some speedup to undo (which didnt need to re-calculate vertex normals), and array modifier which doesnt need to calculate face normals at all
This commit is contained in:
2013-06-02 23:20:49 +00:00
parent 99b55ef6eb
commit dfad9b0c09
16 changed files with 54 additions and 40 deletions

View File

@@ -228,7 +228,7 @@ static void bm_merge_dm_transform(BMesh *bm, DerivedMesh *dm, float mat[4][4],
/* Add the DerivedMesh's elements to the BMesh. The pre-existing
* elements were already tagged, so the new elements can be
* identified by not having the BM_ELEM_TAG flag set. */
DM_to_bmesh_ex(dm, bm);
DM_to_bmesh_ex(dm, bm, false);
if (amd->flags & MOD_ARR_MERGE) {
/* if merging is enabled, find doubles */
@@ -330,7 +330,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
int UNUSED(initFlags))
{
DerivedMesh *result;
BMesh *bm = DM_to_bmesh(dm);
BMesh *bm = DM_to_bmesh(dm, false);
BMOperator first_dupe_op, dupe_op, old_dupe_op, weld_op;
BMVert **first_geom = NULL;
int i, j;