update templates for registration changes
[blender.git] / release / scripts / templates / operator_modal.py
index 026b5fd2d16e69ecae357ae53d16bccf9bb46604..6eb3843d6a641602e16af02bb6257c645149f2a8 100644 (file)
@@ -35,5 +35,16 @@ class ModalOperator(bpy.types.Operator):
             return {'CANCELLED'}
 
 
+def register():
+    bpy.utils.register_class(ModalOperator)
+
+
+def unregister():
+    bpy.utils.unregister_class(ModalOperator)
+
+
 if __name__ == "__main__":
+    register()
+
+    # test call
     bpy.ops.object.modal_operator()