diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-01 07:37:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-01 07:37:20 +0300 |
commit | c851d1d04552e02a64b81216099ee01991f168d7 (patch) | |
tree | c0b038738a979de83332a6b6d07c52c5da106cb8 /source/blender | |
parent | c4b2bef163f39686e1d982231b10fcb5232ad4f3 (diff) |
Missed when updating effects to looptri
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/effect.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 785561d8239..b0b9372b74c 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -542,15 +542,14 @@ int closest_point_on_surface(SurfaceModifierData *surmd, const float co[3], floa } if (surface_vel) { - MFace *mface = CDDM_get_tessface(surmd->dm, nearest.index); + const MLoop *mloop = surmd->bvhtree->loop; + const MLoopTri *lt = &surmd->bvhtree->looptri[nearest.index]; - copy_v3_v3(surface_vel, surmd->v[mface->v1].co); - add_v3_v3(surface_vel, surmd->v[mface->v2].co); - add_v3_v3(surface_vel, surmd->v[mface->v3].co); - if (mface->v4) - add_v3_v3(surface_vel, surmd->v[mface->v4].co); + copy_v3_v3(surface_vel, surmd->v[mloop[lt->tri[0]].v].co); + add_v3_v3(surface_vel, surmd->v[mloop[lt->tri[1]].v].co); + add_v3_v3(surface_vel, surmd->v[mloop[lt->tri[2]].v].co); - mul_v3_fl(surface_vel, mface->v4 ? 0.25f : (1.0f / 3.0f)); + mul_v3_fl(surface_vel, (1.0f / 3.0f)); } return 1; } |