diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-03-26 17:48:54 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-03-26 17:48:54 +0300 |
commit | acc6e5c315a508f7ca7896b08354067c0fb44067 (patch) | |
tree | ad1a1be2b07db146f522345219b50293b6b38211 /source/blender/editors/object/object_add.c | |
parent | 4bb70e0ba566a44568d8105bb6ba0d91badb2168 (diff) |
LineArt: Fix unreported material user count error when apply modifier
The number of users was 0 after applying the modifier.
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r-- | source/blender/editors/object/object_add.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 50dc1af5ca8..4268f0281e8 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1416,6 +1416,9 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op) /* Only created one layer and one material. */ strcpy(md->target_layer, ((bGPDlayer *)gpd->layers.first)->info); md->target_material = BKE_gpencil_material(ob, 1); + if (md->target_material) { + id_us_plus(&md->target_material->id); + } /* Stroke object is drawn in front of meshes by default. */ ob->dtx |= OB_DRAW_IN_FRONT; |