Created by: portnov
Earlier we used https://docs.blender.org/api/current/bpy.types.CurveMapping.html#bpy.types.CurveMapping.evaluate method to calculate the resulting value of mapper, in hope that it respects clipping settings automatically. However, it appears to do not. As a result, if the curve goes, for example, beyond [0;1] by Y, the result of the curve mapper could go negative even though "use clipping" option in the curve widget is enabled.
This change adds explicit clipping to evaluate function. If someone happened to adapt previous behaviour, they can just untick the "use clipping" checkbox in the curve widget settings.
the same curve with disabled clipping:
Preflight checklist
Put an x letter in each brackets when you're done this item:
-
Code changes complete. -
Code documentation complete. -
Documentation for users complete (or not required, if user never sees these changes). -
Manual testing done. -
Unit-tests implemented. -
Ready for merge.