diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-09-18 19:23:25 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-09-18 19:28:17 +0300 |
commit | 0335c1fd21dd49906968a2aa85b0016c8047f695 (patch) | |
tree | c424f99fbb8ee688156de6c51f4e9f65f3e9aa66 /source/blender/draw/engines/gpencil/gpencil_engine.h | |
parent | 7b988188dc3f5ea05d90b8e16337147778f9f580 (diff) |
GPencil: Implement Holdout materials
This new feature allows to use the strokes as an eraser of any stroke below. This is very handy to open holes in filled areas.
After running some tests, we have decided to keep the additive effect of the holdout color. To get clean holdout areas, just move the color to black to remove any additive effect. To have additive effect can be used in situations like tint slightly a transparent window with blue to simulate the glass.
See T79878 for more details
Differential Revision: https://developer.blender.org/D8932
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_engine.h')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_engine.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h index 7a516b3dd6b..0922ab6552c 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.h +++ b/source/blender/draw/engines/gpencil/gpencil_engine.h @@ -80,6 +80,8 @@ typedef struct gpMaterial { #define GP_STROKE_TEXTURE_STENCIL (1 << 4) #define GP_STROKE_TEXTURE_PREMUL (1 << 5) #define GP_STROKE_DOTS (1 << 6) +#define GP_STROKE_HOLDOUT (1 << 7) +#define GP_FILL_HOLDOUT (1 << 8) #define GP_FILL_TEXTURE_USE (1 << 10) #define GP_FILL_TEXTURE_PREMUL (1 << 11) #define GP_FILL_TEXTURE_CLIP (1 << 12) @@ -194,6 +196,10 @@ typedef struct GPENCIL_tObject { float plane_mat[4][4]; bool is_drawmode3d; + + /* Use Material Holdout. */ + bool do_mat_holdout; + } GPENCIL_tObject; /* *********** LISTS *********** */ |