diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-13 11:26:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-13 11:26:56 +0300 |
commit | 1a0fb7e9ae8889905173a7deb0a7b1ca990fc34d (patch) | |
tree | eeacf84a67194b6a6f2710a9a7838da474342bea /source | |
parent | a050d6063c78004de8b4b5945cb03bb43d84c8de (diff) |
Project Paint: enable old bleed UV calculation
Was disabled because other values weren't quite right.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 8bf4395add2..29236859d16 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -2841,10 +2841,11 @@ static void project_paint_face_init( { /* Only bother calculating the weights if we intersect */ if (ps->do_mask_normal || ps->dm_mtface_clone) { -#if 1 + float uv_fac; +#if 0 /* get the UV on the line since we want to copy the pixels from there for bleeding */ float uv_close[2]; - float uv_fac = closest_to_line_v2(uv_close, uv, tf_uv_pxoffset[fidx1], tf_uv_pxoffset[fidx2]); + uv_fac = closest_to_line_v2(uv_close, uv, tf_uv_pxoffset[fidx1], tf_uv_pxoffset[fidx2]); if (uv_fac < 0.0f) copy_v2_v2(uv_close, tf_uv_pxoffset[fidx1]); else if (uv_fac > 1.0f) copy_v2_v2(uv_close, tf_uv_pxoffset[fidx2]); @@ -2854,7 +2855,7 @@ static void project_paint_face_init( else { barycentric_weights_v2(tf_uv_pxoffset[0], tf_uv_pxoffset[1], tf_uv_pxoffset[2], uv_close, w); } -#else /* this is buggy with quads, don't use for now */ +#else /* Cheat, we know where we are along the edge so work out the weights from that */ uv_fac = fac1 + (uv_fac * (fac2 - fac1)); |