diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-11-24 06:06:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-11-24 06:06:27 +0300 |
commit | 5a87cfe4f8e2277c3aaf7d84c2cdeff4185a0035 (patch) | |
tree | d22a7ac88da10764ab333e2e8407dc18c1ef6f5d | |
parent | 6adeff5778d6891c89736b92defb1366a47c5825 (diff) |
* changed "Normal" falloff to only fade out at more extreme normals
* tooltip was wrong
-rw-r--r-- | source/blender/src/buttons_editing.c | 2 | ||||
-rw-r--r-- | source/blender/src/imagepaint.c | 19 |
2 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 88ad5f24cd9..8d989538749 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -6374,7 +6374,7 @@ static void editing_panel_mesh_paint(void) uiBlockBeginAlign(block); uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_XRAY, B_NOP, "Occlude", xco+10,yco-70,butw,19, &settings->imapaint.flag, 0, 0, 0, 0, "Only paint onto the faces directly under the brush (slower)"); uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_BACKFACE, B_NOP, "Cull", xco+10,yco-90,butw/2,19, &settings->imapaint.flag, 0, 0, 0, 0, "Ignore faces pointing away from the view (faster)"); - uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_FLAT, B_NOP, "Normal", xco+10+butw/2,yco-90,butw/2,19, &settings->imapaint.flag, 0, 0, 0, 0, "Ignore faces pointing away from the view (faster)"); + uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_FLAT, B_NOP, "Normal", xco+10+butw/2,yco-90,butw/2,19, &settings->imapaint.flag, 0, 0, 0, 0, "Paint most on faces pointing towards teh view"); uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_IGNORE_SEAMS, B_NOP, "Bleed", xco+10,yco-110,butw/2,19, &settings->imapaint.flag, 0, 0, 0, 0, "Extend paint beyond the faces UVs to reduce seams (in pixels, slower)"); uiDefButF(block, NUM, B_NOP, "", xco+10 + (butw/2),yco-110,butw/2,19, &settings->imapaint.seam_bleed, 2.0, 8.0, 0, 0, "Extend paint beyond the faces UVs to reduce seams (in pixels, slower)"); diff --git a/source/blender/src/imagepaint.c b/source/blender/src/imagepaint.c index 24a913baec0..a9770e1707d 100644 --- a/source/blender/src/imagepaint.c +++ b/source/blender/src/imagepaint.c @@ -1329,8 +1329,16 @@ float project_paint_uvpixel_mask( if (angle >= M_PI_2) { return 0.0f; } else { +#if 0 mask = 1.0f - (angle / M_PI_2); /* map angle to 1.0-facing us, 0.0 right angles to the view direction */ +#endif + /* trickier method that clips the normal so its more useful */ + mask = (angle / M_PI_2); /* map angle to 1.0-facing us, 0.0 right angles to the view direction */ + mask = (1.0f - (mask * mask * mask)) * 1.4f; + if (mask > 1.0f) { + mask = 1.0f; + } } } else { @@ -4398,14 +4406,15 @@ void imagepaint_paint(short mousebutton, short texpaint) } else { if (stroke_gp==0) { BIF_wait_for_statechange(); + + if (redraw==0) { + /* Only so the brush outline is redrawn, pitty we need to do this + * however it wont run when the mouse is still so not too bad */ + force_draw(0); + } } } - if (redraw==0) { - /* Only so the brush outline is redrawn, pitty we need to do this - * however it wont run when the mouse is still so not too bad */ - force_draw(0); - } init = 0; } else { |