Fix brush user count

New brushes had 2 users on adding.
Caused assert removing them after.
This commit is contained in:
Campbell Barton
2018-01-10 17:45:34 +11:00
parent cacba951ea
commit 6e6b79de35

View File

@@ -152,7 +152,8 @@ Brush *BKE_brush_add(Main *bmain, const char *name, short ob_mode)
{
Brush *brush;
brush = BKE_libblock_alloc(bmain, ID_BR, name, 0);
/* Use no refcount, fakeuser is added in 'BKE_brush_init' */
brush = BKE_libblock_alloc(bmain, ID_BR, name, LIB_ID_CREATE_NO_USER_REFCOUNT);
BKE_brush_init(brush);