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:
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index f618427b9cb..98b206712d6 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -876,8 +876,8 @@ static void brush_painter_do_partial(BrushPainter *painter, ImBuf *oldtexibuf,
/* not sure if it's actually needed or it's a mistake in coords/sizes
* calculation in brush_painter_fixed_tex_partial_update(), but without this
* limitation memory gets corrupted at fast strokes with quite big spacing (sergey) */
- w = MIN2(w, ibuf->x);
- h = MIN2(h, ibuf->y);
+ w = min_ii(w, ibuf->x);
+ h = min_ii(h, ibuf->y);
if (painter->cache.flt) {
for (; y < h; y++) {
@@ -1052,13 +1052,13 @@ void BKE_brush_painter_break_stroke(BrushPainter *painter)
static void brush_pressure_apply(BrushPainter *painter, Brush *brush, float pressure)
{
if (BKE_brush_use_alpha_pressure(painter->scene, brush))
- brush_alpha_set(painter->scene, brush, maxf(0.0f, painter->startalpha * pressure));
+ brush_alpha_set(painter->scene, brush, max_ff(0.0f, painter->startalpha * pressure));
if (BKE_brush_use_size_pressure(painter->scene, brush))
- BKE_brush_size_set(painter->scene, brush, maxf(1.0f, painter->startsize * pressure));
+ BKE_brush_size_set(painter->scene, brush, max_ff(1.0f, painter->startsize * pressure));
if (brush->flag & BRUSH_JITTER_PRESSURE)
- brush->jitter = maxf(0.0f, painter->startjitter * pressure);
+ brush->jitter = max_ff(0.0f, painter->startjitter * pressure);
if (brush->flag & BRUSH_SPACING_PRESSURE)
- brush->spacing = maxf(1.0f, painter->startspacing * (1.5f - pressure));
+ brush->spacing = max_ff(1.0f, painter->startspacing * (1.5f - pressure));
}
void BKE_brush_jitter_pos(const Scene *scene, Brush *brush, const float pos[2], float jitterpos[2])
@@ -1158,7 +1158,7 @@ int BKE_brush_painter_paint(BrushPainter *painter, BrushFunc func, const float p
/* compute brush spacing adapted to brush radius, spacing may depend
* on pressure, so update it */
brush_pressure_apply(painter, brush, painter->lastpressure);
- spacing = maxf(1.0f, radius) * brush->spacing * 0.01f;
+ spacing = max_ff(1.0f, radius) * brush->spacing * 0.01f;
/* setup starting distance, direction vector and accumulated distance */
startdistance = painter->accumdistance;
@@ -1176,7 +1176,7 @@ int BKE_brush_painter_paint(BrushPainter *painter, BrushFunc func, const float p
t = step / len;
press = (1.0f - t) * painter->lastpressure + t * pressure;
brush_pressure_apply(painter, brush, press);
- spacing = maxf(1.0f, radius) * brush->spacing * 0.01f;
+ spacing = max_ff(1.0f, radius) * brush->spacing * 0.01f;
BKE_brush_jitter_pos(scene, brush, paintpos, finalpos);