Blender 2.80 already protects against enabling incompatible add-ons. If the Blender version in the bl_info
is too low, it will display a warning in the preferences. Blender will not run the register()
function on these add-ons. However it does allow to tick the checkbox and the user may get the impression that it's properly enabled.

If you want to avoid that, you can check the Blender version and raise an exception in your __init__.py
. This will prevent the checkbox from being enabled and the user gets an error message right away. I'm not sure if it will have the intended effect, since some users may not read or understand the error message.
bl_info = {
"name": "Version Check Add-on",
"author": "Robert Guetzkow",
"version": (1, 0),
"blender": (2, 79, 0),
"location": "View3D > Sidebar > My own addon",
"description": "Checks if the correct version of Blender is used",
"warning": "",
"wiki_url": "",
"category": "3D View"}
import bpy
if bpy.app.version > (2, 79, 0):
raise Exception("This add-on is incompatible with Blender versions newer than 2.79.\n"
"For Blender 2.8 please download the version from the following link:\n"
"[insert link here]")
class EXAMPLE_PT_panel(bpy.types.Panel):
bl_label = "My own addon"
bl_category = "Name of your tab"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
def draw(self, context):
layout = self.layout
layout.label("Congratulations, your Blender version is supported.")
classes = (EXAMPLE_PT_panel,)
def register():
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
if __name__ == "__main__":
register()