[Bf-extensions-cvs] [26b6c19] master: fix: added proper register/unregister
Gaia Clary
noreply at git.blender.org
Thu Dec 1 01:12:48 CET 2016
Commit: 26b6c193ee9d42c522e9d20e9c3a895c999bfb37
Author: Gaia Clary
Date: Thu Dec 1 01:12:24 2016 +0100
Branches: master
https://developer.blender.org/rBA26b6c193ee9d42c522e9d20e9c3a895c999bfb37
fix: added proper register/unregister
===================================================================
M space_view3d_math_vis/__init__.py
===================================================================
diff --git a/space_view3d_math_vis/__init__.py b/space_view3d_math_vis/__init__.py
index 0ad7569..50e7cf8 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__)
More information about the Bf-extensions-cvs
mailing list