From 013750947657fcdea313782d82ec51cc111f0c06 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 12 Sep 2019 12:24:24 +0200 Subject: Fix T69789: Assert when create a new Full Copy scene base on 2D template. Private ID data (nodetrees and scene collections...) need special care and handling of their copy flags, and checks must be adapted too. In that case, issue came from the fact that even though those IDs have to be copied outside of bmain, we may still require usercount handling. That commit also fixes a somewhat related issue - we cannot use the non-id private data copying flag for private IDs copying, due to difference in handling of usercount again. --- source/blender/blenkernel/intern/light.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/light.c') diff --git a/source/blender/blenkernel/intern/light.c b/source/blender/blenkernel/intern/light.c index 05fcba5c30d..ea728f61733 100644 --- a/source/blender/blenkernel/intern/light.c +++ b/source/blender/blenkernel/intern/light.c @@ -78,10 +78,8 @@ Light *BKE_light_add(Main *bmain, const char *name) */ void BKE_light_copy_data(Main *bmain, Light *la_dst, const Light *la_src, const int flag) { - /* We never handle usercount here for own data. */ - const int flag_subdata = flag | LIB_ID_CREATE_NO_USER_REFCOUNT; /* We always need allocation of our private ID data. */ - const int flag_private_id_data = flag_subdata & ~LIB_ID_CREATE_NO_ALLOCATE; + const int flag_private_id_data = flag & ~LIB_ID_CREATE_NO_ALLOCATE; la_dst->curfalloff = BKE_curvemapping_copy(la_src->curfalloff); -- cgit v1.2.3