[Bf-extensions-cvs] [3f92a331] master: Amaranth: Fix addon un-register function

Sergey Sharybin noreply at git.blender.org
Tue Sep 20 10:05:43 CEST 2022


Commit: 3f92a331936056c17b598d8da2ddd57e8a292154
Author: Sergey Sharybin
Date:   Tue Sep 20 10:03:28 2022 +0200
Branches: master
https://developer.blender.org/rBA3f92a331936056c17b598d8da2ddd57e8a292154

Amaranth: Fix addon un-register function

The issue was introduced in cf773d42f07d and vis caused
by a lack of class unregister.

Fixes regression tests, as well as usecase when a user
toggles the addon off and on again.

===================================================================

M	amaranth/misc/toggle_wire.py

===================================================================

diff --git a/amaranth/misc/toggle_wire.py b/amaranth/misc/toggle_wire.py
index b766c30f..bf8614a5 100644
--- a/amaranth/misc/toggle_wire.py
+++ b/amaranth/misc/toggle_wire.py
@@ -133,3 +133,7 @@ def register():
 
 def unregister():
     clear_properties()
+
+    from bpy.utils import unregister_class
+    for cls in classes:
+        unregister_class(cls)



More information about the Bf-extensions-cvs mailing list