From c86d55d5e77674982a5d1760d8b895bb87af44f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Fri, 9 Jan 2015 14:24:19 +0100 Subject: Curve-based control for child path tapering. This is an alternative method to the current fixed function with a clump factor and "shape" parameter. This function is quite limited and does not give the desired result in many cases (e.g. long, parallel rasta strands are problematic). So rather than trying to add more parameters there is now a fully user-defined optional curve for setting the tapering shape. --- source/blender/blenloader/intern/readfile.c | 4 ++++ source/blender/blenloader/intern/writefile.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 3b2179e9c47..10bdfbd70e7 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3816,6 +3816,10 @@ static void direct_link_particlesettings(FileData *fd, ParticleSettings *part) direct_link_partdeflect(part->pd); direct_link_partdeflect(part->pd2); + part->clumpcurve = newdataadr(fd, part->clumpcurve); + if (part->clumpcurve) + direct_link_curvemapping(fd, part->clumpcurve); + part->effector_weights = newdataadr(fd, part->effector_weights); if (!part->effector_weights) part->effector_weights = BKE_add_effector_weights(part->eff_group); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index adb37aaab71..81f4c16cea1 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1108,6 +1108,9 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase) writestruct(wd, DATA, "PartDeflect", 1, part->pd2); writestruct(wd, DATA, "EffectorWeights", 1, part->effector_weights); + if (part->clumpcurve) + write_curvemapping(wd, part->clumpcurve); + dw = part->dupliweights.first; for (; dw; dw=dw->next) { /* update indices */ -- cgit v1.2.3