diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
commit | b9898ebde44d6584ea37a05aaeca8760d31ccc7b (patch) | |
tree | e6dfc796cc82b4b8b8c248c4ff29d2e2047ff84c /source/blender/blenkernel/intern/particle_child.c | |
parent | b17380971a144896b34b7863a82bbda3ff68a39f (diff) | |
parent | 553b581f25c1782c4231816965cd3f6ce58a449a (diff) |
Merge branch 'master' into filebrowser_redesign
Diffstat (limited to 'source/blender/blenkernel/intern/particle_child.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_child.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c index b74fd3ff684..3b02e010e7f 100644 --- a/source/blender/blenkernel/intern/particle_child.c +++ b/source/blender/blenkernel/intern/particle_child.c @@ -597,7 +597,8 @@ static float do_clump_level(float result[3], float clump = 0.0f; if (clumpcurve) { - clump = pa_clump * (1.0f - clamp_f(curvemapping_evaluateF(clumpcurve, 0, time), 0.0f, 1.0f)); + clump = pa_clump * + (1.0f - clamp_f(BKE_curvemapping_evaluateF(clumpcurve, 0, time), 0.0f, 1.0f)); interp_v3_v3v3(result, co, par_co, clump); } @@ -714,7 +715,7 @@ static void do_rough_curve(const float loc[3], return; } - fac *= clamp_f(curvemapping_evaluateF(roughcurve, 0, time), 0.0f, 1.0f); + fac *= clamp_f(BKE_curvemapping_evaluateF(roughcurve, 0, time), 0.0f, 1.0f); copy_v3_v3(rco, loc); mul_v3_fl(rco, time); @@ -749,15 +750,15 @@ static void twist_get_axis(const ParticleChildModifierContext *modifier_ctx, } } -static float curvemapping_integrate_clamped(CurveMapping *curve, - float start, - float end, - float step) +static float BKE_curvemapping_integrate_clamped(CurveMapping *curve, + float start, + float end, + float step) { float integral = 0.0f; float x = start; while (x < end) { - float y = curvemapping_evaluateF(curve, 0, x); + float y = BKE_curvemapping_evaluateF(curve, 0, x); y = clamp_f(y, 0.0f, 1.0f); /* TODO(sergey): Clamp last step to end. */ integral += y * step; @@ -804,7 +805,7 @@ static void do_twist(const ParticleChildModifierContext *modifier_ctx, } if (twist_curve != NULL) { const int num_segments = twist_num_segments(modifier_ctx); - angle *= curvemapping_integrate_clamped(twist_curve, 0.0f, time, 1.0f / num_segments); + angle *= BKE_curvemapping_integrate_clamped(twist_curve, 0.0f, time, 1.0f / num_segments); } else { angle *= time; |