Skip to content

Instantly share code, notes, and snippets.

View 7adidaz's full-sized avatar
🎯
Focusing

Abdallah Elhadad 7adidaz

🎯
Focusing
View GitHub Profile
@esnosy
esnosy / clean_modules.py
Last active January 6, 2022 12:13
Clean Blender addon modules
# 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