GPencil: If "onion skinning" toggle on header is enabled, new layers will have onions...
authorJoshua Leung <aligorith@gmail.com>
Mon, 8 Feb 2016 11:14:45 +0000 (00:14 +1300)
committerJoshua Leung <aligorith@gmail.com>
Mon, 8 Feb 2016 13:45:32 +0000 (02:45 +1300)
source/blender/blenkernel/intern/gpencil.c

index e629a0791c95ab5c927b40c488d29f72a320a3ed..179ed1f479929a5abbb702b949b8da1089f4497a 100644 (file)
@@ -253,6 +253,9 @@ bGPDlayer *gpencil_layer_addnew(bGPdata *gpd, const char *name, int setactive)
        gpl->thickness = 3;
        
        /* onion-skinning settings */
+       if (gpd->flag & GP_DATA_SHOW_ONIONSKINS)
+               gpl->flag |= GP_LAYER_ONIONSKIN;
+       
        gpl->flag |= (GP_LAYER_GHOST_PREVCOL | GP_LAYER_GHOST_NEXTCOL);
        
        ARRAY_SET_ITEMS(gpl->gcolor_prev, 0.145098f, 0.419608f, 0.137255f); /* green */