change python scripts so modules which register with blender have a register() functi...
[blender.git] / release / scripts / op / mesh.py
index d8b28094e3a48b2eb3c526b3ba5a96289f9bb4e9..08363c838928e4988355a636143b815c7c5d8d4c 100644 (file)
@@ -173,10 +173,20 @@ class MeshMirrorUV(bpy.types.Operator):
 
         return {'FINISHED'}
 
+
 # Register the operator
-bpy.types.register(MeshSelectInteriorFaces)
-bpy.types.register(MeshMirrorUV)
+classes = [
+    MeshSelectInteriorFaces,
+    MeshMirrorUV]
+
+
+def register():
+    register = bpy.types.register
+    for cls in classes:
+        register(cls)
+
+def unregister():
+    unregister = bpy.types.unregister
+    for cls in classes:
+        unregister(cls)
 
-if __name__ == "__main__":
-    # bpy.ops.mesh.faces_select_interior()
-    bpy.ops.mesh.faces_miror_uv()