[Bf-blender-cvs] [c761b51] gooseberry: Omit hair path lengths for anything but the first sample.
Lukas Tönne
noreply at git.blender.org
Mon Mar 23 13:03:06 CET 2015
Commit: c761b512d4a09c986f4d5e632dd092a018d2c392
Author: Lukas Tönne
Date: Mon Mar 9 17:40:50 2015 +0100
Branches: gooseberry
https://developer.blender.org/rBc761b512d4a09c986f4d5e632dd092a018d2c392
Omit hair path lengths for anything but the first sample.
We can safely assume that paths don't change their lengths. This might
safe some cache space.
===================================================================
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 5b5aae9..570d083 100644
--- a/source/blender/pointcache/alembic/abc_particles.cpp
+++ b/source/blender/pointcache/alembic/abc_particles.cpp
@@ -358,16 +358,16 @@ void AbcParticlePathcacheWriter::write_sample()
OFloatGeomParam::Sample times = paths_create_sample_times(*m_pathcache, *m_totpath, totkeys, times_buffer);
OCurvesSchema::Sample sample;
-// if (schema.getNumSamples() == 0) {
+ if (schema.getNumSamples() == 0) {
/* write curve sizes only first time, assuming they are constant! */
std::vector<int32_t> nvertices_buffer;
Int32ArraySample nvertices = paths_create_sample_nvertices(*m_pathcache, *m_totpath, nvertices_buffer);
sample = OCurvesSchema::Sample(positions, nvertices);
-// }
-// else {
-// sample = OCurvesSchema::Sample(positions);
-// }
+ }
+ else {
+ sample = OCurvesSchema::Sample(positions);
+ }
schema.set(sample);
More information about the Bf-blender-cvs
mailing list