Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-04-21 15:59:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-21 15:59:47 +0400
commitf7717b2e80907a974b472d0ee786f63b06efa40c (patch)
tree5119c2412e2cc902e83e3017adf51367529a6ffa /source/blender/blenkernel/intern/anim.c
parent6a5c03630423714b0a6c18e2c8b8c573c55602f7 (diff)
option to use curve point weights to influence particle effectors.
Diffstat (limited to 'source/blender/blenkernel/intern/anim.c')
-rw-r--r--source/blender/blenkernel/intern/anim.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 10608dc676c..c6120ace850 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -460,6 +460,7 @@ void calc_curvepath(Object *ob)
interp_v3_v3v3(pp->vec, bevp->vec, bevpn->vec, fac2);
pp->vec[3]= fac1*bevp->alfa + fac2*bevpn->alfa;
pp->radius= fac1*bevp->radius + fac2*bevpn->radius;
+ pp->weight= fac1*bevp->weight + fac2*bevpn->weight;
interp_qt_qtqt(pp->quat, bevp->quat, bevpn->quat, fac2);
normalize_qt(pp->quat);
@@ -491,7 +492,7 @@ int interval_test(int min, int max, int p1, int cycl)
* - *vec needs FOUR items!
* - ctime is normalized range <0-1>
*/
-int where_on_path(Object *ob, float ctime, float *vec, float *dir, float *quat, float *radius) /* returns OK */
+int where_on_path(Object *ob, float ctime, float *vec, float *dir, float *quat, float *radius, float *weight) /* returns OK */
{
Curve *cu;
Nurb *nu;
@@ -587,6 +588,9 @@ int where_on_path(Object *ob, float ctime, float *vec, float *dir, float *quat,
if(radius)
*radius= data[0]*p0->radius + data[1]*p1->radius + data[2]*p2->radius + data[3]*p3->radius;
+ if(weight)
+ *weight= data[0]*p0->weight + data[1]*p1->weight + data[2]*p2->weight + data[3]*p3->weight;
+
return 1;
}