Forgive me if this has already has been discussed. I didn’t find anything with the search.
Ideally, I would like to have a ParamId/ParamQuantity that points to a vector value rather than scalar. But everything is reliant on a 1:1 relationship between ParamId and a scalar float.
So then, I thought to implement a ParamWidget that could control N ParamQuantities. In particular, for now, N = 2 (x & y coordinates of a point).
The problems I see so far:
-
Not being able to override resetAction() for the history. Not ideal, but I could replicate the same code for the extra ParamQuantities in reset().
-
Not being able to override createContextMenu() to account for the extra parameters for user input via TextField. I’m not sure if there is an elegant work around for this. I found a thread where override onButton was frowned upon to create a custom context menu. Not elegant, but I was thinking perhaps a custom ParamQuantity for the ‘main’/‘first’ parameter that would parse the single text field and send the values to its siblings. This would work OK for now since N = 2 so it’s not too many parameters stuck in one field. But then also, the parameter change histories would need to be addressed…
-
Not being able to override ModuleWidget.getParam(). I couldn’t find where ModuleWidget.getParam() was being called so that may not be too much of an issue?
There are probably many other issues, but these were the initial ones I found while planning out this custom ParamWidget. Are there better ways to work around these issues or a better solution in general?