Page MenuHome

Number slider precision handling inconsistent between unit systems
Closed, ResolvedPublic

Description

When sliding a float input, the step sizes are inconsistent between unit systems. This affects all current and past releases.

Example:

  • With Blender units, sliding any float number input results in 0.01 steps (0.001 with Shift)
  • With metric units, the step size increases 100 times - 1.0 per step, 0.1 with Shift.

This inconsistency makes the sliding function of float inputs almost useless when working with metric or imperial units.

Proposed fix:
In source/blender/editors/interface/interface.c, line 2076:

return (float)(step / ui_get_but_scale_unit(but, 1.0)) * 100.0f;

When the 100.0f factor is removed or set to 1.0f, the inconsistency is fixed.

Another proposal: make that factor configurable through User Preferences. This way you can preserve the old behaviour and still enable custom precision handling for those that need it.