I've realized a fairly common issue I've had is that all inputs are "added up" (mypaint-mapping.c:184). So, if you want to control the "intensity" of an effect, you have to try to create a mapping that will reverse the setting by way of adding or subtracting values. This can be impossible in many cases, for instance, when trying to attenuate a random input. Or, you might end up with large negative values when really you just want to arrive at zero.
My first thought was to have a dropdown for each input that lets you specify the operator (add/mult) but then you'd have to consider order of operations (PEMDAS), not to mention changing data models and GUI, etc etc. Then I remembered multiply opacity setting that already does what I'm talking about, but only for opacity (mypaint-brush.c:615). So I'm thinking if we could just programmatically create an additional setting for every setting, lumped under its own category called something like "Intensity". As an aside, it'd be great if the setting "group" was part of libmypaint instead of mypaint gui.
So, is it possible to create settings on-the-fly? Or, should I just edit brushsettings.json and create all of these manually? Or can anyone think of a better way to handle this kind of "intensity" setting? I'm also not sure how the multiply should affect the base value. Should the base value be preserved so that even if you multiply by zero the greater of the two values is used? I think that might make more sense, so that it is only controlling the intensity of the effect of all the inputs, not the base value.