I apologize for the volume of questions. I tried searching for this, but came up with nothing related.
When building an operator window (or panel for that matter), is there any way to setup a simple button -> function relationship? Say, for example, if I had 6 buttons that I wanted to have call 6 separate functions?
If this is not possible, would there be a clever way to create a single operator class that allows its caller to specify a custom function to call when it is executed? Something like this?
op = layout.operator( "wm.function_caller", text="Write Data")
op.function = self.WriteData
I hadn't considered this until writing this question, so I think I will go try some variations on this. If it works, the down-side would be the inability to specify a custom description tool-tip for the buttons, right?
Thanks - any advice is appreciated.
Edit: Just wanted to provide a simple example of where something like this might make sense. If you define an operator window that allows the user to manipulate multiple sets of the same data, you may provide buttons at the top of it to "add" a set, to "subtract" a set, to "move forward" a set in order, to "move back" a set in order, etc. I find it strange that Blender provides a simple callback mechanism for data changes, but doesn't provide one for buttons.