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-29 20:12:35 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-07-29 20:14:03 +0300
commit8c10e56331d0fb79d101c5edf214d7b327cc70c3 (patch)
treec5577ff2d6b67e6eee2be994fe309efa6555a68f /source/blender/blenkernel/BKE_paint.h
parentebda95953c8c2d22a4a427e1b5711cad7ae91136 (diff)
Sculpt: Cloth Brush Soft Body Influence property
This property adds constraints to the simulation using the initial location of the vertices, making it behave like a soft body. The strength of these constraints can be modified with the brush parameter. This makes some deformation modes more subtle and predictable, making it possible to use the cloth brush to add surface detail in a more controllable way without loosing completely the original shape of the mesh. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7845
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r--source/blender/blenkernel/BKE_paint.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 1c02aece06f..b9a8dbd762f 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -260,10 +260,20 @@ typedef struct SculptPoseIKChain {
/* Cloth Brush */
typedef struct SculptClothLengthConstraint {
- int v1;
- int v2;
+ /* Elements that are affected by the constraint. */
+ /* Element a should always be a mesh vertex with the index stored in elem_index_a as it is always
+ * deformed. Element b cound be another vertex of the same mesh or any other position (arbitrary
+ * point, position for a previous state). In that case, elem_index_a and elem_index_b should be
+ * the same to avoid affecting two different vertices when solving the constraints.
+ * *elem_position points to the position which is owned by the element. */
+ int elem_index_a;
+ float *elem_position_a;
+
+ int elem_index_b;
+ float *elem_position_b;
float length;
+ float strength;
} SculptClothLengthConstraint;
typedef struct SculptClothSimulation {