mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #106139: Curvemapping clipping range variable error
Clipping should use `clipr`instead of `curr`. `clipr` is for value clipping while `curr` is for curve view clipping, misuse of these two can lead to output value being clipped by viewing range. Now fixed. Pull Request: https://projects.blender.org/blender/blender/pulls/106164
This commit is contained in:
parent
6bc0bc8c4a
commit
70b382100a
1 changed files with 4 additions and 4 deletions
|
|
@ -977,11 +977,11 @@ float BKE_curvemapping_evaluateF(const CurveMapping *cumap, int cur, float value
|
|||
|
||||
/* account for clipping */
|
||||
if (cumap->flag & CUMA_DO_CLIP) {
|
||||
if (val < cumap->curr.ymin) {
|
||||
val = cumap->curr.ymin;
|
||||
if (val < cumap->clipr.ymin) {
|
||||
val = cumap->clipr.ymin;
|
||||
}
|
||||
else if (val > cumap->curr.ymax) {
|
||||
val = cumap->curr.ymax;
|
||||
else if (val > cumap->clipr.ymax) {
|
||||
val = cumap->clipr.ymax;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue