Operators have a check()
function that Blender calls when it wants to check if it should redraw. Exporters usually use this to attach a file extension to the file name (eg).
I know check()
already runs after the user has edited the filename field, or after they click a file in the filepicker. I would like it to run after the user changes an option too. For example, the glTF exporter does this:
If the prop is drawn by the operator.draw()
function this happens automatically. However it does not happen automatically if the option is drawn by a separate panel. How can I get it to update in that case?
Here is a complete example you can test with: https://pastebin.com/2k6mBNGz
(PS. I already know how the glTF exporter does it. I'm interested in a "proper" solution.)