diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-01-22 04:23:51 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-02-11 20:57:07 +0300 |
commit | 015d5eda884dfb10f8982f9b0f8d69c9ea540349 (patch) | |
tree | d48f2ef3aea20b1ff69e54b7990f32b22104791e /source/blender/editors/sculpt_paint/sculpt_intern.h | |
parent | f1f2d9fe745e37d7e7c286002ec3fa6243b499e3 (diff) |
Sculpt: Clay Thumb Brush
This brush simulates deforming clay with your fingers, accumulating
material during the stroke. It has a plane that tilts during the stroke
in the front part of the brush to achieve this effect.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6238
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index b29bbfd1fb0..0b5bb942032 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -221,6 +221,9 @@ typedef struct SculptThreadedTaskData { float max_distance_squared; float nearest_vertex_search_co[3]; + /* Stabilized strength for the Clay Thumb brush. */ + float clay_strength; + int mask_expand_update_it; bool mask_expand_invert_mask; bool mask_expand_use_normals; @@ -312,6 +315,8 @@ bool sculpt_pbvh_calc_area_normal(const struct Brush *brush, * For descriptions of these settings, check the operator properties. */ +#define CLAY_STABILIZER_LEN 10 + typedef struct StrokeCache { /* Invariants */ float initial_radius; @@ -390,6 +395,13 @@ typedef struct StrokeCache { /* Pose brush */ struct SculptPoseIKChain *pose_ik_chain; + /* Clay Thumb brush */ + /* Angle of the front tilting plane of the brush to simulate clay accumulation. */ + float clay_thumb_front_angle; + /* Stores pressure samples to get an stabilized strength and radius variation. */ + float clay_pressure_stabilizer[CLAY_STABILIZER_LEN]; + int clay_pressure_stabilizer_index; + float vertex_rotation; /* amount to rotate the vertices when using rotate brush */ struct Dial *dial; |