Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-04-26 16:12:51 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-04-26 16:19:37 +0300
commit20621d46d143c0cc74d79b344e3ad0d1b68b2ec4 (patch)
treec28edb331a6e6337bbafcb797d9dd17a280da9ca /source/blender/blenkernel/intern
parentff1f1157065034e5e7212beb2b9be8173da80dff (diff)
Alembic: fixed refcount issue when duplicating imported objects
Duplicating an imported object didn't increment the cache reader's refcount, whereas removing the duplicate did decrement it. This caused problems.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/constraint.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index c3b209f2333..9bc1ce16284 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -4386,6 +4386,12 @@ static void transformcache_copy(bConstraint *con, bConstraint *srccon)
BLI_strncpy(dst->object_path, src->object_path, sizeof(dst->object_path));
dst->cache_file = src->cache_file;
+
+#ifdef WITH_ALEMBIC
+ if (dst->reader) {
+ CacheReader_incref(dst->reader);
+ }
+#endif
}
static void transformcache_free(bConstraint *con)