[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17546] branches/projection-paint/source/ blender/src: * changed "Normal" falloff to only fade out at more extreme normals
Campbell Barton
ideasman42 at gmail.com
Mon Nov 24 04:06:30 CET 2008
Revision: 17546
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17546
Author: campbellbarton
Date: 2008-11-24 04:06:27 +0100 (Mon, 24 Nov 2008)
Log Message:
-----------
* changed "Normal" falloff to only fade out at more extreme normals
* tooltip was wrong
Modified Paths:
--------------
branches/projection-paint/source/blender/src/buttons_editing.c
branches/projection-paint/source/blender/src/imagepaint.c
Modified: branches/projection-paint/source/blender/src/buttons_editing.c
===================================================================
--- branches/projection-paint/source/blender/src/buttons_editing.c 2008-11-24 02:13:24 UTC (rev 17545)
+++ branches/projection-paint/source/blender/src/buttons_editing.c 2008-11-24 03:06:27 UTC (rev 17546)
@@ -6374,7 +6374,7 @@
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)");
Modified: branches/projection-paint/source/blender/src/imagepaint.c
===================================================================
--- branches/projection-paint/source/blender/src/imagepaint.c 2008-11-24 02:13:24 UTC (rev 17545)
+++ branches/projection-paint/source/blender/src/imagepaint.c 2008-11-24 03:06:27 UTC (rev 17546)
@@ -1329,8 +1329,16 @@
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 @@
} 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 {
More information about the Bf-blender-cvs
mailing list