diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-31 22:24:41 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-31 22:24:41 +0300 |
commit | 8b0f968a312e4293349c91d1d50621d120b5c899 (patch) | |
tree | b128293d052dcfe7a6f0826afcec630988fb846f | |
parent | f783efd1279ae6c0e334e4fa86666e4f1234f85d (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...
-rw-r--r-- | source/blender/blenkernel/intern/group.c | 2 |
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; |