This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://devtalk.blender.org/t/plugin-hot-reload-by-cleaning-sys-modules/20040 | |
def cleanse_modules(): | |
"""search for your plugin modules in blender python sys.modules and remove them""" | |
for module_name in list(sys.modules.keys()): | |
if module_name.startswith(__name__): | |
del sys.modules[module_name] | |
# example usage |