diff --git a/src/modules/sbstudio/plugin/api.py b/src/modules/sbstudio/plugin/api.py index 3303c0aa..13e10d8d 100644 --- a/src/modules/sbstudio/plugin/api.py +++ b/src/modules/sbstudio/plugin/api.py @@ -75,9 +75,7 @@ def call_api_from_blender_operator( return ``{"CANCELLED"}`` from the operator immediately in response to an exception. """ - default_message = ( - f"Error while invoking {what} on the Skybrush Studio online service" - ) + default_message = f"Error while invoking {what} on the Skybrush Studio server" try: yield get_api() except SkybrushStudioExportWarning as ex: diff --git a/src/modules/sbstudio/plugin/operators/append_formation_to_storyboard.py b/src/modules/sbstudio/plugin/operators/append_formation_to_storyboard.py index 1e6fe8dd..8b16c702 100644 --- a/src/modules/sbstudio/plugin/operators/append_formation_to_storyboard.py +++ b/src/modules/sbstudio/plugin/operators/append_formation_to_storyboard.py @@ -91,7 +91,7 @@ def execute_on_formation(self, formation, context): raise self.report( {"ERROR"}, - "Error while invoking transition planner on the Skybrush Studio online service", + "Error while invoking transition planner on the Skybrush Studio server", ) return {"CANCELLED"} diff --git a/src/modules/sbstudio/plugin/operators/recalculate_transitions.py b/src/modules/sbstudio/plugin/operators/recalculate_transitions.py index 29e3ed38..36cc33d6 100644 --- a/src/modules/sbstudio/plugin/operators/recalculate_transitions.py +++ b/src/modules/sbstudio/plugin/operators/recalculate_transitions.py @@ -766,7 +766,7 @@ def execute_on_storyboard(self, storyboard: Storyboard, entries, context): {"ERROR"}, ( "Error while invoking transition planner on the Skybrush " - "Studio online service" + "Studio server" ), ) return {"CANCELLED"} diff --git a/src/modules/sbstudio/plugin/operators/refresh_file_formats.py b/src/modules/sbstudio/plugin/operators/refresh_file_formats.py index f518d2a0..8e9ae4d6 100644 --- a/src/modules/sbstudio/plugin/operators/refresh_file_formats.py +++ b/src/modules/sbstudio/plugin/operators/refresh_file_formats.py @@ -19,7 +19,7 @@ class RefreshFileFormatsOperator(Operator): def execute(self, context): try: with call_api_from_blender_operator( - self, "Server capabilities query" + self, "server capabilities query" ) as api: update_supported_file_formats_from_limits(api.get_limits()) except Exception: diff --git a/src/modules/sbstudio/plugin/operators/set_server_url.py b/src/modules/sbstudio/plugin/operators/set_server_url.py index da422880..70df994f 100644 --- a/src/modules/sbstudio/plugin/operators/set_server_url.py +++ b/src/modules/sbstudio/plugin/operators/set_server_url.py @@ -24,4 +24,10 @@ def execute(self, context): bpy.ops.wm.save_userpref() + try: + bpy.ops.skybrush.refresh_file_formats() + except RuntimeError: + # Maybe the server is not running? + pass + return {"FINISHED"}