[Bf-blender-cvs] [feb7d1a] compositor-2016: Fix T48456: 2x pixel size clamps min brush size
Campbell Barton
noreply at git.blender.org
Wed Jun 8 21:52:33 CEST 2016
Commit: feb7d1a2deb36b55a7bb0c3c38f5e550f25d3c10
Author: Campbell Barton
Date: Fri Jun 3 01:07:29 2016 +1000
Branches: compositor-2016
https://developer.blender.org/rBfeb7d1a2deb36b55a7bb0c3c38f5e550f25d3c10
Fix T48456: 2x pixel size clamps min brush size
Using double pixel size prevented 1px brushes
D2044 by @jeske
===================================================================
M source/blender/blenkernel/intern/brush.c
M source/blender/editors/sculpt_paint/paint_cursor.c
===================================================================
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 31dac03..da78630 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -852,7 +852,7 @@ int BKE_brush_size_get(const Scene *scene, const Brush *brush)
UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
int size = (ups->flag & UNIFIED_PAINT_SIZE) ? ups->size : brush->size;
- return (int)((float)size * U.pixelsize);
+ return size;
}
int BKE_brush_use_locked_size(const Scene *scene, const Brush *brush)
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index e4e9976..eba9448 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1016,7 +1016,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
translation[1] = y;
outline_alpha = 0.5;
outline_col = brush->add_col;
- final_radius = BKE_brush_size_get(scene, brush) * zoomx;
+ final_radius = (BKE_brush_size_get(scene, brush) * zoomx) / U.pixelsize;
/* don't calculate rake angles while a stroke is active because the rake variables are global and
* we may get interference with the stroke itself. For line strokes, such interference is visible */
More information about the Bf-blender-cvs
mailing list