diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-18 07:41:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-18 07:41:37 +0400 |
commit | fd6654d4ef4be21447e45a983b15c7024de33711 (patch) | |
tree | 33d72c94ff386596e5c344bb93d1197639dca1bb | |
parent | 985031c23553fb851f3e351d3f3ac2bdafb7c157 (diff) |
remove brush_sample_falloff, #if 0, unused function is_tablet_cursor
-rw-r--r-- | intern/ghost/intern/GHOST_WindowX11.cpp | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_brush.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 30 |
3 files changed, 2 insertions, 33 deletions
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index ab46c050fa3..060e9ca6f6c 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -450,7 +450,7 @@ static bool match_token(const char *haystack, const char *needle) ** 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 @@ static BOOL is_tablet_cursor(const char *name, const char *type) } return FALSE; } - +#endif static BOOL is_stylus(const char *name, const char *type) { int i; diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h index 4d24a2433b3..01566648557 100644 --- a/source/blender/blenkernel/BKE_brush.h +++ b/source/blender/blenkernel/BKE_brush.h @@ -63,7 +63,6 @@ void brush_curve_preset(struct Brush *b, BrushCurvePreset preset); 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); diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 9ae0863a78a..6c23d4260ae 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -379,36 +379,6 @@ void brush_check_exists(Brush **brush, const char *name) } /* 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]; |