* changed "Normal" falloff to only fade out at more extreme normals

* tooltip was wrong
This commit is contained in:
Campbell Barton 2008-11-24 03:06:27 +00:00
parent 6adeff5778
commit 5a87cfe4f8
2 changed files with 15 additions and 6 deletions

@ -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)");

@ -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 {