diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-02 14:51:31 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-02 14:51:31 +0300 |
commit | eaf6345d4b40d08abba9998a0e432a51e0b76787 (patch) | |
tree | 76c9d7c0e69f2af869c26369dd938170352a1cd5 /source | |
parent | 1f8720cf05035f9c6fa0bc54376203b5395fd34e (diff) |
Lattice modifier: take comparison out of loop
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/lattice.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 6039826909b..609c4b95dab 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -885,12 +885,9 @@ void lattice_deform_verts(Object *laOb, Object *target, Mesh *mesh, float weight; if (defgrp_index >= 0 && (me->dvert || mesh)) { - MDeformVert *dvert = me->dvert; + MDeformVert *dvert = mesh ? mesh->dvert : me->dvert; for (a = 0; a < numVerts; a++, dvert++) { - /* TODO(sybren): take out of the loop and move to above assignment of dvert */ - if (mesh) dvert = mesh->dvert + a; - weight = defvert_find_weight(dvert, defgrp_index); if (weight > 0.0f) |