change python scripts so modules which register with blender have a register() functi...
[blender.git] / release / scripts / ui / properties_object_constraint.py
index 8ad9634b682bdcb6462543b4978f0eb3cebba23e..3ec647cda0c84926249bd88c82e47a95e0922aa8 100644 (file)
@@ -754,5 +754,18 @@ class BONE_PT_constraints(ConstraintButtonsPanel):
         for con in context.pose_bone.constraints:
             self.draw_constraint(context, con)
 
-bpy.types.register(OBJECT_PT_constraints)
-bpy.types.register(BONE_PT_constraints)
+
+classes = [
+    OBJECT_PT_constraints,
+    BONE_PT_constraints]
+
+
+def register():
+    register = bpy.types.register
+    for cls in classes:
+        register(cls)
+
+def unregister():
+    unregister = bpy.types.unregister
+    for cls in classes:
+        unregister(cls)