From 69afdf69702c8f1d4d43f7369a94bb36a4a349f2 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 20 Jul 2020 00:37:41 +0200 Subject: Sculpt: Support pen pressure modulation in Paint Brush properties This allows to use pen pressure modulation in hardness, wet mix, wet persistence, flow and density, as well as inverting the modulation (more pressure, less density...). With this, it is possible to create brushes that mix paint or apply a new color based on the pressure. Reviewed By: sergey, campbellbarton Differential Revision: https://developer.blender.org/D8267 --- source/blender/makesdna/DNA_brush_types.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_brush_types.h') diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 0ad249ef2cd..76a172d6fda 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -388,6 +388,19 @@ typedef enum eAutomasking_flag { BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS = (1 << 3), } eAutomasking_flag; +typedef enum ePaintBrush_flag { + BRUSH_PAINT_HARDNESS_PRESSURE = (1 << 0), + BRUSH_PAINT_HARDNESS_PRESSURE_INVERT = (1 << 1), + BRUSH_PAINT_FLOW_PRESSURE = (1 << 2), + BRUSH_PAINT_FLOW_PRESSURE_INVERT = (1 << 3), + BRUSH_PAINT_WET_MIX_PRESSURE = (1 << 4), + BRUSH_PAINT_WET_MIX_PRESSURE_INVERT = (1 << 5), + BRUSH_PAINT_WET_PERSISTENCE_PRESSURE = (1 << 6), + BRUSH_PAINT_WET_PERSISTENCE_PRESSURE_INVERT = (1 << 7), + BRUSH_PAINT_DENSITY_PRESSURE = (1 << 8), + BRUSH_PAINT_DENSITY_PRESSURE_INVERT = (1 << 9), +} ePaintBrush_flag; + typedef struct Brush { ID id; @@ -454,6 +467,7 @@ typedef struct Brush { float wet_persistence; /** Density */ float density; + int paint_flags; /** Tip Shape */ /* Factor that controls the shape of the brush tip by rounding the corners of a square. */ @@ -480,7 +494,7 @@ typedef struct Brush { /** Source for fill tool color gradient application. */ char gradient_fill_mode; - char _pad0[1]; + char _pad0[5]; /** Projection shape (sphere, circle). */ char falloff_shape; -- cgit v1.2.3