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-11-26 02:37:56 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-11-27 02:18:41 +0300
commit64b58888fba96d189cda68918fbf8ac2c0a543b6 (patch)
treed6d098f14ce3e7368e18fe974588b6aa23557493 /source/blender/editors/sculpt_paint/sculpt.c
parent26eb8d6aa0c8fcf59d427390f57765c61fde2c92 (diff)
Sculpt: Refactor transform code to allow incremental updates
This adds support for incremental updates in the sculpt transform code. Now tools can define if they need the displacement applied for the original coordinates or incrementally. This is needed for features like elastic transform or cloth deformation target in the transform tool. No functional changes. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9547
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 c33dfecd52c..7d5f71b070f 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2632,7 +2632,8 @@ void SCULPT_clip(Sculpt *sd, SculptSession *ss, float co[3], const float val[3])
continue;
}
- if ((ss->cache->flag & (CLIP_X << i)) && (fabsf(co[i]) <= ss->cache->clip_tolerance[i])) {
+ if (ss->cache && (ss->cache->flag & (CLIP_X << i)) &&
+ (fabsf(co[i]) <= ss->cache->clip_tolerance[i])) {
co[i] = 0.0f;
}
else {