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:
authorPhilipp Oeser <info@graphics-engineer.com>2022-01-06 13:28:02 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-01-06 22:55:43 +0300
commit3ae664363d182eab398bdd7d367b3f48e8d04af1 (patch)
tree448c92ee964a14a9df8718c23b7ff9ed076e09d2 /source/blender/editors/sculpt_paint/sculpt_smooth.c
parent3a4952e7c2025f582786eac235ae15c8ecbc781c (diff)
Fix T94635: Sculpt Smooth in Surface mode with Anchored Stroke crash
Sculpt Smooth in Surface mode (as opposed to Laplacian) needs a cache initialized on first time. In anchored stroke mode with spherical falloff this was skipped though (because this starts of with no PBVH nodes and an early return checks for this) and `first_time` was set to false before cache initialization. Now move the cache initalization to happen earlier (same as the cache initialization for automasking). Maniphest Tasks: T94635 Differential Revision: https://developer.blender.org/D13746
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_smooth.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_smooth.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_smooth.c b/source/blender/editors/sculpt_paint/sculpt_smooth.c
index 847f42fe9e8..c65489548b7 100644
--- a/source/blender/editors/sculpt_paint/sculpt_smooth.c
+++ b/source/blender/editors/sculpt_paint/sculpt_smooth.c
@@ -538,13 +538,6 @@ static void SCULPT_do_surface_smooth_brush_displace_task_cb_ex(
void SCULPT_do_surface_smooth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
{
Brush *brush = BKE_paint_brush(&sd->paint);
- SculptSession *ss = ob->sculpt;
-
- if (SCULPT_stroke_is_first_brush_step(ss->cache)) {
- BLI_assert(ss->cache->surface_smooth_laplacian_disp == NULL);
- ss->cache->surface_smooth_laplacian_disp = MEM_callocN(
- sizeof(float[3]) * SCULPT_vertex_count_get(ss), "HC smooth laplacian b");
- }
/* Threaded loop over nodes. */
SculptThreadedTaskData data = {