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:
authorPablo Dobarro <pablodp606@gmail.com>2020-07-20 01:37:41 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-07-21 23:43:39 +0300
commit69afdf69702c8f1d4d43f7369a94bb36a4a349f2 (patch)
tree5f66807e13a31774a4a287250c45d8fc91b518e5 /source/blender/makesdna/DNA_brush_types.h
parent4aa2a5481cec4edc4694ee1edbde4ed3f3986313 (diff)
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
Diffstat (limited to 'source/blender/makesdna/DNA_brush_types.h')
-rw-r--r--source/blender/makesdna/DNA_brush_types.h16
1 files changed, 15 insertions, 1 deletions
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;