In my add-on
__init__.py file, I have a function defined
def unregister(): which unregisters all other modules. But when I exit Blender normally (Windows 10, X button), this function is never called.
Edit Note: This is normal behavior - see answer
Is there something that needs to be done before Blender executes
unregister() on exit? Or perhaps some error in my add-on may be causing this behavior? I get no warnings or errors. Only two lines print out on exit:
Saved session recovery to 'C:\Users\Moats\AppData\Local\Temp\quit.blend' Blender quit
Maybe this is normal? Blender is saying - its over, so it doesn't matter? One other unlikely possibility is that print() doesn't function after a certain exit point. I can probably confirm this, but not easily.
If anyone knows what might be happening, or can confirm that their own
unregister() is being called on exit, I'd really appreciate it.