Cleanup previous commit
Don't need check minimum constant value, brush value is enough.
This commit is contained in:
parent
ac3d07ad17
commit
e339946515
Notes:
blender-bot
2023-02-14 07:40:56 +01:00
Referenced by commit 795cea2cce
, Revert "Cleanup GPencil strength previous commit"
|
@ -835,7 +835,7 @@ static short gpencil_stroke_addpoint(tGPsdata *p,
|
|||
/* color strength */
|
||||
if (brush_settings->flag & GP_BRUSH_USE_STRENGTH_PRESSURE) {
|
||||
pt->strength *= BKE_curvemapping_evaluateF(brush_settings->curve_strength, 0, pressure);
|
||||
CLAMP(pt->strength, MIN2(GPENCIL_STRENGTH_MIN, brush_settings->draw_strength), 1.0f);
|
||||
CLAMP(pt->strength, brush_settings->draw_strength, 1.0f);
|
||||
}
|
||||
|
||||
/* Set vertex colors for buffer. */
|
||||
|
@ -1031,7 +1031,7 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p)
|
|||
/* copy pressure and time */
|
||||
pt->pressure = ptc->pressure;
|
||||
pt->strength = ptc->strength;
|
||||
CLAMP(pt->strength, MIN2(GPENCIL_STRENGTH_MIN, brush_settings->draw_strength), 1.0f);
|
||||
CLAMP(pt->strength, brush_settings->draw_strength, 1.0f);
|
||||
copy_v4_v4(pt->vert_color, ptc->vert_color);
|
||||
pt->time = ptc->time;
|
||||
/* Apply the vertex color to point. */
|
||||
|
@ -1065,7 +1065,7 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p)
|
|||
/* copy pressure and time */
|
||||
pt->pressure = ptc->pressure;
|
||||
pt->strength = ptc->strength;
|
||||
CLAMP(pt->strength, MIN2(GPENCIL_STRENGTH_MIN, brush_settings->draw_strength), 1.0f);
|
||||
CLAMP(pt->strength, brush_settings->draw_strength, 1.0f);
|
||||
pt->time = ptc->time;
|
||||
/* Apply the vertex color to point. */
|
||||
ED_gpencil_point_vertex_color_set(ts, brush, pt, ptc);
|
||||
|
@ -1190,7 +1190,7 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p)
|
|||
/* copy pressure and time */
|
||||
pt->pressure = ptc->pressure;
|
||||
pt->strength = ptc->strength;
|
||||
CLAMP(pt->strength, MIN2(GPENCIL_STRENGTH_MIN, brush_settings->draw_strength), 1.0f);
|
||||
CLAMP(pt->strength, brush_settings->draw_strength, 1.0f);
|
||||
copy_v4_v4(pt->vert_color, ptc->vert_color);
|
||||
pt->time = ptc->time;
|
||||
pt->uv_fac = ptc->uv_fac;
|
||||
|
|
Loading…
Reference in New Issue