Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wilkins <Jason.A.Wilkins@gmail.com>2010-07-27 00:05:08 +0400
committerJason Wilkins <Jason.A.Wilkins@gmail.com>2010-07-27 00:05:08 +0400
commit3683d9d1b892695c92fa963585669c821ef6a425 (patch)
tree19ca9191927dec9eacf8f2dfd6deff8c65a4bba8 /source/blender/editors/sculpt_paint/paint_stroke.c
parentf30c12bcab5b1d87719bb05df1cfa3bdb92bb970 (diff)
Saved a call to 'brush_alpha'
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index b0e41393bd8..6ac0c307a54 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -540,7 +540,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *unused)
view3d_set_viewcontext(C, &vc);
- if (0 && vc.obact->sculpt) {
+ if (vc.obact->sculpt) {
Paint *paint = paint_get_active(CTX_data_scene(C));
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
Brush *brush = paint_brush(paint);
@@ -556,7 +556,8 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *unused)
float* col;
float alpha;
- float visual_strength = brush_alpha(brush)*brush_alpha(brush);
+ const float root_alpha = brush_alpha(brush);
+ float visual_strength = root_alpha*root_alpha;
const float min_alpha = 0.20f;
const float max_alpha = 0.80f;
@@ -581,7 +582,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *unused)
return;
hit = sculpt_get_brush_geometry(C, x, y, &pixel_radius, location, modelview, projection, viewport);
-
+return;
if (brush_use_locked_size(brush))
brush_set_size(brush, pixel_radius);