change python scripts so modules which register with blender have a register() functi...
[blender.git] / release / scripts / ui / properties_animviz.py
index 7954ac199dd8a3f3df1ddf96d5d0976c007f9884..556fe6f165d13ae92533adc774d7e7332be010fd 100644 (file)
@@ -157,8 +157,19 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel):
         col.operator("pose.paths_clear", text="Clear Paths")
 
 
-
-#bpy.types.register(OBJECT_PT_onion_skinning)
-#bpy.types.register(DATA_PT_onion_skinning)
-bpy.types.register(OBJECT_PT_motion_paths)
-bpy.types.register(DATA_PT_motion_paths)
+classes = [
+    OBJECT_PT_motion_paths,
+    DATA_PT_motion_paths]
+
+# OBJECT_PT_onion_skinning
+# DATA_PT_onion_skinning
+
+def register():
+    register = bpy.types.register
+    for cls in classes:
+        register(cls)
+
+def unregister():
+    unregister = bpy.types.unregister
+    for cls in classes:
+        unregister(cls)