diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2016-12-01 03:12:24 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2016-12-01 03:12:24 +0300 |
commit | 26b6c193ee9d42c522e9d20e9c3a895c999bfb37 (patch) | |
tree | 8c380976bfeeb96ba8b454c4eac7a48a54d15671 /space_view3d_math_vis | |
parent | cdf67517e068fccd8925dbd841af0b588b97d545 (diff) |
fix: added proper register/unregister
Diffstat (limited to 'space_view3d_math_vis')
-rw-r--r-- | space_view3d_math_vis/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/space_view3d_math_vis/__init__.py b/space_view3d_math_vis/__init__.py index 0ad7569d..50e7cf87 100644 --- a/space_view3d_math_vis/__init__.py +++ b/space_view3d_math_vis/__init__.py @@ -199,12 +199,10 @@ def register(): import console_python console_python.execute.hooks.append((console_hook, ())) bpy.utils.register_module(__name__) - if not 'MathVisStateProp' in dir(bpy.types.WindowManager): - bpy.types.Scene.MathVisProp = PointerProperty(type=MathVisProp) - bpy.types.WindowManager.MathVisStateProp = CollectionProperty(type=MathVisStateProp) + bpy.types.Scene.MathVisProp = PointerProperty(type=MathVisProp) + bpy.types.WindowManager.MathVisStateProp = CollectionProperty(type=MathVisStateProp) bpy.types.CONSOLE_MT_console.prepend(menu_func_cleanup) - def unregister(): context = bpy.context var_states = get_var_states() @@ -214,4 +212,7 @@ def unregister(): import console_python console_python.execute.hooks.remove((console_hook, ())) bpy.types.CONSOLE_MT_console.remove(menu_func_cleanup) + del bpy.types.Scene.MathVisProp + del bpy.types.WindowManager.MathVisStateProp + bpy.utils.unregister_module(__name__) |