Page MenuHome

Fix T88762: UI using tab to enter next button could clamp the hard min/ max unneccessarily
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Jun 3 2021, 1:13 PM.

Details

Summary

Since rB298d5eb66916 [which was needed to update buttons with custom
property range functions correctly], using tab would always clamp
(hardmin/hardmax) properties which were using FLT_MAX / INT_MAX as range
in their property definitions.

The clamping of rB298d5eb66916 was copied over from rB9b7f44ceb56c
[where it was used for the softmin/softmax], and while the re-evaluation
of hardmin/hardmax is needed for custom property range functions, I
think the clamping should actually not take place.
There are many properties using FLT_MAX / INT_MAX etc. and while it
probably would be good to update these with ranges that make more sense

  • not using FLT_MAX / INT_MAX would not have done the clamping here --

it seems wrong to clamp hard.

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Jun 3 2021, 1:13 PM
Philipp Oeser (lichtwerk) created this revision.

RNA properties using FLT_MAX / INT_MAX should generally stay as they are. It's intentional to not set an arbitrary limit when there is no need for it.

The clamping should indeed only apply to soft ranges, where it's used to avoid numeric precision issues when dragging/sliding.

This revision is now accepted and ready to land.Jun 3 2021, 1:31 PM