[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13653] trunk/blender/source/blender/ blenkernel/intern: Fix for bug: [#8247] Hairs that are added in particle mode act and render unpredictably when soft body is activated
Janne Karhu
jhkarh at utu.fi
Tue Feb 12 14:38:18 CET 2008
Revision: 13653
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13653
Author: jhk
Date: 2008-02-12 14:38:07 +0100 (Tue, 12 Feb 2008)
Log Message:
-----------
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
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/particle.c
trunk/blender/source/blender/blenkernel/intern/softbody.c
Modified: trunk/blender/source/blender/blenkernel/intern/particle.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle.c 2008-02-12 12:02:39 UTC (rev 13652)
+++ trunk/blender/source/blender/blenkernel/intern/particle.c 2008-02-12 13:38:07 UTC (rev 13653)
@@ -2417,7 +2417,7 @@
if(soft) {
if(hkey[1] != pa->hair + pa->totkey - 1)
- bp_to_particle(keys + 3, bp[1], hkey[1] + 1);
+ bp_to_particle(keys + 3, bp[1] + 1, hkey[1] + 1);
else
bp_to_particle(keys + 3, bp[1], hkey[1]);
}
Modified: trunk/blender/source/blender/blenkernel/intern/softbody.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/softbody.c 2008-02-12 12:02:39 UTC (rev 13652)
+++ trunk/blender/source/blender/blenkernel/intern/softbody.c 2008-02-12 13:38:07 UTC (rev 13653)
@@ -3599,9 +3599,10 @@
/* 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;
More information about the Bf-blender-cvs
mailing list