Because I added init
and changed operators that can use it to use it instead of begin.
See sculpt_gesture_apply
below. I add init
that is called before the undo push and thus can completely abort the operation. Begin like before is called after the base undo push, and thus…
The idea was to distinguish branching between types of sculpt tools, and the logic for the check. Basically the logic here is:
switch (type) {
case ...
default:
if (!unlocked(...))…
For whatever reason that function will return null instead of the 0th (basis) key.
The function is not a query though, its point is to encapsulate emitting the warning message to avoid having to repeat it, so that operators that need the check can contain just:
if not…
One final change I'd like to see: rather than hiding the fallback checkbox etc. if the ID target isn't filled in, I think graying it out would be better. That makes it a little more discoverable…
It was relying on side effects of driver_get_variable_property
. I refactored it to return an enum value, and also do the index bounds check internally so that all fallback checking code is in…
nullptr means default caption, while "" means no caption at all, so they are different.
- The fallback option seems to only exist for
Single Property
andContext Property
variable types. I think that's probably fine for now, but maybe that could be added in a follow up PR, for…