diff options
author | Antonioya <blendergit@gmail.com> | 2018-10-05 00:27:34 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-10-05 00:27:34 +0300 |
commit | 3a1e9b9997e33c059d08138da707ac16490fddf7 (patch) | |
tree | 770b8bf9c30d10ee4a0866e7f62b5e4cf23f79bc /source/blender/makesdna/DNA_gpencil_types.h | |
parent | 65f77ccea1645f8c66fc171377641b08b62010e0 (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/makesdna/DNA_gpencil_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_types.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index b533cb48886..d991bb34a0a 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -39,7 +39,6 @@ struct CurveMapping; struct GHash; struct MDeformVert; -/* TODO: add size as userprefs parameter */ #define GP_OBGPENCIL_DEFAULT_SIZE 0.2f #define GP_DEFAULT_PIX_FACTOR 1.0f #define GP_DEFAULT_GRID_LINES 4 @@ -325,6 +324,16 @@ typedef struct bGPdata_runtime { char pad_[6]; } bGPdata_runtime; +/* grid configuration */ +typedef struct bGPgrid { + float color[3]; + float scale[2]; + char _pad1[4]; + + int lines; + int axis; +} bGPgrid; + /* Grease-Pencil Annotations - 'DataBlock' */ typedef struct bGPdata { ID id; /* Grease Pencil data is a datablock */ @@ -366,6 +375,7 @@ typedef struct bGPdata { int totpoint; char pad_3[4]; bGPdata_runtime runtime; + bGPgrid grid; } bGPdata; /* bGPdata->flag */ @@ -461,6 +471,14 @@ typedef enum eGP_DepthOrdering { GP_XRAY_BACK = 2 } eGP_DepthOrdering; +/* gpencil_grid_axis */ +enum { + V3D_GP_GRID_AXIS_LOCK = (1 << 0), + V3D_GP_GRID_AXIS_X = (1 << 1), + V3D_GP_GRID_AXIS_Y = (1 << 2), + V3D_GP_GRID_AXIS_Z = (1 << 3), +}; + /* ***************************************** */ /* Mode Checking Macros */ |