def select_existing_model(self, need_to_confirm=True):
response, code = HTTP.get(self.env.project_manager.get_build_api_key(), PL_BUILD_API_URL_V4 + "models")
if len(response["models"]) > 0:
if need_to_confirm and not sublime.ok_cancel_dialog(STR_MODEL_SELECT_EXISTING_MODEL):
return
all_model_names = [model["name"] for model in response["models"]]
self.__tmp_all_models = [(model["id"], model["name"]) for model in response["models"]]
else:
sublime.message_dialog(STR_MODEL_NO_MODELS_FOUND)
return
self.window.show_quick_panel(all_model_names, self.on_model_selected)
评论列表
文章目录