[Bf-blender-cvs] [558e33c] GPencil_Editing_Stage3: GPencil: Initialise default values for before/after onionskin colours
Joshua Leung
noreply at git.blender.org
Mon Sep 28 15:36:49 CEST 2015
Commit: 558e33ca45fffc7b0ab75aa9afd9d5f84a52e409
Author: Joshua Leung
Date: Tue Sep 29 00:49:30 2015 +1300
Branches: GPencil_Editing_Stage3
https://developer.blender.org/rB558e33ca45fffc7b0ab75aa9afd9d5f84a52e409
GPencil: Initialise default values for before/after onionskin colours
Newly created layers will now get a pair of default values for the before and after
onion skinning colours. These are currently hardcoded to a green and blue colour
(respectively). Also, "use colours" toggle will be enabled by default, so that these
colours will be applied as soon as you show the onionskins.
===================================================================
M source/blender/blenkernel/intern/gpencil.c
===================================================================
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index ee5c919..81a8fb7 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -197,6 +197,13 @@ bGPDlayer *gpencil_layer_addnew(bGPdata *gpd, const char *name, int setactive)
copy_v4_v4(gpl->color, U.gpencil_new_layer_col);
gpl->thickness = 3;
+ /* onion-skinning settings */
+ gpl->flag |= (GP_LAYER_GHOST_PREVCOL | GP_LAYER_GHOST_NEXTCOL);
+
+ ARRAY_SET_ITEMS(gpl->gcolor_prev, 0.145098f, 0.419608f, 0.137255f); /* green */
+ ARRAY_SET_ITEMS(gpl->gcolor_next, 0.125490f, 0.082353f, 0.529412f); /* blue */
+
+
/* auto-name */
BLI_strncpy(gpl->info, name, sizeof(gpl->info));
BLI_uniquename(&gpd->layers, gpl, DATA_("GP_Layer"), '.', offsetof(bGPDlayer, info), sizeof(gpl->info));
More information about the Bf-blender-cvs
mailing list