[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23326] trunk/blender: remove brush_sample_falloff, #if 0, unused function is_tablet_cursor
Campbell Barton
ideasman42 at gmail.com
Fri Sep 18 05:41:37 CEST 2009
Revision: 23326
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23326
Author: campbellbarton
Date: 2009-09-18 05:41:37 +0200 (Fri, 18 Sep 2009)
Log Message:
-----------
remove brush_sample_falloff, #if 0, unused function is_tablet_cursor
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp
trunk/blender/source/blender/blenkernel/BKE_brush.h
trunk/blender/source/blender/blenkernel/intern/brush.c
Modified: trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp 2009-09-18 03:29:50 UTC (rev 23325)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp 2009-09-18 03:41:37 UTC (rev 23326)
@@ -450,7 +450,7 @@
** Wacoms x11 config "cursor" refers to its device slot (which we mirror with
** our gSysCursors) for puck like devices (tablet mice essentially).
*/
-
+#if 0 // unused
static BOOL is_tablet_cursor(const char *name, const char *type)
{
int i;
@@ -474,7 +474,7 @@
}
return FALSE;
}
-
+#endif
static BOOL is_stylus(const char *name, const char *type)
{
int i;
Modified: trunk/blender/source/blender/blenkernel/BKE_brush.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_brush.h 2009-09-18 03:29:50 UTC (rev 23325)
+++ trunk/blender/source/blender/blenkernel/BKE_brush.h 2009-09-18 03:41:37 UTC (rev 23326)
@@ -63,7 +63,6 @@
float brush_curve_strength(struct Brush *br, float p, const float len);
/* sampling */
-float brush_sample_falloff(struct Brush *brush, float dist);
void brush_sample_tex(struct Brush *brush, float *xy, float *rgba);
void brush_imbuf_new(struct Brush *brush, short flt, short texfalloff, int size,
struct ImBuf **imbuf);
Modified: trunk/blender/source/blender/blenkernel/intern/brush.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 03:29:50 UTC (rev 23325)
+++ trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 03:41:37 UTC (rev 23326)
@@ -379,36 +379,6 @@
}
/* Brush Sampling */
-
-/*static float taylor_approx_cos(float f)
-{
- f = f*f;
- f = 1.0f - f/2.0f + f*f/24.0f;
- return f;
-}*/
-
-float brush_sample_falloff(Brush *brush, float dist)
-{
- float a, outer, inner;
-
- outer = brush->size >> 1;
- inner = outer*brush->innerradius;
-
- if (dist <= inner) {
- return brush->alpha;
- }
- else if ((dist < outer) && (inner < outer)) {
- a = sqrt((dist - inner)/(outer - inner));
- return (1 - a)*brush->alpha;
-
- /* formula used by sculpt, with taylor approx
- a = 0.5f*(taylor_approx_cos(3.0f*(dist - inner)/(outer - inner)) + 1.0f);
- return a*brush->alpha; */
- }
- else
- return 0.0f;
-}
-
void brush_sample_tex(Brush *brush, float *xy, float *rgba)
{
MTex *mtex= brush->mtex[brush->texact];
More information about the Bf-blender-cvs
mailing list