I'm still not sure about the best architecture for
multi-step user interactions within the current
operator system. I've tried wrapping the operator
with another, but that becomes quite complicated.
The best option so far seems to be to use a finite
state machine within the operator. For that I use
an additional property that stores the current state.
The operator might then call itself in different states.
Generally, this approach is quite scalable, when more
states are needed. There is a bit of overhead compared
to normal operators, but most things could be abstracted
away behind a generic API.
Note: I intentionally don't use the invoke method anymore,
because having two entry points makes it more complicated.
I also made display_file_selector and display_discard_warning
explicit properties of the operator. That means that
the caller has to set those if non-default behavior is
needed. Personally, I prefer this approach a lot over
having to "hack" certain behaviors by setting the
operator context to e.g. INVOKE_DEFAULT in Python.
Any comments on the approach?
As I said, I'm still not sure if there are better
ways to do this currently.


