Page MenuHome

RNA: Better validation for float UI step size

Authored by Julian Eisel (Severin) on Fri, Sep 4, 5:18 PM.



Makes the script_load_addons test succeed in debug builds.

Add-ons may specify a big step size for large ranges, which would cause
a runtime RNA error in debug builds. The old validation logic was added in

The second hunk in this patch was needed for runtime RNA properties that
define a small range, e.g. MESH_OT_intersect.threshold. For them the
previous default step size of 0.01 didn't make sense at all, but didn't
error out. Now the step size maximum is softmax - softmin (we could
split that further but need to pay attention to precision issues with
small ranges).

Diff Detail

rB Blender
temp-rna-float-range-fix (branched from master)
Build Status
Buildable 9989
Build 9989: arc lint + arc unit

Event Timeline

Julian Eisel (Severin) requested review of this revision.Fri, Sep 4, 5:18 PM

I would say we could generalize this behavior regardless of softrange, imho by default step should always be like a tenth or a hundredth of the softrange, would give more consistent behavior in UI for users. But this is separate issue (design topic), patch LGTM for now.

This revision is now accepted and ready to land.Mon, Sep 14, 9:53 AM