[Bf-blender-cvs] [138c65c] temp_hair_modifiers: Update the world space location of final hair keys after applying modifiers.
Lukas Tönne
noreply at git.blender.org
Mon Feb 9 14:25:25 CET 2015
Commit: 138c65cc2ea053b1f33a181dd054ef0b1e82b88a
Author: Lukas Tönne
Date: Mon Feb 2 16:56:30 2015 +0100
Branches: temp_hair_modifiers
https://developer.blender.org/rB138c65cc2ea053b1f33a181dd054ef0b1e82b88a
Update the world space location of final hair keys after applying
modifiers.
===================================================================
M source/blender/blenkernel/intern/particle_system.c
===================================================================
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 11e696a..d87a58e 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -2928,6 +2928,21 @@ static void psys_hair_calc_final(ParticleSimulationData *sim)
if (shapekey_data)
MEM_freeN(shapekey_data);
}
+
+ /* update world space location */
+ {
+ for (p = 0, pa = psys->particles; p < psys->totpart; ++p, ++pa) {
+ HairKey *key;
+ int k;
+ float hairmat[4][4];
+
+ psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat);
+
+ for (k = 0, key = pa->hair_final; k < pa->totkey_final; ++k, ++key) {
+ mul_v3_m4v3(key->world_co, hairmat, key->co);
+ }
+ }
+ }
}
static bool psys_needs_path_cache(ParticleSimulationData *sim)
More information about the Bf-blender-cvs
mailing list