Page MenuHome

Curves: Cleanup set radius/weight operators
AbandonedPublic

Authored by Falk David (filedescriptor) on Jul 31 2021, 8:02 PM.

Details

Summary

Both the "Set Radius" and "Set Weight" operators used
WM_operator_props_popup in the invoke callback. This seems to be
legacy code since almost no other operator does this (the exception is
PARTICLE_OT_rekey which should also maybe be changed).
All other operators using WM_operator_props_popup_* usually require
the user to enter a string or pick an element from an enum.

The patch removes the invoke callback of CURVE_OT_spline_weight_set
and CURVE_OT_radius_set. This also fixes T90063.

Additionally both these operators were only exposed in the context curve
menu. All other operators in the context menu are at least exposed once
more in one of the menus. The patch adds curve.spline_weight_set and
curve.radius_set to the "Curve" menu.

Diff Detail

Repository
rB Blender
Branch
T90063 (branched from master)
Build Status
Buildable 16148
Build 16148: arc lint + arc unit

Event Timeline

Falk David (filedescriptor) requested review of this revision.Jul 31 2021, 8:02 PM
Falk David (filedescriptor) created this revision.
Falk David (filedescriptor) retitled this revision from Curve: Cleanup set radius/weight operators to Curves: Cleanup set radius/weight operators.Jul 31 2021, 8:03 PM

So now you just move the mouse to change the radius and weight?

I don't even think the set weight operator should exist honestly, but that's a different topic

I'm a bit worried that these cases will keep coming up. I wonder if this optimization is really worth it in general.

I'll abandon this revision now that the original commit was reverted in rB3bf10e5.

I left a code comment there suggesting to implement this at the RNA set/update level, which would mean that the callback functions attached to buttons still run. Trying to avoid cases that use such callback functions is not a reliable solution.