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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-01-19 15:32:53 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:32 +0300
commit8ac20d1dee6f0a7f9781a0b1270db5104fce2064 (patch)
tree265de2045f954898d400c4240bf4fe14c8528e19 /source/blender/blenkernel/intern/particle_child.c
parent1a918cb66e45d2bfa1ac2153c08f81b09429695a (diff)
Use separate flags to enable/disable clump and roughness curves for
child hairs. This allows disabling the curves temporarily without losing the setup. Conflicts: source/blender/blenkernel/BKE_blender.h
Diffstat (limited to 'source/blender/blenkernel/intern/particle_child.c')
-rw-r--r--source/blender/blenkernel/intern/particle_child.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c
index fb877e44eb6..df03f39f62a 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -661,6 +661,8 @@ void do_child_modifiers(ParticleSimulationData *sim, ParticleTexture *ptex, cons
ChildParticle *cpa, const float orco[3], float mat[4][4], ParticleKey *state, float t)
{
ParticleSettings *part = sim->psys->part;
+ CurveMapping *clumpcurve = (part->child_flag & PART_CHILD_USE_CLUMP_CURVE) ? part->clumpcurve : NULL;
+ CurveMapping *roughcurve = (part->child_flag & PART_CHILD_USE_ROUGH_CURVE) ? part->roughcurve : NULL;
int i = cpa - sim->psys->child;
int guided = 0;
@@ -690,7 +692,7 @@ void do_child_modifiers(ParticleSimulationData *sim, ParticleTexture *ptex, cons
sub_v3_v3v3(orco_offset, orco, par_orco);
clump = do_clump(state, par_co, t, orco_offset, part->clumpfac, part->clumppow, ptex ? ptex->clump : 1.f,
- part->child_flag & PART_CHILD_USE_CLUMP_NOISE, part->clump_noise_size, part->clumpcurve);
+ part->child_flag & PART_CHILD_USE_CLUMP_NOISE, part->clump_noise_size, clumpcurve);
if (kink_freq != 0.f) {
kink_amp *= (1.f - kink_amp_clump * clump);
@@ -702,7 +704,7 @@ void do_child_modifiers(ParticleSimulationData *sim, ParticleTexture *ptex, cons
}
if (part->roughcurve) {
- do_rough_curve(orco, mat, t, rough1, part->rough1_size, part->roughcurve, state);
+ do_rough_curve(orco, mat, t, rough1, part->rough1_size, roughcurve, state);
}
else {
if (rough1 > 0.f)