Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-10-05 00:27:34 +0300
committerAntonioya <blendergit@gmail.com>2018-10-05 00:27:34 +0300
commit3a1e9b9997e33c059d08138da707ac16490fddf7 (patch)
tree770b8bf9c30d10ee4a0866e7f62b5e4cf23f79bc /source/blender/blenkernel/intern/gpencil.c
parent65f77ccea1645f8c66fc171377641b08b62010e0 (diff)
GP: Move grid parameters to GP object data level
The grid now can be configured by object because this helps to identify objects and allows to define diferent grid parameters for each objects. Also added a color option.
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil.c')
-rw-r--r--source/blender/blenkernel/intern/gpencil.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index d22c7c8808f..1f27c146399 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -467,6 +467,12 @@ bGPdata *BKE_gpencil_data_addnew(Main *bmain, const char name[])
gpd->runtime.batch_cache_data = NULL;
gpd->pixfactor = GP_DEFAULT_PIX_FACTOR;
+ /* grid settings */
+ ARRAY_SET_ITEMS(gpd->grid.color, 0.5f, 0.5f, 0.5f); // Color
+ ARRAY_SET_ITEMS(gpd->grid.scale, 1.0f, 1.0f); // Scale
+ gpd->grid.lines = GP_DEFAULT_GRID_LINES; // Number of lines
+ gpd->grid.axis = V3D_GP_GRID_AXIS_Y;
+
/* onion-skinning settings (datablock level) */
gpd->onion_flag |= (GP_ONION_GHOST_PREVCOL | GP_ONION_GHOST_NEXTCOL);
gpd->onion_flag |= GP_ONION_FADE;