Understanding the operator flow
We dealt with operators since Chapter 3, and we learned how their poll
method checks whether the operator can be executed, while execute
performs the operation and exits.
Then in Chapter 4, we added editable parameters to the Elevator operator, thanks to the 'REGISTER'
and '
UNDO'
options.
We also learned about the clever trick to change a result in real time when a user changes a parameter – Blender secretly undoes the last operation and performs it again with the new options, hence the need for 'UNDO'
.
That became more evident in Chapter 7, when we learned how using Edit | Adjust Last Operation from the menu bar changes the result of the last operation.
While those solutions allow us to get input parameters with ease, they don’t give access to the actual input events, such as the pressure of a key or the movement of a mouse.
That would require a listener – that is, code that waits for...