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>2019-02-23 13:34:23 +0300
committerAntonioya <blendergit@gmail.com>2019-02-23 13:46:24 +0300
commit8214a1ae34ad7a08585813fc9234f927ea89a3dc (patch)
tree2e486fd18ec5b37c68118cc929fd88a653db59bb /source/blender/makesdna/DNA_gpencil_types.h
parent702a2ba0ef93f2f5a8544565b15c04dba73206c3 (diff)
GP: Define new Draw Mode
Add a new Draw Mode to display panel in order to define the z-.depth order of the strokes using the real 3D position and not the 2D layer position. This change makes possible to use VR with grease pencil drawings because the depth of the strokes change with camera position. Also, provide an alternative solution to tasks: T57859, T60325, The parameter only works with 3D space depth ordering. The Back and Front depths are incompatible with 3D Space mode. Options are: - Back - Front - 3D Space->2D Layers (default) -3D Space->3D Location (new mode)
Diffstat (limited to 'source/blender/makesdna/DNA_gpencil_types.h')
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 4f9de5e6fd8..3c5b90acd60 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -510,7 +510,11 @@ typedef struct bGPdata {
char _pad2[6];
int totstroke;
int totpoint;
- char _pad3[4];
+
+ /** Draw mode for strokes (eGP_DrawMode). */
+ short draw_mode;
+ char _pad3[2];
+
bGPgrid grid;
bGPdata_Runtime runtime;
@@ -616,6 +620,12 @@ typedef enum eGP_DepthOrdering {
GP_XRAY_BACK = 2,
} eGP_DepthOrdering;
+/* draw modes (Use 2D or 3D position) */
+typedef enum eGP_DrawMode {
+ GP_DRAWMODE_2D = 0,
+ GP_DRAWMODE_3D = 1
+} eGP_DrawMode;
+
/* ***************************************** */
/* Mode Checking Macros */