Stop this version from loading on newer blenders
This commit is contained in:
+17
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user