[Bf-blender-cvs] [c56e3bcb6f3] greasepencil-object: Fix: "New Note" didn't tag newly-created GP datablock for annotations when creating a new datablock
Joshua Leung
noreply at git.blender.org
Mon Jul 9 14:21:22 CEST 2018
Commit: c56e3bcb6f366bcef679807dc94afc6a0d8b7389
Author: Joshua Leung
Date: Mon Jul 9 23:47:29 2018 +1200
Branches: greasepencil-object
https://developer.blender.org/rBc56e3bcb6f366bcef679807dc94afc6a0d8b7389
Fix: "New Note" didn't tag newly-created GP datablock for annotations when creating a new datablock
===================================================================
M source/blender/editors/gpencil/gpencil_data.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 11f2f5e3458..029e2eeaabd 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -216,6 +216,9 @@ static int gp_layer_add_exec(bContext *C, wmOperator *op)
if (is_annotation) {
/* Annotations */
*gpd_ptr = BKE_gpencil_data_addnew(bmain, DATA_("Notes"));
+
+ /* mark as annotation */
+ (*gpd_ptr)->flag |= GP_DATA_ANNOTATIONS;
}
else {
/* GP Object */
More information about the Bf-blender-cvs
mailing list