feat: the op is picked when a node is added, not changed afterwards
\`add node\` made a gain and nothing else, so every other op was two steps. It is a menu of the twelve now, each carrying its index through \`math_op_index()\`'s space rather than a cast of the enum -- which is also what \`math_dialog_sync()\` now uses to drive the op dropdown, since that order is the dialog's and not the declaration's.
This commit is contained in:
1 parent
bafa391ad8
commit
5a69b2147b
3 files changed
+85
-9
No files matched your search
@@ -30,6 +30,10 @@ enum class MathOp {
|
||||
const char* math_op_name(MathOp op);
|
||||
int math_op_count();
|
||||
MathOp math_op_at(int index);
|
||||
/// An op's position in `math_op_at()`'s order. That order is the *dialog's* -- what a dropdown or a
|
||||
/// menu lists, and what a session file stores -- and it is deliberately not promised to be the
|
||||
/// enum's declaration order, so a caller that needs a position must ask rather than cast.
|
||||
int math_op_index(MathOp op);
|
||||
/// Inputs the op takes: 0 for `Source`, 1 for the unary ones, 2 for the arithmetic.
|
||||
int math_op_arity(MathOp op);
|
||||
/// Which of the per-node parameters an op actually reads, so a dialog can show only those rows --
|
||||
|
||||
Reference in new issue
Block a user