[Bf-blender-cvs] [7d520f6] alembic: Fix for stupid particle times.

Lukas Tönne noreply at git.blender.org
Sat Apr 11 12:46:36 CEST 2015


Commit: 7d520f64a6a5e2ee19fd1ab8918b430fa1203dee
Author: Lukas Tönne
Date:   Sat Apr 11 12:38:23 2015 +0200
Branches: alembic
https://developer.blender.org/rB7d520f64a6a5e2ee19fd1ab8918b430fa1203dee

Fix for stupid particle times.

Normalize particle 'time' values to 0..1 range when writing to cache,
anything else is useless.

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

M	source/blender/pointcache/alembic/abc_particles.cpp

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

diff --git a/source/blender/pointcache/alembic/abc_particles.cpp b/source/blender/pointcache/alembic/abc_particles.cpp
index 68bc4a0..3fa1d40 100644
--- a/source/blender/pointcache/alembic/abc_particles.cpp
+++ b/source/blender/pointcache/alembic/abc_particles.cpp
@@ -341,7 +341,8 @@ static void hair_create_sample(Object *ob, DerivedMesh *dm, ParticleSystem *psys
 			mul_v3_m4v3(co, hairmat, key->co);
 			
 			sample.positions.push_back(V3f(co[0], co[1], co[2]));
-			sample.times.push_back(key->time);
+			/* XXX particle times are in 0..100, normalize to 0..1 range */
+			sample.times.push_back(key->time * 0.01f);
 			sample.weights.push_back(key->weight);
 		}
 	}




More information about the Bf-blender-cvs mailing list