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;
+       }
 }
 
 /* ********************************************** */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to