GP Sculpt: WheelUp/Down can be used to control brush size/strength while a sculpt stroke is in progress
This commit is contained in:
parent
94265057b5
commit
cecdd13a2b
|
@ -1546,6 +1546,40 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even
|
|||
gso->timerTick = false;
|
||||
}
|
||||
break;
|
||||
|
||||
/* Adjust brush settings */
|
||||
/* FIXME: Step increments and modifier keys are hardcoded here! */
|
||||
case WHEELUPMOUSE:
|
||||
case PADPLUSKEY:
|
||||
if (event->shift) {
|
||||
/* increase strength */
|
||||
gso->brush->strength += 0.05f;
|
||||
CLAMP_MAX(gso->brush->strength, 1.0f);
|
||||
}
|
||||
else {
|
||||
/* increase brush size */
|
||||
gso->brush->size += 3;
|
||||
CLAMP_MAX(gso->brush->size, 300);
|
||||
}
|
||||
|
||||
redraw_region = true;
|
||||
break;
|
||||
|
||||
case WHEELDOWNMOUSE:
|
||||
case PADMINUS:
|
||||
if (event->shift) {
|
||||
/* decrease strength */
|
||||
gso->brush->strength -= 0.05f;
|
||||
CLAMP_MIN(gso->brush->strength, 0.0f);
|
||||
}
|
||||
else {
|
||||
/* decrease brush size */
|
||||
gso->brush->size -= 3;
|
||||
CLAMP_MIN(gso->brush->size, 1);
|
||||
}
|
||||
|
||||
redraw_region = true;
|
||||
break;
|
||||
|
||||
/* Painting mbut release = Stop painting (back to idle) */
|
||||
case LEFTMOUSE:
|
||||
|
|
Loading…
Reference in New Issue