diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-03-09 18:27:24 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-03-09 18:27:24 +0300 |
commit | 29f3af95272590d26f610ae828b2eeee89c82a00 (patch) | |
tree | a696a58a2561c48f7ec6166e369e22081e0a64d8 /source/blender/blenkernel/BKE_paint.h | |
parent | dcb93126876879d969a30a7865700abd072066f8 (diff) |
GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.
Also, a huge code cleanup has been done at all levels.
Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.
Differential Revision: https://developer.blender.org/D6293
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r-- | source/blender/blenkernel/BKE_paint.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 5283672bdde..46fb254a387 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -34,6 +34,7 @@ struct Brush; struct CurveMapping; struct Depsgraph; struct EnumPropertyItem; +struct GHash; struct GridPaintMask; struct ImagePool; struct MLoop; @@ -55,6 +56,7 @@ struct SubdivCCG; struct SubdivCCG; struct Tex; struct ToolSettings; +struct tPaletteColorHSV; struct UnifiedPaintSettings; struct View3D; struct ViewLayer; @@ -82,9 +84,13 @@ typedef enum ePaintMode { PAINT_MODE_TEXTURE_2D = 4, PAINT_MODE_SCULPT_UV = 5, PAINT_MODE_GPENCIL = 6, + /* Grease Pencil Vertex Paint */ + PAINT_MODE_VERTEX_GPENCIL = 7, + PAINT_MODE_SCULPT_GPENCIL = 8, + PAINT_MODE_WEIGHT_GPENCIL = 9, /** Keep last. */ - PAINT_MODE_INVALID = 7, + PAINT_MODE_INVALID = 10, } ePaintMode; #define PAINT_MODE_HAS_BRUSH(mode) !ELEM(mode, PAINT_MODE_SCULPT_UV) @@ -143,6 +149,15 @@ bool BKE_palette_is_empty(const struct Palette *palette); void BKE_palette_color_remove(struct Palette *palette, struct PaletteColor *color); void BKE_palette_clear(struct Palette *palette); +void BKE_palette_sort_hsv(struct tPaletteColorHSV *color_array, const int totcol); +void BKE_palette_sort_svh(struct tPaletteColorHSV *color_array, const int totcol); +void BKE_palette_sort_vhs(struct tPaletteColorHSV *color_array, const int totcol); +void BKE_palette_sort_luminance(struct tPaletteColorHSV *color_array, const int totcol); +bool BKE_palette_from_hash(struct Main *bmain, + struct GHash *color_table, + const char *name, + const bool linear); + /* paint curves */ struct PaintCurve *BKE_paint_curve_add(struct Main *bmain, const char *name); struct PaintCurve *BKE_paint_curve_copy(struct Main *bmain, const struct PaintCurve *pc); |