Fix assert in Alembic tests with constraints

Leave the reader to be created on the CoW object in the depsgraph evaluation,
don't assign the one used for importing to the original object.
This commit is contained in:
2019-07-02 14:34:19 +02:00
parent 2062d649bf
commit 09ea5dfd09
2 changed files with 4 additions and 7 deletions

View File

@@ -263,9 +263,6 @@ void AbcObjectReader::setupObjectTransform(const float time)
data->cache_file = m_settings->cache_file;
id_us_plus(&data->cache_file->id);
data->reader = reinterpret_cast<CacheReader *>(this);
this->incref();
}
}

View File

@@ -100,11 +100,11 @@ void BKE_cachefile_reader_open(CacheFile *cache_file,
void BKE_cachefile_reader_free(CacheFile *cache_file, struct CacheReader **reader)
{
#ifdef WITH_ALEMBIC
if (cache_file) {
BLI_assert(cache_file->id.tag & LIB_TAG_COPIED_ON_WRITE);
}
if (*reader != NULL) {
if (cache_file) {
BLI_assert(cache_file->id.tag & LIB_TAG_COPIED_ON_WRITE);
}
CacheReader_free(*reader);
*reader = NULL;