[Bf-blender-cvs] [08e39a5] alembic: Override the init function for DupliObjectReader, so Cycles gets the cache result when constructing render meshes.
Lukas Tönne
noreply at git.blender.org
Wed Apr 1 12:22:31 CEST 2015
Commit: 08e39a5bfb0a4cc5ca81b9b6ca8a9c64be38e97b
Author: Lukas Tönne
Date: Wed Apr 1 12:21:41 2015 +0200
Branches: alembic
https://developer.blender.org/rB08e39a5bfb0a4cc5ca81b9b6ca8a9c64be38e97b
Override the init function for DupliObjectReader, so Cycles gets the
cache result when constructing render meshes.
===================================================================
M source/blender/pointcache/alembic/abc_group.cpp
M source/blender/pointcache/alembic/abc_group.h
===================================================================
diff --git a/source/blender/pointcache/alembic/abc_group.cpp b/source/blender/pointcache/alembic/abc_group.cpp
index 5509a12..98874c1 100644
--- a/source/blender/pointcache/alembic/abc_group.cpp
+++ b/source/blender/pointcache/alembic/abc_group.cpp
@@ -576,6 +576,14 @@ AbcDupliObjectReader::~AbcDupliObjectReader()
{
}
+void AbcDupliObjectReader::init(ReaderArchive *archive)
+{
+ AbcReader::init(archive);
+
+ if (abc_archive()->root().getChildHeader(m_name))
+ m_abc_object = abc_archive()->root().getChild(m_name);
+}
+
void AbcDupliObjectReader::init_abc(IObject object)
{
m_abc_object = object;
diff --git a/source/blender/pointcache/alembic/abc_group.h b/source/blender/pointcache/alembic/abc_group.h
index a2d0338..227897a 100644
--- a/source/blender/pointcache/alembic/abc_group.h
+++ b/source/blender/pointcache/alembic/abc_group.h
@@ -187,6 +187,7 @@ public:
AbcDupliObjectReader(const std::string &name, Object *ob, DupliObjectData *dupli_data);
~AbcDupliObjectReader();
+ void init(ReaderArchive *archive);
void init_abc(Abc::IObject object);
PTCReadSampleResult read_sample(float frame);
More information about the Bf-blender-cvs
mailing list