[Bf-blender-cvs] [57c8a07d307] greasepencil-refactor: GPencil: Don't add mask layers to mask list
Antonio Vazquez
noreply at git.blender.org
Sun Feb 9 19:06:27 CET 2020
Commit: 57c8a07d307dea7cf4a5f1d6e13515bdc39f59ad
Author: Antonio Vazquez
Date: Sun Feb 9 19:06:18 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB57c8a07d307dea7cf4a5f1d6e13515bdc39f59ad
GPencil: Don't add mask layers to mask list
This avoid cyclic relations
===================================================================
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 ee49152e1dc..167ed58735b 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -3312,6 +3312,10 @@ static int gp_layer_mask_add_exec(bContext *C, wmOperator *op)
}
for (bGPDlayer *gpl = gpl_active->prev; gpl; gpl = gpl->prev) {
+ /* Don't add mask layers. */
+ if (gpl->mask_layers.first != NULL) {
+ continue;
+ }
bGPDlayer_Mask *mask = MEM_callocN(sizeof(bGPDlayer_Mask), "bGPDlayer_Mask");
if (!BLI_findstring(&gpl_active->mask_layers, gpl->info, offsetof(bGPDlayer_Mask, name))) {
BLI_addtail(&gpl_active->mask_layers, mask);
More information about the Bf-blender-cvs
mailing list