[Bf-blender-cvs] [3190eaf1094] master: Fix T51774: Children particles hair interpolation not correct with textures or dp.

Bastien Montagne noreply at git.blender.org
Mon Jun 19 00:05:18 CEST 2017


Commit: 3190eaf10942c2ce9e5102f209902c8bad674fe9
Author: Bastien Montagne
Date:   Sun Jun 18 23:54:52 2017 +0200
Branches: master
https://developer.blender.org/rB3190eaf10942c2ce9e5102f209902c8bad674fe9

Fix T51774: Children particles hair interpolation not correct with textures or dp.

Children where always getting at least one segment of fixed length...

Now fully hidden ones (zero length) get no segment at all.

Note that even very short ones keep getting one 'unit' length segment - would
rather avoid changing that at this point, given how complex children
particles 'length' can get with all kind of modifiers... Think we can
live with that for now anyway.

===================================================================

M	source/blender/blenkernel/intern/particle_child.c

===================================================================

diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c
index 842de869291..bfcda89a635 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -355,9 +355,13 @@ void psys_apply_child_modifiers(ParticleThreadContext *ctx, struct ListBase *mod
 
 	{
 		const float step_length = 1.0f / (float)(totkeys - 1);
-		
 		float cur_length = 0.0f;
-		
+
+		if (max_length <= 0.0f) {
+			keys->segments = -1;
+			totkeys = 0;
+		}
+
 		/* we have to correct velocity because of kink & clump */
 		for (k = 0, key = keys; k < totkeys; ++k, ++key) {
 			if (k >= 2) {




More information about the Bf-blender-cvs mailing list