[Bf-blender-cvs] [b615ce6] GPencil_Editing_Stage3: GP EditMode: Tweaked poll callback for selection ops to work when the active layer is empty
Joshua Leung
noreply at git.blender.org
Wed Oct 28 23:27:47 CET 2015
Commit: b615ce637f95e4930491571cea39581288c480c8
Author: Joshua Leung
Date: Sat Oct 24 01:58:11 2015 +1300
Branches: GPencil_Editing_Stage3
https://developer.blender.org/rBb615ce637f95e4930491571cea39581288c480c8
GP EditMode: Tweaked poll callback for selection ops to work when the active layer is empty
===================================================================
M source/blender/editors/gpencil/gpencil_select.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index 0dd9101..08975f0 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -67,10 +67,13 @@
static int gpencil_select_poll(bContext *C)
{
bGPdata *gpd = ED_gpencil_data_get_active(C);
- bGPDlayer *gpl = gpencil_layer_getactive(gpd);
- /* only if there's an active layer with an active frame */
- return (gpl && gpl->actframe);
+ /* we just need some visible strokes, and to be in editmode */
+ if ((gpd) && (gpd->flag & GP_DATA_STROKE_EDITMODE)) {
+ /* TODO: include a check for visible strokes? */
+ if (gpd->layers.first)
+ return true;
+ }
}
/* ********************************************** */
More information about the Bf-blender-cvs
mailing list