From 7a6d7d056bee4336e891b83b7bba8ab41de36ebf Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 8 Aug 2018 11:54:58 +0200 Subject: Fix T56273: User count assert on re-saving a particular file. new background image/clip of Camera ID was totally wrong, down the old, broken 'way it used to be' instead of using new, more generic system. Those ID pointers were not even added to library_query.c file, shame! xD --- source/blender/blenkernel/intern/camera.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'source/blender/blenkernel/intern/camera.c') diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c index 1b5995de4f0..07b0e3b782e 100644 --- a/source/blender/blenkernel/intern/camera.c +++ b/source/blender/blenkernel/intern/camera.c @@ -108,16 +108,6 @@ void *BKE_camera_add(Main *bmain, const char *name) void BKE_camera_copy_data(Main *UNUSED(bmain), Camera *cam_dst, const Camera *cam_src, const int flag) { BLI_duplicatelist(&cam_dst->bg_images, &cam_src->bg_images); - if ((flag & LIB_ID_CREATE_NO_USER_REFCOUNT) == 0) { - for (CameraBGImage *bgpic = cam_dst->bg_images.first; bgpic; bgpic = bgpic->next) { - if (bgpic->source == CAM_BGIMG_SOURCE_IMAGE) { - id_us_plus((ID *)bgpic->ima); - } - else if (bgpic->source == CAM_BGIMG_SOURCE_MOVIE) { - id_us_plus((ID *)bgpic->clip); - } - } - } } Camera *BKE_camera_copy(Main *bmain, const Camera *cam) @@ -135,14 +125,6 @@ void BKE_camera_make_local(Main *bmain, Camera *cam, const bool lib_local) /** Free (or release) any data used by this camera (does not free the camera itself). */ void BKE_camera_free(Camera *ca) { - for (CameraBGImage *bgpic = ca->bg_images.first; bgpic; bgpic = bgpic->next) { - if (bgpic->source == CAM_BGIMG_SOURCE_IMAGE) { - id_us_min((ID *)bgpic->ima); - } - else if (bgpic->source == CAM_BGIMG_SOURCE_MOVIE) { - id_us_min((ID *)bgpic->clip); - } - } BLI_freelistN(&ca->bg_images); BKE_animdata_free((ID *)ca, false); -- cgit v1.2.3