Skip to content

Transform your 3D texturing workflow with the power of generative AI, directly within Blender!

add a proper server availability check upon startup

sakalondcee813bd5fc8
diff --git a/stablegen/__init__.py b/stablegen/__init__.py
index 539b335..d37c7a3 100755
--- a/stablegen/__init__.py
+++ b/stablegen/__init__.py
@@ -1042,6 +1042,10 @@ def register():
def initial_refresh():
print("StableGen: Performing initial model list refresh...")
try:
+ bpy.ops.stablegen.check_server_status('INVOKE_DEFAULT')
+ if not bpy.context.preferences.addons.get(__package__).preferences.server_online:
+ print("StableGen: Server not reachable during initial refresh.")
+ return None
# Check if server address is set before attempting
prefs = bpy.context.preferences.addons.get(__package__)
if prefs and prefs.preferences.server_address: