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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-06 08:47:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-06 08:54:07 +0300
commit0294e1d27f2f64e88ab980f5fafa3d3e0743877c (patch)
treecbd278a2424e8ba8ee7a99c8d31b62213ce41478 /source
parentdd61787b2545d7bd091211af6650c8a78ba8e707 (diff)
Fix T62236: Crash texture painting
Caused by 10d9a2494fc5e which removed 5x length clamping.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 1b5f0cae40c..6da33ad8b72 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -1322,6 +1322,9 @@ static void uv_image_outset(
len_fact = cosf(tri_ang);
len_fact = UNLIKELY(len_fact < FLT_EPSILON) ? FLT_MAX : (1.0f / len_fact);
+ /* Clamp the length factor, see: T62236. */
+ len_fact = MIN2(len_fact, 5.0f);
+
mul_v2_fl(no, ps->seam_bleed_px * len_fact);
add_v2_v2v2(seam_data->seam_puvs[i], puv[fidx[i]], no);