[Bf-blender-cvs] [b1bb3f8] alembic_pointcache: Omit hair path lengths for anything but the first sample.
Lukas Tönne
noreply at git.blender.org
Mon Mar 9 17:42:55 CET 2015
Commit: b1bb3f8c82c1557dd20ac88fdab9fb32fe9c2d6a
Author: Lukas Tönne
Date: Mon Mar 9 17:40:50 2015 +0100
Branches: alembic_pointcache
https://developer.blender.org/rBb1bb3f8c82c1557dd20ac88fdab9fb32fe9c2d6a
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