diff options
author | Janne Karhu <jhkarh@gmail.com> | 2008-02-12 16:38:07 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2008-02-12 16:38:07 +0300 |
commit | c371346601276d9ae72ace5f4a877b42107bea78 (patch) | |
tree | faee4ca452c9fad1873e55b755dea328731e0133 /source/blender/blenkernel/intern/softbody.c | |
parent | a21c765f4b8eeab488bf6d913037e52735a41ce1 (diff) |
Fix for bug: [#8247] Hairs that are added in particle mode act and render unpredictably when soft body is activated
-softbody BodyPoint indexes were created with a lag of one leading to use of wrong softbody points for particles when creating path cache
-interpolation points for softbody hair weren't chosen optimally when not yet at the end of a hair
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 6c343c7c242..7ee33195dd3 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -3599,9 +3599,10 @@ static void particles_to_softbody(Object *ob) /* renew ends with ob->soft with points and edges, also checks & makes ob->soft */ renew_softbody(ob, totpoint, totedge); + /* find first BodyPoint index for each particle */ psys->particles->bpi = 0; for(a=1, pa=psys->particles+1; a<psys->totpart; a++, pa++) - pa->bpi = (pa-1)->bpi + pa->totkey; + pa->bpi = (pa-1)->bpi + (pa-1)->totkey; /* we always make body points */ sb= ob->soft; |