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-08-18 16:11:51 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-08-18 18:16:35 +0300
commitc2f0522760b24b746b1f1686f91198c643b6b4c2 (patch)
tree75112de8b9a2e44d7e82f4d22517236330ea0701 /source/blender/makesdna/DNA_brush_types.h
parentbedd6f90ca70ede59adff10aaea4d0f17bf8d0b2 (diff)
Sculpt: Enable Cloth Simulation Target for Pose and Boundary
This adds a new brush property called "Deformation Target" which controls how the brush deformations is going to affect the mesh data. By default is set to Geometry, which makes the brushes displace the vertices. When set to Cloth Simulation, the deformation of the brush is applied to the cloth solver constraints, so the simulation is responsible to apply the final deformation. This allows to add cloth simulation effects to other sculpt tools with minor modifications to their code. This patch enables Cloth Simulation deformation target for Pose and Boundary brushes, which are tools that are already designed to work in low poly counts and produce large deformations. This allows creating the most common cloth effects, like bending and compressing folds, without relying on collisions. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8578
Diffstat (limited to 'source/blender/makesdna/DNA_brush_types.h')
-rw-r--r--source/blender/makesdna/DNA_brush_types.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 6c4d2856526..3873763e3e0 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -322,6 +322,11 @@ typedef enum eBrushCurvePreset {
BRUSH_CURVE_SMOOTHER = 9,
} eBrushCurvePreset;
+typedef enum eBrushDeformTarget {
+ BRUSH_DEFORM_TARGET_GEOMETRY = 0,
+ BRUSH_DEFORM_TARGET_CLOTH_SIM = 1,
+} eBrushDeformTarget;
+
typedef enum eBrushElasticDeformType {
BRUSH_ELASTIC_DEFORM_GRAB = 0,
BRUSH_ELASTIC_DEFORM_GRAB_BISCALE = 1,
@@ -539,7 +544,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;
@@ -587,6 +592,8 @@ typedef struct Brush {
/* Maximun distance to search fake neighbors from a vertex. */
float disconnected_distance_max;
+ int deform_target;
+
/* automasking */
int automasking_flags;
int automasking_boundary_edges_propagation_steps;