Fix T53291: Deleting objects do not delete them from the blend file
authorDalai Felinto <dfelinto@gmail.com>
Mon, 27 Nov 2017 16:33:31 +0000 (14:33 -0200)
committerDalai Felinto <dfelinto@gmail.com>
Mon, 27 Nov 2017 16:52:21 +0000 (14:52 -0200)
commit91034646c7c93e77c2ffda5e67e5ee0b23207fc9
tree29dd1e9260dca517ded408a12d648d4e8f47568f
parent14c3ef8253290da8f4fbb2e1c1ffeaffadd9f83a
Fix T53291: Deleting objects do not delete them from the blend file

User count was wrong for newly created files. We increase/decrease user count
when we link/delete objects from a SceneCollection.

So we don't want to leave user count of 1 after calling BKE_libblock_alloc in
BKE_object_add_only_object().
source/blender/blenkernel/intern/object.c
source/blender/makesrna/intern/rna_main_api.c