Commit: 251e4f997563d54aa494aba16677c28d982927c6
Author: Antonio Vazquez
Date:   Tue Nov 26 20:02:43 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB251e4f997563d54aa494aba16677c28d982927c6

GPencil: Fix number of users for Brushes

===================================================================

M       source/blender/editors/sculpt_paint/paint_ops.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_ops.c 
b/source/blender/editors/sculpt_paint/paint_ops.c
index 4ed088397f3..31f59ef42f8 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -108,12 +108,13 @@ static int brush_add_gpencil_exec(bContext *C, wmOperator 
*UNUSED(op))
   }
   else {
     br = BKE_brush_add(bmain, "Brush", OB_MODE_PAINT_GPENCIL);
-    id_us_min(&br->id); /* fake user only */
 
     /* Init grease pencil specific data. */
     BKE_brush_init_gpencil_settings(br);
   }
 
+  id_us_min(&br->id); /* fake user only */
+
   BKE_paint_brush_set(paint, br);
 
   return OPERATOR_FINISHED;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to