Paint: Add asserts for BKE_brush_curve_strength

Neither the `distance` or `brush_radius` parameters make sense to be
negative and can cause odd behaviors.

Pull Request: https://projects.blender.org/blender/blender/pulls/146698
This commit is contained in:
Sean Kim
2025-09-29 19:13:56 +02:00
committed by Sean Kim
parent b168a96083
commit af8cb99b10

View File

@@ -1569,6 +1569,9 @@ float BKE_brush_curve_strength(const eBrushCurvePreset preset,
const float distance,
const float brush_radius)
{
BLI_assert(distance >= 0.0f);
BLI_assert(brush_radius >= 0.0f);
float p = distance;
float strength = 1.0f;