fix for various python bugs and remove unused var.
[blender.git] / release / scripts / templates / operator_simple.py
index 6a887a70bdcf66b71832570c769d0f937ca6b0b2..8348c7a95b13a17b0dd42210cc6d5de6e8e2e863 100644 (file)
@@ -20,5 +20,16 @@ class SimpleOperator(bpy.types.Operator):
         return {'FINISHED'}
 
 
+def register():
+    bpy.utils.register_class(SimpleOperator)
+
+
+def unregister():
+    bpy.utils.unregister_class(SimpleOperator)
+
+
 if __name__ == "__main__":
+    register()
+
+    # test call
     bpy.ops.object.simple_operator()