diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-31 16:29:41 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-31 16:29:41 +0400 |
commit | ce8f3b4afabb4f0ba11025399eddda07f9f238c5 (patch) | |
tree | 4bb1c8820d7297e0095611a85fe7713ba78a3c1b /source/blender/modifiers | |
parent | 6904d9727e73ddaea5af6f8ecc007b9dac2504f5 (diff) |
Small array modifier performance improvement.
Transform vertices directly rather than using BMOp.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 84b5d7deb6f..d552e73bc32 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -413,6 +413,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMVert *v, *v2, *v3; BMOpSlot *geom_slot; BMOpSlot *newout_slot; + BMOIter oiter; if (j != 0) BMO_op_initf(em->bm, &dupe_op, "dupe geom=%s", &old_dupe_op, "newout"); @@ -430,7 +431,10 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, memcpy(first_geom, geom_slot->data.buf, first_geom_bytes); } - BMO_op_callf(em->bm, "transform mat=%m4 verts=%s", offset, &dupe_op, "newout"); + /* apply transformation matrix */ + BMO_ITER(v, &oiter, em->bm, &dupe_op, "newout", BM_VERT) { + mul_m4_v3(offset, v->co); + } if (amd->flags & MOD_ARR_MERGE) { /*calculate merge mapping*/ |