Open Valery-AA opened 3 months ago
Thank you for the report. I would like to disable it by default.
This function may be necessary during development, so enable it if the environment variable BLENDER_VRM_DEVEMOPMENT_MODE=yes.
@tdw46 As the original author of the code which edits sys.modules , do you have any opinions on this?
The changes have been reflected in 2.20.60, which has just been released.
@tdw46 As the original author of the code which edits sys.modules , do you have any opinions on this?
Thanks for the ping to make me aware of this! I actually had no clue that touching the sys modules like this could cause such an issue. Agreed to keep them behind a dev flag in the env variables. Good call.
Thank you for your opinion! I will proceed with the implementation of 2.20.60.
sys.modules should not be touched in any way and makes the current way the addon works hang python in blender, with errors from every single addon that, the module is gone and cannot be reimported
source 1: https://justus.science/blog/2015/04/19/sys.modules-is-dangerous.html source 2: https://github.com/Valery-AA/AlxBPYCodeReferences/blob/main/Addon%20Register%20And%20Reload/Reloading%20Multi-File%20Addons.md
additionally i have made available to the community an module auto-loader to solve this problem
auto-loader:
simply add the code above below the bl_info struct
simply add alxregister/alxunregister like this to blender's register/unregister functions