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-09-18 02:17:33 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-09-18 20:10:40 +0300
commit5d728d38b94c2e48865de0e90fb433dbc1845fe0 (patch)
treedecce29be944cdf64959994e0135c8206a49e3ac /source/blender/editors/sculpt_paint/sculpt.c
parent8ac1ca13c852b8f35306d8aff7d2fa0f2a690ccf (diff)
Sculpt: Scale Cloth Filter
This filter scales the mesh as it was a softbody, producing folds in the surface. The orientation of the folds can be controlled using the filter axis and orientation. This is an example of a cloth filter that uses deform coordinates instead of forces, but probably it does not make much sense to expose it to the user in a different way and with different parameters. I'll remove FilterCache->enabled_force_axis in a later commit and use always enabled_axis in SCULPT_filter_zero_disabled_axis_components for both forces and deformation filters, so this function can also be used in the mesh filter. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8661
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index e6ea79a771a..a577760cf9b 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5716,7 +5716,8 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSe
if (brush->deform_target == BRUSH_DEFORM_TARGET_CLOTH_SIM) {
if (!ss->cache->cloth_sim) {
- ss->cache->cloth_sim = SCULPT_cloth_brush_simulation_create(ss, brush, 1.0f, 0.0f, false);
+ ss->cache->cloth_sim = SCULPT_cloth_brush_simulation_create(
+ ss, brush, 1.0f, 0.0f, false, true);
SCULPT_cloth_brush_simulation_init(ss, ss->cache->cloth_sim);
SCULPT_cloth_brush_build_nodes_constraints(
sd, ob, nodes, totnode, ss->cache->cloth_sim, ss->cache->location, FLT_MAX);