[Bf-blender-cvs] [b23c4e1] temp_merge_gooseberry_hair: Disable the path length check for spiral kink mode.

Lukas Tönne noreply at git.blender.org
Mon Jan 19 20:51:48 CET 2015


Commit: b23c4e1426d9773acc15f0c8a3737b081feb6ace
Author: Lukas Tönne
Date:   Tue Jan 13 17:59:41 2015 +0100
Branches: temp_merge_gooseberry_hair
https://developer.blender.org/rBb23c4e1426d9773acc15f0c8a3737b081feb6ace

Disable the path length check for spiral kink mode.

This test is terribly expensive for some reason and not necessary for
for the spiral mode 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 ae95b8f..9471274 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -301,6 +301,7 @@ void psys_apply_child_modifiers(ParticleThreadContext *ctx, struct ListBase *mod
 	struct ParticleSettings *part = ctx->sim.psys->part;
 	struct Material *ma = ctx->ma;
 	const bool draw_col_ma = (part->draw_col == PART_DRAW_COL_MAT);
+	const bool use_length_check = !ELEM(part->kink, PART_KINK_SPIRAL);
 	
 	ParticlePathModifier *mod;
 	ParticleCacheKey *key;
@@ -352,7 +353,7 @@ void psys_apply_child_modifiers(ParticleThreadContext *ctx, struct ListBase *mod
 				sub_v3_v3v3(key->vel, key->co, (key-1)->co);
 			}
 			
-			if (k > 1) {
+			if (use_length_check && k > 1) {
 				float dvec[3];
 				/* check if path needs to be cut before actual end of data points */
 				if (!check_path_length(k, keys, key, max_length, step_length, &cur_length, dvec))




More information about the Bf-blender-cvs mailing list