[Bf-blender-cvs] [998229d8923] soc-2020-greasepencil-curve: GPencil: Skip uneditble layer
Falk David
noreply at git.blender.org
Thu Jul 2 22:08:14 CEST 2020
Commit: 998229d89235defb2443d507cc08d1b448daf0c2
Author: Falk David
Date: Thu Jul 2 21:48:02 2020 +0200
Branches: soc-2020-greasepencil-curve
https://developer.blender.org/rB998229d89235defb2443d507cc08d1b448daf0c2
GPencil: Skip uneditble layer
Don't sync the selection of strokes on an uneditble layer.
===================================================================
M source/blender/makesrna/intern/rna_gpencil.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 94602659c09..d670a15e228 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -195,13 +195,17 @@ static void rna_GPencil_curve_edit_update(Main *bmain, Scene *scene, PointerRNA
if (ts->gpencil_selectmode_edit == GP_SELECTMODE_SEGMENT) {
ts->gpencil_selectmode_edit = GP_SELECTMODE_POINT;
}
+
/* For all selected strokes, update edit curve */
BKE_gpencil_selected_strokes_editcurve_update(gpd);
}
/* curve edit mode is turned off */
else {
- /* deselect all strokes for now */
+ /* Sync selection for all strokes with editcurve */
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
+ if (!BKE_gpencil_layer_is_editable(gpl)) {
+ continue;
+ }
bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
for (bGPDframe *gpf = init_gpf; gpf; gpf = gpf->next) {
if ((gpf == gpl->actframe) || ((gpf->flag & GP_FRAME_SELECT) && is_multiedit)) {
More information about the Bf-blender-cvs
mailing list