Bug
While dragging to adjust Decimate Ratio during collider creation (the (D) mouse-drag HUD field), the direction felt inverted compared to every other draggable field, e.g. Shrink/Inflate (S): dragging the mouse right decreased the Decimate ratio, while it increases Shrink/Inflate, Opacity, Height/Width Multiplier and the segment-count fields.
Root cause
Each of the ~9 mouse-drag-adjustable HUD fields in OBJECT_OT_add_bounding_object.modal() (collider_shapes/add_bounding_primitive.py) computed its new value from the raw mouse delta independently, hand-rolled per field. Every field but Decimate used ref_value - delta; Decimate alone used ref_value + delta, with no comment explaining why - almost certainly an old copy/paste slip rather than an intentional inversion (Voxel Size also uses + delta, but that one is intentional: it's a size, where smaller = finer, so inverting it keeps "drag right = more detail" consistent with Decimate's ratio).
The same hand-rolled-per-field pattern also duplicated the debounce logic (Decimate ratio and Voxel Size defer their expensive modifier re-evaluation until dragging pauses, see #631 / #641) as two near-identical timer classes, and duplicated each field's clamp range between the drag path and the typed-numeric-entry path (#640).
Fix
- Flip Decimate's drag formula to match the rest (
ref_value - delta).
- Introduce a single
_DRAG_FIELD_CONFIG table declaring, per field: drag sensitivity, direction (invert), clamp range, and whether committing a dragged change is debounced. This makes an intentional inversion (Voxel Size) explicit and documented instead of indistinguishable from a bug, and is the one place to check/adjust a field's feel going forward.
- Replace the duplicated per-field debounce timers with one generic
arm_update_debounce() / flush_update_debounce() pair.
- Share the clamp range between the drag path and the typed-numeric-entry path via one
clamp_field_value() helper.
- Incidental fix found while unifying: Capsule Segments had no minimum-value floor (Cylinder and Sphere Segments both floor at their minimum), letting it drag down to 0/negative before
abs()-ing back up. Now shares Sphere's floor of 2.
Working tree fix is ready on main (uncommitted): collider_shapes/add_bounding_primitive.py.
Bug
While dragging to adjust Decimate Ratio during collider creation (the
(D)mouse-drag HUD field), the direction felt inverted compared to every other draggable field, e.g. Shrink/Inflate(S): dragging the mouse right decreased the Decimate ratio, while it increases Shrink/Inflate, Opacity, Height/Width Multiplier and the segment-count fields.Root cause
Each of the ~9 mouse-drag-adjustable HUD fields in
OBJECT_OT_add_bounding_object.modal()(collider_shapes/add_bounding_primitive.py) computed its new value from the raw mouse delta independently, hand-rolled per field. Every field but Decimate usedref_value - delta; Decimate alone usedref_value + delta, with no comment explaining why - almost certainly an old copy/paste slip rather than an intentional inversion (Voxel Size also uses+ delta, but that one is intentional: it's a size, where smaller = finer, so inverting it keeps "drag right = more detail" consistent with Decimate's ratio).The same hand-rolled-per-field pattern also duplicated the debounce logic (Decimate ratio and Voxel Size defer their expensive modifier re-evaluation until dragging pauses, see #631 / #641) as two near-identical timer classes, and duplicated each field's clamp range between the drag path and the typed-numeric-entry path (#640).
Fix
ref_value - delta)._DRAG_FIELD_CONFIGtable declaring, per field: drag sensitivity, direction (invert), clamp range, and whether committing a dragged change is debounced. This makes an intentional inversion (Voxel Size) explicit and documented instead of indistinguishable from a bug, and is the one place to check/adjust a field's feel going forward.arm_update_debounce()/flush_update_debounce()pair.clamp_field_value()helper.abs()-ing back up. Now shares Sphere's floor of 2.Working tree fix is ready on
main(uncommitted):collider_shapes/add_bounding_primitive.py.