From 36550a42e55ec5ab274fc036b87a557dec2b19fa Mon Sep 17 00:00:00 2001 From: Yusarina Date: Tue, 25 Mar 2025 19:41:33 +0000 Subject: [PATCH] Stop this version from loading on newer blenders --- __init__.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/__init__.py b/__init__.py index 59a9275..8e38c1a 100644 --- a/__init__.py +++ b/__init__.py @@ -1,7 +1,24 @@ +import bpy +from bpy.app.handlers import persistent + modules = None ordered_classes = None +def show_version_error_popup(): + def draw(self, context): + self.layout.label(text="Sorry, this version of Avatar Toolkit does not work on this version of Blender.") + self.layout.label(text="Please check the GitHub repository for the correct version for your Blender.") + self.layout.operator("wm.url_open", text="Open GitHub Repository").url = "https://github.com/teamneoneko/Avatar-Toolkit" + + bpy.context.window_manager.popup_menu(draw, title="Avatar Toolkit Version Error", icon='ERROR') + def register(): + # Check Blender version first + version = bpy.app.version + if version[0] > 4 or (version[0] == 4 and version[1] > 3): + show_version_error_popup() + return + # Add wheel installation check try: import lz4