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:
authorBastien Montagne <montagne29@wanadoo.fr>2017-05-31 22:24:41 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-05-31 22:24:41 +0300
commit8b0f968a312e4293349c91d1d50621d120b5c899 (patch)
treeb128293d052dcfe7a6f0826afcec630988fb846f /source/blender/blenkernel
parentf783efd1279ae6c0e334e4fa86666e4f1234f85d (diff)
Fix bad handling of 'extra' user for groups at their creation.
Was just keeping the default '1' user from `BKE_libblock_alloc()`, instead of using correct way to handle extra virtual user needed when we want to keep unused datablocks around...
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/group.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index 9b011dbb003..414802dd250 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -80,6 +80,8 @@ Group *BKE_group_add(Main *bmain, const char *name)
Group *group;
group = BKE_libblock_alloc(bmain, ID_GR, name);
+ id_us_min(&group->id);
+ id_us_ensure_real(&group->id);
group->layer = (1 << 20) - 1;
group->preview = NULL;