From f9751889df35c81501c60abd1af98252d80ea3fc Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Sun, 15 May 2022 00:33:22 -0700 Subject: Fix T81715: Unprojected radius mode messes up sculpt texture radius We really need to fix how unprojected radius (scene unit) works. What happened is the paint code updates the brush's normal radius with the current unprojected pixel radius, which was then used by texture brush tiled mode. To fix this I just cached the pixel radius at stroke start in UnifiedPaintSettings->start_pixel_radius. --- source/blender/blenkernel/intern/brush.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 0593db34e20..3f243d04965 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -2029,7 +2029,7 @@ float BKE_brush_sample_tex_3d(const Scene *scene, /* leave the coordinates relative to the screen */ /* use unadjusted size for tiled mode */ - invradius = 1.0f / BKE_brush_size_get(scene, br); + invradius = 1.0f / ups->start_pixel_radius; x = point_2d[0]; y = point_2d[1]; @@ -2142,7 +2142,7 @@ float BKE_brush_sample_masktex( /* leave the coordinates relative to the screen */ /* use unadjusted size for tiled mode */ - invradius = 1.0f / BKE_brush_size_get(scene, br); + invradius = 1.0f / ups->start_pixel_radius; x = point_2d[0]; y = point_2d[1]; -- cgit v1.2.3