news 2026/7/13 21:34:14

BambuStudio 自定义加载页面 支持下载格式

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
BambuStudio 自定义加载页面 支持下载格式

目录

语言设置:

修改文件:

编译后会生成:

语言设置:

BambuStudio 自定义加载页面

插件下载url:

version.inc 中设置软件名字:

网络地址直接加载:

修改后:

编译命令:


语言设置:

cmake --build . --target gettext_po_to_mo --config RelWithDebInfo

修改文件:

BambuStudio_zh_CN.po

编译后会生成:

BambuStudio\build\src\RelWithDebInfo\resources\i18n\zh_CN\BambuStudio.mo

findstr /S /I "zh_CN" *.cpp *.h *.cmake
CMakeFiles\VerifyGlobs.cmake: "E:/pro_math/BambuStudio/src/slic3r/GUI/DeviceWeb/device_page/locales/zh_CN.json"

语言设置:

sort_remove_duplicates(language_infos); std::sort(language_infos.begin(), language_infos.end(), [](const wxLanguageInfo *l, const wxLanguageInfo *r) { return l->Description < r->Description; }); auto item_language = create_item_language_combobox(_L("Language"), page, _L("Language"), 50, "language", language_infos); std::vector<wxString> Regions = {_L("Asia-Pacific"), _L("Chinese Mainland"), _L("Europe"), _L("North America"), _L("Others")}; auto item_region= create_item_region_combobox(_L("Login Region"), page, _L("Login Region"), Regions);

BambuStudio 自定义加载页面

cmake --build . --target BambuStudio --config RelWithDebInfo
src/slic3r/GUI/GUI_App.cpp
void init(wxFont init_font) { // title title = wxGetApp().is_editor() ? SLIC3R_APP_FULL_NAME : GCODEVIEWER_APP_NAME; title=wxString::FromUTF8("AIGC制造工坊"); // dynamically get the version to display // version = _L("V") + " " + GUI_App::format_display_version(); version = _L("V02.08.00.50"); // credits infornation credits = ""; title_font = Label::Head_16; version_font = Label::Body_16; credits_font = init_font; }

插件下载url:

BOOST_LOG_TRIVIAL(info) << "[download_plugin] get_url = " << download_url;

插件目录:

const size_t len = BBL_INTERNAL_TESTING == 1 ? strlen("\\AppData\\Roaming\\BambuStudioInternal\\user") : strlen("\\AppData\\Roaming\\BambuStudioBeta\\user");

version.inc 中设置软件名字:

缓存目录地址:

C:\Users\ChangJing03\AppData\Roaming\BambuStudioaaaInternal

SLIC3R_APP_NAME

# Included by CMakeLists, edited by the build script # (the version numbers are generated by the build script from the git current label) set(SLIC3R_APP_NAME "BambuStudio") set(SLIC3R_APP_KEY "BambuStudio") if(NOT DEFINED BBL_RELEASE_TO_PUBLIC) set(BBL_RELEASE_TO_PUBLIC "0") endif() if(NOT DEFINED BBL_INTERNAL_TESTING) set(BBL_INTERNAL_TESTING "1") endif() # The build_version should start from 50 in master branch set(SLIC3R_VERSION "02.08.00.40") string(REPLACE "." "," SLIC3R_COMMA_SEPARATED_VERSION ${SLIC3R_VERSION}) set(SLIC3R_COMMA_SEPARATED_VERSION "${SLIC3R_COMMA_SEPARATED_VERSION}")

网络地址直接加载:

bambu-studio.exe https://makerworld.com/xxx/model.3mf bambustudio://open?file=https://public-cdn.bblmw.com/xxx.3mf

修改协议地址:

修改协议地址: reg query HKEY_CLASSES_ROOT\bambustudio\shell\open\command

下载代码:

void GUI_App::request_model_download(wxString url) { if (plater_) { plater_->request_model_download(url); } } void Plater::request_model_download(wxString url) { wxCommandEvent* event = new wxCommandEvent(EVT_IMPORT_MODEL_ID); event->SetString(url); wxQueueEvent(this, event); }

on_action_request_model_id

void Plater::import_model_id(wxString download_info) {
if (!extension.Contains(".3mf") && !extension.Contains(".3MF")) { msg = _L("Download failed, unknown file format."); return; // 直接返回,不支持其他格式 }

修改后:

static const std::vector<wxString> supported_formats = { ".3mf", ".3MF", ".stl", ".STL", ".step", ".STEP", ".stp", ".STP", ".glb", ".GLB", ".gcode", ".GCODE", ".obj", ".OBJ", ".amf", ".AMF" }; bool is_supported = false; for (const auto& fmt : supported_formats) { if (extension.Contains(fmt)) { is_supported = true; break; } } if (!is_supported) { // 构建支持的格式列表用于提示 wxString format_list; for (size_t i = 0; i < supported_formats.size(); i++) { if (i > 0) format_list += ", "; format_list += supported_formats[i]; } msg = wxString::Format(_L("Download failed, unsupported file format. Supported formats: %s"), format_list); return; }

编译命令:

cd E:\pro_math\BambuStudio\build E:\pro_math\BambuStudio\src\slic3r\GUI\Plater.cpp cmake --build . --target BambuStudio --config RelWithDebInfo
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/7/13 21:33:06

华为OD机试真题 新系统 2026-07-01 C++ 实现【收集灵草】

目录 题目 思路 Code 题目 在一个远古修士的洞穴中,探宝者发现了一排共 N 棵灵草,每棵灵草有一个灵力值 A,灵力值可为正、负或零。 为避免灵草被探宝者一扫而空,远古修士设置了禁制,要求探宝者必须选择一段连续的灵草序列带回,且必须满足以下规则: 规则一:选中的连续…

作者头像 李华
网站建设 2026/7/13 21:32:07

《2026 年 Code 还值得学吗?AI 编程时代程序员应该掌握哪些能力》

2026 年&#xff0c;Code 已不再只是单纯地写代码&#xff0c;而是逐渐延伸到 AI 编程、代码生成、代码审查、项目优化、自动化测试和开发效率提升等多个方向。无论是刚入门的编程学习者&#xff0c;还是有经验的程序员&#xff0c;都能明显感受到智能代码助手、AI 编程工具和自…

作者头像 李华
网站建设 2026/7/13 21:30:18

拳击机器人铁甲热斗场也能接住亲子客流

一家人走到游乐设备前&#xff0c;最先冲上去的通常是孩子。家长站在后面&#xff0c;看一会儿&#xff0c;拍张照&#xff0c;然后等孩子结束。很多亲子项目到这里就停了&#xff1a;孩子完成了一次体验&#xff0c;陪同者从头到尾没有进入玩法。机器人对战给了另一种可能。孩…

作者头像 李华
网站建设 2026/7/13 21:27:57

TVA具身智能的概念、架构与应用(6)

前沿技术探索&#xff1a;AI智能体视觉&#xff08;TVA&#xff0c;Transformer-based Vision Agent&#xff09;是依托Transformer架构与“因式智能体”理论所构建的颠覆性工业视觉技术&#xff0c;是集深度强化学习&#xff08;DRL&#xff09;、卷积神经网络&#xff08;CNN…

作者头像 李华