Merge remote-tracking branch 'BS/v1.7.2'

Signed-off-by: SoftFever <103989404+SoftFever@users.noreply.github.com>

# Conflicts:
#	.github/ISSUE_TEMPLATE/bug_report.md
#	.github/workflows/build_ubuntu.yml
#	.gitignore
#	Containerfile
#	Dockerfile
#	README.md
#	deps/Boost/Boost.cmake
#	deps/OpenEXR/OpenEXR.cmake
#	deps/OpenVDB/OpenVDB.cmake
#	doc/How to build - Mac OS.md
#	localization/i18n/OrcaSlicer.pot
#	localization/i18n/de/OrcaSlicer_de.po
#	localization/i18n/en/OrcaSlicer_en.po
#	localization/i18n/es/OrcaSlicer_es.po
#	localization/i18n/fr/OrcaSlicer_fr.po
#	localization/i18n/hu/OrcaSlicer_hu.po
#	localization/i18n/it/OrcaSlicer_it.po
#	localization/i18n/ja/OrcaSlicer_ja.po
#	localization/i18n/list.txt
#	localization/i18n/nl/OrcaSlicer_nl.po
#	localization/i18n/sv/OrcaSlicer_sv.po
#	localization/i18n/zh_cn/OrcaSlicer_zh_CN.po
#	resources/i18n/de/BambuStudio.mo
#	resources/i18n/en/BambuStudio.mo
#	resources/i18n/es/BambuStudio.mo
#	resources/i18n/fr/BambuStudio.mo
#	resources/i18n/hu/BambuStudio.mo
#	resources/i18n/it/BambuStudio.mo
#	resources/i18n/ja/BambuStudio.mo
#	resources/i18n/nl/BambuStudio.mo
#	resources/i18n/sv/BambuStudio.mo
#	resources/i18n/zh_cn/BambuStudio.mo
#	resources/images/im_all_plates_stats.svg
#	resources/profiles/Anker.json
#	resources/profiles/Anker/filament/Generic ASA @Anker.json
#	resources/profiles/Anker/filament/Generic PA @Anker.json
#	resources/profiles/Anker/filament/Generic PA-CF @Anker.json
#	resources/profiles/Anker/filament/Generic PC @Anker.json
#	resources/profiles/Anker/filament/Generic PETG @Anker.json
#	resources/profiles/Anker/filament/Generic PLA-CF @Anker.json
#	resources/profiles/Anker/filament/Generic PVA @Anker.json
#	resources/profiles/Anker/filament/Generic TPU @Anker.json
#	resources/profiles/Anker/machine/Anker M5 0.4 nozzle.json
#	resources/profiles/Anker/machine/Anker M5.json
#	resources/profiles/Anker/machine/Anker M5C 0.4 nozzle.json
#	resources/profiles/Anker/machine/Anker M5C.json
#	resources/profiles/Anker/machine/fdm_machine_common.json
#	resources/profiles/Anker/process/0.05mm Ultradetail @Anker.json
#	resources/profiles/Anker/process/0.15mm Fast @Anker.json
#	resources/profiles/Anker/process/0.20mm Fast @Anker.json
#	resources/profiles/Anker/process/0.20mm Standard @Anker.json
#	resources/profiles/Anker/process/0.25mm Fast @Anker.json
#	resources/profiles/Anker/process/fdm_process_common.json
#	resources/profiles/Anycubic.json
#	resources/profiles/Anycubic/machine/Anycubic 4Max Pro 0.4 nozzle.json
#	resources/profiles/Anycubic/machine/Anycubic 4Max Pro 2 0.4 nozzle.json
#	resources/profiles/Anycubic/machine/Anycubic 4Max Pro 2.json
#	resources/profiles/Anycubic/machine/Anycubic 4Max Pro.json
#	resources/profiles/Anycubic/machine/Anycubic Chiron 0.4 nozzle.json
#	resources/profiles/Anycubic/machine/Anycubic Chiron.json
#	resources/profiles/Anycubic/machine/Anycubic Kobra 2 0.4 nozzle.json
#	resources/profiles/Anycubic/machine/Anycubic Kobra Max 0.4 nozzle.json
#	resources/profiles/Anycubic/machine/Anycubic Kobra Max.json
#	resources/profiles/Anycubic/machine/Anycubic Vyper 0.4 nozzle.json
#	resources/profiles/Anycubic/machine/Anycubic Vyper.json
#	resources/profiles/Anycubic/machine/Anycubic i3 Mega S 0.4 nozzle.json
#	resources/profiles/Anycubic/machine/Anycubic i3 Mega S.json
#	resources/profiles/Anycubic/machine/fdm_machine_common.json
#	resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic 4MaxPro2.json
#	resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic Chiron.json
#	resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic Kobra2.json
#	resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic KobraMax.json
#	resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic Vyper.json
#	resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic i3MegaS.json
#	resources/profiles/Anycubic/process/0.20mm Standard @Anycubic 4MaxPro.json
#	resources/profiles/Anycubic/process/0.20mm Standard @Anycubic 4MaxPro2.json
#	resources/profiles/Anycubic/process/0.20mm Standard @Anycubic Chiron.json
#	resources/profiles/Anycubic/process/0.20mm Standard @Anycubic Kobra2.json
#	resources/profiles/Anycubic/process/0.20mm Standard @Anycubic KobraMax.json
#	resources/profiles/Anycubic/process/0.20mm Standard @Anycubic Vyper.json
#	resources/profiles/Anycubic/process/0.20mm Standard @Anycubic i3MegaS.json
#	resources/profiles/Anycubic/process/0.30mm Draft @Anycubic 4MaxPro2.json
#	resources/profiles/Anycubic/process/0.30mm Draft @Anycubic Chiron.json
#	resources/profiles/Anycubic/process/0.30mm Draft @Anycubic Kobra2.json
#	resources/profiles/Anycubic/process/0.30mm Draft @Anycubic KobraMax.json
#	resources/profiles/Anycubic/process/0.30mm Draft @Anycubic Vyper.json
#	resources/profiles/Anycubic/process/0.30mm Draft @Anycubic i3MegaS.json
#	resources/profiles/Anycubic/process/fdm_process_common.json
#	resources/profiles/BBL.json
#	resources/profiles/BBL/process/fdm_process_bbl_common.json
#	resources/profiles/Creality.json
#	resources/profiles/Creality/filament/fdm_filament_abs.json
#	resources/profiles/Creality/filament/fdm_filament_pla.json
#	resources/profiles/Creality/machine/Creality CR-10 Max 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-10 Max.json
#	resources/profiles/Creality/machine/Creality CR-10 V2 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-10 V2.json
#	resources/profiles/Creality/machine/Creality Ender-3 S1 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-3 S1 Pro 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-3 S1 Pro.json
#	resources/profiles/Creality/machine/Creality Ender-3 S1.json
#	resources/profiles/Creality/machine/Creality Ender-3 V2 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-3 V2.json
#	resources/profiles/Creality/machine/Creality Ender-5 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-5 Plus 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-5 Plus.json
#	resources/profiles/Creality/machine/Creality Ender-5 S1 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-5 S1.json
#	resources/profiles/Creality/machine/Creality Ender-5.json
#	resources/profiles/Creality/machine/Creality Ender-5S 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-5S.json
#	resources/profiles/Creality/machine/Creality Ender-6 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-6.json
#	resources/profiles/Creality/machine/fdm_creality_common.json
#	resources/profiles/Creality/machine/fdm_machine_common.json
#	resources/profiles/Creality/process/0.12mm Fine @Creality CR10Max.json
#	resources/profiles/Creality/process/0.12mm Fine @Creality Ender3V2.json
#	resources/profiles/Creality/process/0.15mm Optimal @Creality CR10Max.json
#	resources/profiles/Creality/process/0.15mm Optimal @Creality Ender3V2.json
#	resources/profiles/Creality/process/0.16mm Optimal @Creality CR10V2.json
#	resources/profiles/Creality/process/0.16mm Optimal @Creality Ender3S1.json
#	resources/profiles/Creality/process/0.16mm Optimal @Creality Ender3S1Pro.json
#	resources/profiles/Creality/process/0.16mm Optimal @Creality Ender5.json
#	resources/profiles/Creality/process/0.16mm Optimal @Creality Ender5Plus.json
#	resources/profiles/Creality/process/0.16mm Optimal @Creality Ender5S.json
#	resources/profiles/Creality/process/0.16mm Optimal @Creality Ender5S1.json
#	resources/profiles/Creality/process/0.16mm Optimal @Creality Ender6.json
#	resources/profiles/Creality/process/0.20mm Standard @Creality CR10Max.json
#	resources/profiles/Creality/process/0.20mm Standard @Creality CR10V2.json
#	resources/profiles/Creality/process/0.20mm Standard @Creality Ender3S1.json
#	resources/profiles/Creality/process/0.20mm Standard @Creality Ender3S1Pro.json
#	resources/profiles/Creality/process/0.20mm Standard @Creality Ender3V2.json
#	resources/profiles/Creality/process/0.20mm Standard @Creality Ender5.json
#	resources/profiles/Creality/process/0.20mm Standard @Creality Ender5Plus.json
#	resources/profiles/Creality/process/0.20mm Standard @Creality Ender5S.json
#	resources/profiles/Creality/process/0.20mm Standard @Creality Ender5S1.json
#	resources/profiles/Creality/process/0.20mm Standard @Creality Ender6.json
#	resources/profiles/Creality/process/0.24mm Draft @Creality CR10Max.json
#	resources/profiles/Creality/process/0.24mm Draft @Creality Ender3V2.json
#	resources/profiles/Creality/process/0.24mm Draft @Creality.json
#	resources/profiles/Creality/process/fdm_process_creality_common.json
#	resources/profiles/Custom/filament/My Generic PETG.json
#	resources/profiles/Custom/filament/My Generic PLA.json
#	resources/profiles/Elegoo.json
#	resources/profiles/Elegoo/filament/fdm_filament_common.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 2 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 2.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 2D 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 2D.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 2S 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 2S.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 Max 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 Max.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 Plus 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 Plus.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 Pro 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 Pro.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune X 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune X.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune.json
#	resources/profiles/Elegoo/machine/fdm_machine_common.json
#	resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune.json
#	resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune2.json
#	resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune2D.json
#	resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune2S.json
#	resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune3.json
#	resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune3Max.json
#	resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune3Plus.json
#	resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune3Pro.json
#	resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo NeptuneX.json
#	resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune.json
#	resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune2.json
#	resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune2D.json
#	resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune2S.json
#	resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune3.json
#	resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune3Max.json
#	resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune3Plus.json
#	resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune3Pro.json
#	resources/profiles/Elegoo/process/0.12mm Fine @Elegoo NeptuneX.json
#	resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune.json
#	resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune2.json
#	resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune2D.json
#	resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune2S.json
#	resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune3.json
#	resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune3Max.json
#	resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune3Plus.json
#	resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune3Pro.json
#	resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo NeptuneX.json
#	resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune.json
#	resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune2.json
#	resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune2D.json
#	resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune2S.json
#	resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune3.json
#	resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune3Max.json
#	resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune3Plus.json
#	resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune3Pro.json
#	resources/profiles/Elegoo/process/0.20mm Standard @Elegoo NeptuneX.json
#	resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune.json
#	resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune2.json
#	resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune2D.json
#	resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune2S.json
#	resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune3.json
#	resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune3Max.json
#	resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune3Plus.json
#	resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune3Pro.json
#	resources/profiles/Elegoo/process/0.24mm Draft @Elegoo NeptuneX.json
#	resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune.json
#	resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune2.json
#	resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune2D.json
#	resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune2S.json
#	resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune3.json
#	resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune3Max.json
#	resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune3Plus.json
#	resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune3Pro.json
#	resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo NeptuneX.json
#	resources/profiles/Prusa.json
#	resources/profiles/Prusa/filament/fdm_filament_common.json
#	resources/profiles/Prusa/machine/Prusa MINI 0.4 nozzle.json
#	resources/profiles/Prusa/machine/Prusa MINI.json
#	resources/profiles/Prusa/machine/Prusa MK3S 0.4 nozzle.json
#	resources/profiles/Prusa/machine/Prusa MK3S.json
#	resources/profiles/Prusa/machine/fdm_machine_common.json
#	resources/profiles/Prusa/process/0.20mm Standard @MINI.json
#	resources/profiles/Prusa/process/0.20mm Standard @MK3S.json
#	resources/profiles/Qidi.json
#	resources/profiles/Qidi/filament/fdm_filament_abs.json
#	resources/profiles/Qidi/filament/fdm_filament_asa.json
#	resources/profiles/Qidi/filament/fdm_filament_common.json
#	resources/profiles/Qidi/filament/fdm_filament_pa.json
#	resources/profiles/Qidi/filament/fdm_filament_pc.json
#	resources/profiles/Qidi/filament/fdm_filament_pet.json
#	resources/profiles/Qidi/filament/fdm_filament_pla.json
#	resources/profiles/Qidi/filament/fdm_filament_pva.json
#	resources/profiles/Qidi/filament/fdm_filament_tpu.json
#	resources/profiles/Qidi/machine/Qidi X-CF Pro 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-CF Pro.json
#	resources/profiles/Qidi/machine/Qidi X-Max 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-Max 3 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-Max 3.json
#	resources/profiles/Qidi/machine/Qidi X-Max.json
#	resources/profiles/Qidi/machine/Qidi X-Plus 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-Plus 3 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-Plus 3.json
#	resources/profiles/Qidi/machine/Qidi X-Plus.json
#	resources/profiles/Qidi/machine/Qidi X-Smart 3 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-Smart 3.json
#	resources/profiles/Qidi/machine/fdm_machine_common.json
#	resources/profiles/Qidi/machine/fdm_qidi_common.json
#	resources/profiles/Qidi/machine/fdm_qidi_x3_common.json
#	resources/profiles/Qidi/process/0.12mm Fine @Qidi XCFPro.json
#	resources/profiles/Qidi/process/0.12mm Fine @Qidi XMax.json
#	resources/profiles/Qidi/process/0.12mm Fine @Qidi XMax3.json
#	resources/profiles/Qidi/process/0.12mm Fine @Qidi XPlus.json
#	resources/profiles/Qidi/process/0.12mm Fine @Qidi XPlus3.json
#	resources/profiles/Qidi/process/0.12mm Fine @Qidi XSmart3.json
#	resources/profiles/Qidi/process/0.16mm Optimal @Qidi XCFPro.json
#	resources/profiles/Qidi/process/0.16mm Optimal @Qidi XMax.json
#	resources/profiles/Qidi/process/0.16mm Optimal @Qidi XMax3.json
#	resources/profiles/Qidi/process/0.16mm Optimal @Qidi XPlus.json
#	resources/profiles/Qidi/process/0.16mm Optimal @Qidi XPlus3.json
#	resources/profiles/Qidi/process/0.16mm Optimal @Qidi XSmart3.json
#	resources/profiles/Qidi/process/0.20mm Standard @Qidi XCFPro.json
#	resources/profiles/Qidi/process/0.20mm Standard @Qidi XMax.json
#	resources/profiles/Qidi/process/0.20mm Standard @Qidi XMax3.json
#	resources/profiles/Qidi/process/0.20mm Standard @Qidi XPlus.json
#	resources/profiles/Qidi/process/0.20mm Standard @Qidi XPlus3.json
#	resources/profiles/Qidi/process/0.20mm Standard @Qidi XSmart3.json
#	resources/profiles/Qidi/process/0.25mm Draft @Qidi XCFPro.json
#	resources/profiles/Qidi/process/0.25mm Draft @Qidi XMax.json
#	resources/profiles/Qidi/process/0.25mm Draft @Qidi XMax3.json
#	resources/profiles/Qidi/process/0.25mm Draft @Qidi XPlus.json
#	resources/profiles/Qidi/process/0.25mm Draft @Qidi XPlus3.json
#	resources/profiles/Qidi/process/0.25mm Draft @Qidi XSmart3.json
#	resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XCFPro.json
#	resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XMax.json
#	resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XMax3.json
#	resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XPlus.json
#	resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XPlus3.json
#	resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XSmart3.json
#	resources/profiles/Qidi/process/fdm_process_common.json
#	resources/profiles/Qidi/process/fdm_process_qidi_common.json
#	resources/profiles/Qidi/process/fdm_process_qidi_x3_common.json
#	resources/profiles/Tronxy/filament/Tronxy Generic ABS.json
#	resources/profiles/Tronxy/process/0.12mm Fine @Tronxy.json
#	resources/profiles/Tronxy/process/0.15mm Optimal @Tronxy.json
#	resources/profiles/Tronxy/process/0.20mm Standard @Tronxy.json
#	resources/profiles/Tronxy/process/0.24mm Draft @Tronxy.json
#	resources/profiles/Voron.json
#	resources/profiles/Voron/filament/Generic ABS @Voron.json
#	resources/profiles/Voron/filament/Generic ASA @Voron.json
#	resources/profiles/Voron/filament/Generic PA @Voron.json
#	resources/profiles/Voron/filament/Generic PETG @Voron.json
#	resources/profiles/Voron/filament/Generic PVA @Voron.json
#	resources/profiles/Voron/filament/Voron Generic PA-CF.json
#	resources/profiles/Voron/filament/Voron Generic PC.json
#	resources/profiles/Voron/filament/Voron Generic PLA-CF.json
#	resources/profiles/Voron/filament/Voron Generic PLA.json
#	resources/profiles/Voron/filament/Voron Generic TPU.json
#	resources/profiles/Voron/machine/Voron 0.1.json
#	resources/profiles/Voron/machine/Voron 2.4 250.json
#	resources/profiles/Voron/machine/Voron 2.4 300.json
#	resources/profiles/Voron/machine/Voron 2.4 350.json
#	resources/profiles/Voron/machine/Voron Trident 250.json
#	resources/profiles/Voron/machine/Voron Trident 300.json
#	resources/profiles/Voron/machine/Voron Trident 350.json
#	resources/profiles/Voron/process/fdm_process_voron_common.json
#	resources/profiles/Voxelab.json
#	resources/profiles/Voxelab/filament/Generic ABS @Voxelab.json
#	resources/profiles/Voxelab/filament/Generic PLA @Voxelab.json
#	resources/profiles/Voxelab/filament/fdm_filament_common.json
#	resources/profiles/Voxelab/machine/Voxelab Aquila X2 0.4 nozzle.json
#	resources/profiles/Voxelab/machine/Voxelab Aquila X2.json
#	resources/profiles/Voxelab/machine/fdm_machine_common.json
#	resources/profiles/Voxelab/process/0.16mm Optimal @Voxelab AquilaX2.json
#	resources/profiles/Voxelab/process/0.20mm Standard @Voxelab AquilaX2.json
#	resources/web/data/text.js
#	resources/web/guide/21/21.js
#	resources/web/guide/24/24.js
#	src/BaseException.cpp
#	src/OrcaSlicer.cpp
#	src/libslic3r/AppConfig.cpp
#	src/libslic3r/BoundingBox.hpp
#	src/libslic3r/Extruder.hpp
#	src/libslic3r/Fill/Fill.cpp
#	src/libslic3r/Format/bbs_3mf.cpp
#	src/libslic3r/GCode.cpp
#	src/libslic3r/GCode.hpp
#	src/libslic3r/GCode/CoolingBuffer.cpp
#	src/libslic3r/GCode/GCodeProcessor.cpp
#	src/libslic3r/GCode/GCodeProcessor.hpp
#	src/libslic3r/GCode/WipeTower.cpp
#	src/libslic3r/GCodeWriter.cpp
#	src/libslic3r/GCodeWriter.hpp
#	src/libslic3r/Model.cpp
#	src/libslic3r/PerimeterGenerator.cpp
#	src/libslic3r/Preset.cpp
#	src/libslic3r/Preset.hpp
#	src/libslic3r/PresetBundle.cpp
#	src/libslic3r/PresetBundle.hpp
#	src/libslic3r/Print.cpp
#	src/libslic3r/Print.hpp
#	src/libslic3r/PrintBase.hpp
#	src/libslic3r/PrintConfig.cpp
#	src/libslic3r/PrintConfig.hpp
#	src/libslic3r/PrintObject.cpp
#	src/libslic3r/TreeSupport.cpp
#	src/libslic3r/Utils.hpp
#	src/mcut/CMakeLists.txt
#	src/slic3r/CMakeLists.txt
#	src/slic3r/GUI/3DBed.cpp
#	src/slic3r/GUI/AMSMaterialsSetting.cpp
#	src/slic3r/GUI/AMSMaterialsSetting.hpp
#	src/slic3r/GUI/BBLTopbar.cpp
#	src/slic3r/GUI/BBLTopbar.hpp
#	src/slic3r/GUI/BackgroundSlicingProcess.hpp
#	src/slic3r/GUI/BindDialog.cpp
#	src/slic3r/GUI/ConfigManipulation.cpp
#	src/slic3r/GUI/DeviceManager.cpp
#	src/slic3r/GUI/Field.cpp
#	src/slic3r/GUI/GLCanvas3D.cpp
#	src/slic3r/GUI/GUI_App.cpp
#	src/slic3r/GUI/GUI_App.hpp
#	src/slic3r/GUI/GUI_Factories.cpp
#	src/slic3r/GUI/GUI_Factories.hpp
#	src/slic3r/GUI/GUI_ObjectList.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp
#	src/slic3r/GUI/Jobs/ArrangeJob.cpp
#	src/slic3r/GUI/Jobs/FillBedJob.cpp
#	src/slic3r/GUI/MainFrame.cpp
#	src/slic3r/GUI/MediaPlayCtrl.cpp
#	src/slic3r/GUI/Monitor.cpp
#	src/slic3r/GUI/PartPlate.cpp
#	src/slic3r/GUI/PartPlate.hpp
#	src/slic3r/GUI/PlateSettingsDialog.cpp
#	src/slic3r/GUI/PlateSettingsDialog.hpp
#	src/slic3r/GUI/Plater.cpp
#	src/slic3r/GUI/Plater.hpp
#	src/slic3r/GUI/PresetComboBoxes.cpp
#	src/slic3r/GUI/ReleaseNote.cpp
#	src/slic3r/GUI/SelectMachine.cpp
#	src/slic3r/GUI/StatusPanel.cpp
#	src/slic3r/GUI/Tab.cpp
#	src/slic3r/GUI/Widgets/Label.cpp
#	src/slic3r/GUI/Widgets/Label.hpp
#	src/slic3r/GUI/Widgets/SideButton.cpp
#	src/slic3r/GUI/calib_dlg.cpp
#	src/slic3r/GUI/calib_dlg.hpp
#	src/slic3r/GUI/wxExtensions.hpp
#	src/slic3r/Utils/NetworkAgent.cpp
#	src/slic3r/Utils/bambu_networking.hpp
#	version.inc
This commit is contained in:
SoftFever 2023-08-26 16:13:57 +08:00
commit e65b11a831
734 changed files with 72573 additions and 47919 deletions

View file

@ -2,11 +2,22 @@
#include "ImageGrid.h"
#include "I18N.hpp"
#include "GUI_App.hpp"
#include "Plater.hpp"
#include "Widgets/Button.hpp"
#include "Widgets/SwitchButton.hpp"
#include "Widgets/Label.hpp"
#include "Printer/PrinterFileSystem.h"
#include "MsgDialog.hpp"
#include "Widgets/ProgressDialog.hpp"
#include <libslic3r/Model.hpp>
#include <libslic3r/Format/bbs_3mf.hpp>
#ifdef __WXMSW__
#include <shellapi.h>
#endif
#ifdef __APPLE__
#include "../Utils/MacDarkMode.hpp"
#endif
namespace Slic3r {
namespace GUI {
@ -26,9 +37,11 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
top_sizer->SetMinSize({-1, 75 * em_unit(this) / 10});
// Time group
m_time_panel = new ::StaticBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE);
m_time_panel->SetBackgroundColor(StateColor());
m_button_year = new ::Button(m_time_panel, _L("Year"), "", wxBORDER_NONE);
auto time_panel = new wxWindow(this, wxID_ANY);
time_panel->SetBackgroundColour(0xEEEEEE);
m_time_panel = new ::StaticBox(time_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE);
m_time_panel->SetCornerRadius(0);
m_button_year = new ::Button(m_time_panel, _L("Year"), "", wxBORDER_NONE);
m_button_month = new ::Button(m_time_panel, _L("Month"), "", wxBORDER_NONE);
m_button_all = new ::Button(m_time_panel, _L("All Files"), "", wxBORDER_NONE);
m_button_year->SetToolTip(_L("Group files by year, recent first."));
@ -49,7 +62,10 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
time_sizer->Add(m_button_month, 0, wxALIGN_CENTER_VERTICAL);
time_sizer->Add(m_button_all, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 24);
m_time_panel->SetSizer(time_sizer);
top_sizer->Add(m_time_panel, 1, wxEXPAND);
wxBoxSizer *time_sizer2 = new wxBoxSizer(wxHORIZONTAL);
time_sizer2->Add(m_time_panel, 1, wxEXPAND);
time_panel->SetSizer(time_sizer2);
top_sizer->Add(time_panel, 1, wxEXPAND);
// File type
StateColor background(
@ -61,30 +77,33 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
m_type_panel->SetCornerRadius(FromDIP(5));
m_type_panel->SetMinSize({-1, 48 * em_unit(this) / 10});
m_button_timelapse = new ::Button(m_type_panel, _L("Timelapse"), "", wxBORDER_NONE);
m_button_timelapse->SetToolTip(L("Switch to timelapse files."));
m_button_timelapse->SetToolTip(_L("Switch to timelapse files."));
m_button_video = new ::Button(m_type_panel, _L("Video"), "", wxBORDER_NONE);
m_button_video->SetToolTip(L("Switch to video files."));
for (auto b : {m_button_timelapse, m_button_video} ) {
m_button_video->SetToolTip(_L("Switch to video files."));
m_button_model = new ::Button(m_type_panel, _L("Model"), "", wxBORDER_NONE);
m_button_video->SetToolTip(_L("Switch to 3mf model files."));
for (auto b : {m_button_timelapse, m_button_video, m_button_model}) {
b->SetBackgroundColor(background);
b->SetCanFocus(false);
}
wxBoxSizer *type_sizer = new wxBoxSizer(wxHORIZONTAL);
type_sizer->Add(m_button_timelapse, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 24);
type_sizer->Add(m_button_video, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 24);
//type_sizer->Add(m_button_video, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 24);
m_button_video->Hide();
type_sizer->Add(m_button_model, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 24);
m_type_panel->SetSizer(type_sizer);
m_type_panel->Hide();
// top_sizer->Add(m_type_panel, 0, wxALIGN_CENTER_VERTICAL);
top_sizer->Add(m_type_panel, 0, wxALIGN_CENTER_VERTICAL);
// File management
m_manage_panel = new ::StaticBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE);
m_manage_panel->SetBackgroundColor(StateColor());
m_button_delete = new ::Button(m_manage_panel, _L("Delete"));
m_button_delete->SetToolTip(L("Delete selected files from printer."));
m_button_delete->SetToolTip(_L("Delete selected files from printer."));
m_button_download = new ::Button(m_manage_panel, _L("Download"));
m_button_download->SetToolTip(L("Download selected files from printer."));
m_button_download->SetToolTip(_L("Download selected files from printer."));
m_button_management = new ::Button(m_manage_panel, _L("Select"));
m_button_management->SetToolTip(L("Batch manage files."));
m_button_management->SetToolTip(_L("Batch manage files."));
for (auto b : {m_button_delete, m_button_download, m_button_management}) {
b->SetFont(Label::Body_12);
b->SetCornerRadius(12);
@ -109,6 +128,7 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
sizer->Add(top_sizer, 0, wxEXPAND);
m_image_grid = new ImageGrid(this);
m_image_grid->Bind(EVT_ITEM_ACTION, [this](wxCommandEvent &e) { doAction(size_t(e.GetExtraLong()), e.GetInt()); });
m_image_grid->SetStatus(m_bmp_failed, _L("No printers."));
sizer->Add(m_image_grid, 1, wxEXPAND);
@ -130,19 +150,20 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
// File type
auto type_button_clicked = [this](wxEvent &e) {
auto type = PrinterFileSystem::F_TIMELAPSE;
auto b = dynamic_cast<Button *>(e.GetEventObject());
if (b == m_button_video)
type = PrinterFileSystem::F_VIDEO;
Button *buttons[]{m_button_timelapse, m_button_video, m_button_model};
auto type = std::find(buttons, buttons + sizeof(buttons) / sizeof(buttons[0]), e.GetEventObject()) - buttons;
if (m_last_type == type)
return;
m_image_grid->SetFileType(type);
m_image_grid->SetFileType(type, m_external ? "" : "internal");
buttons[m_last_type]->SetValue(!buttons[m_last_type]->GetValue());
m_last_type = type;
m_button_timelapse->SetValue(!m_button_timelapse->GetValue());
m_button_video->SetValue(!m_button_video->GetValue());
buttons[m_last_type]->SetValue(!buttons[m_last_type]->GetValue());
if (type == PrinterFileSystem::F_MODEL)
m_image_grid->SetGroupMode(PrinterFileSystem::G_NONE);
};
m_button_video->Bind(wxEVT_COMMAND_BUTTON_CLICKED, type_button_clicked);
m_button_timelapse->Bind(wxEVT_COMMAND_BUTTON_CLICKED, type_button_clicked);
m_button_video->Bind(wxEVT_COMMAND_BUTTON_CLICKED, type_button_clicked);
m_button_model->Bind(wxEVT_COMMAND_BUTTON_CLICKED, type_button_clicked);
m_button_timelapse->SetValue(true);
// File management
@ -161,9 +182,12 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
auto onShowHide = [this](auto &e) {
e.Skip();
if (m_isBeingDeleted) return;
auto fs = m_image_grid ? m_image_grid->GetFileSystem() : nullptr;
if (fs) IsShownOnScreen() ? fs->Start() : fs->Stop();
if (auto w = dynamic_cast<wxWindow *>(e.GetEventObject()); !w || w->IsBeingDeleted())
return;
CallAfter([this] {
auto fs = m_image_grid ? m_image_grid->GetFileSystem() : nullptr;
if (fs) IsShownOnScreen() ? fs->Start() : fs->Stop();
});
};
Bind(wxEVT_SHOW, onShowHide);
parent->GetParent()->Bind(wxEVT_SHOW, onShowHide);
@ -180,19 +204,27 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
if (obj && obj->is_function_supported(PrinterFunction::FUNC_MEDIA_FILE)) {
m_supported = true;
m_lan_mode = obj->is_lan_mode_printer();
m_lan_ip = obj->is_function_supported(PrinterFunction::FUNC_LOCAL_TUNNEL) ? obj->dev_ip : "";
m_lan_ip = obj->dev_ip;
m_lan_passwd = obj->get_access_code();
m_tutk_support = obj->is_function_supported(PrinterFunction::FUNC_REMOTE_TUNNEL);
m_local_support = obj->has_local_file_proto();
m_remote_support = obj->has_remote_file_proto();
} else {
m_supported = false;
m_lan_mode = false;
m_lan_ip.clear();
m_lan_passwd.clear();
m_tutk_support = false;
m_local_support = false;
m_remote_support = false;
}
if (machine == m_machine)
if (machine == m_machine) {
if (m_waiting_enable && IsEnabled()) {
auto fs = m_image_grid->GetFileSystem();
if (fs) fs->Retry();
}
return;
}
m_machine = machine;
m_last_errors.clear();
auto fs = m_image_grid->GetFileSystem();
if (fs) {
m_image_grid->SetFileSystem(nullptr);
@ -204,17 +236,19 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
if (m_machine.empty()) {
m_image_grid->SetStatus(m_bmp_failed, _L("No printers."));
} else if (!m_supported) {
m_image_grid->SetStatus(m_bmp_failed, _L("Not supported by this model of printer!"));
m_image_grid->SetStatus(m_bmp_failed, _L("Initialize failed (Not supported on the current printer version)!"));
} else {
boost::shared_ptr<PrinterFileSystem> fs(new PrinterFileSystem);
fs->Attached();
m_image_grid->SetFileType(m_last_type);
m_image_grid->SetFileSystem(fs);
m_image_grid->SetFileType(m_last_type, m_external ? "" : "internal");
fs->Bind(EVT_FILE_CHANGED, [this, wfs = boost::weak_ptr(fs)](auto &e) {
e.Skip();
boost::shared_ptr fs(wfs.lock());
if (m_image_grid->GetFileSystem() != fs) // canceled
if (fs == nullptr || m_image_grid->GetFileSystem() != fs) // canceled
return;
m_time_panel->Show(fs->GetFileType() < PrinterFileSystem::F_MODEL);
//m_manage_panel->Show(fs->GetFileType() < PrinterFileSystem::F_MODEL);
m_button_management->Enable(fs->GetCount() > 0);
if (fs->GetCount() == 0)
SetSelecting(false);
@ -222,7 +256,7 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
fs->Bind(EVT_SELECT_CHANGED, [this, wfs = boost::weak_ptr(fs)](auto &e) {
e.Skip();
boost::shared_ptr fs(wfs.lock());
if (m_image_grid->GetFileSystem() != fs) // canceled
if (fs == nullptr || m_image_grid->GetFileSystem() != fs) // canceled
return;
m_button_delete->Enable(e.GetInt() > 0);
m_button_download->Enable(e.GetInt() > 0);
@ -231,31 +265,34 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
fs->Bind(EVT_STATUS_CHANGED, [this, wfs = boost::weak_ptr(fs)](auto& e) {
e.Skip();
boost::shared_ptr fs(wfs.lock());
if (m_image_grid->GetFileSystem() != fs) // canceled
if (fs == nullptr || m_image_grid->GetFileSystem() != fs) // canceled
return;
ScalableBitmap icon;
wxString msg;
int status = e.GetInt();
int extra = e.GetExtraLong();
switch (status) {
case PrinterFileSystem::Initializing: icon = m_bmp_loading; msg = _L("Initializing..."); break;
case PrinterFileSystem::Connecting: icon = m_bmp_loading; msg = _L("Connecting..."); break;
case PrinterFileSystem::Failed: icon = m_bmp_failed; msg = _L("Connect failed [%d]!"); break;
case PrinterFileSystem::Failed: icon = m_bmp_failed; if (extra != 1) msg = _L("Connect failed [%d]!"); break;
case PrinterFileSystem::ListSyncing: icon = m_bmp_loading; msg = _L("Loading file list..."); break;
case PrinterFileSystem::ListReady: icon = m_bmp_empty; msg = _L("No files"); break;
case PrinterFileSystem::ListReady: icon = extra == 0 ? m_bmp_empty : m_bmp_failed; msg = extra == 0 ? _L("No files [%d]") : _L("Load failed [%d]"); break;
}
if (fs->GetCount() == 0)
if (!e.GetString().IsEmpty()) msg = _L(e.GetString());
if (fs->GetCount() == 0 && !msg.empty())
m_image_grid->SetStatus(icon, msg);
if (e.GetInt() == PrinterFileSystem::Initializing)
fetchUrl(boost::weak_ptr(fs));
if (status == PrinterFileSystem::Failed
|| status == PrinterFileSystem::ListReady) {
int err = fs->GetLastError();
if ((status == PrinterFileSystem::Failed && m_last_errors.find(err) == m_last_errors.end()) ||
status == PrinterFileSystem::ListReady) {
json j;
j["code"] = fs->GetLastError();
j["code"] = err;
j["dev_id"] = m_machine;
j["dev_ip"] = m_lan_ip;
NetworkAgent* agent = wxGetApp().getAgent();
if (status == PrinterFileSystem::Failed) {
if (status == PrinterFileSystem::Failed && err != 0) {
j["result"] = "failed";
if (agent)
agent->track_event("download_video_conn", j.dump());
@ -264,12 +301,13 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
if (agent)
agent->track_event("download_video_conn", j.dump());
}
m_last_errors.insert(fs->GetLastError());
}
});
fs->Bind(EVT_DOWNLOAD, [this, wfs = boost::weak_ptr(fs)](auto& e) {
e.Skip();
boost::shared_ptr fs(wfs.lock());
if (m_image_grid->GetFileSystem() != fs) // canceled
if (fs == nullptr || m_image_grid->GetFileSystem() != fs) // canceled
return;
int result = e.GetExtraLong();
@ -301,6 +339,22 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
modeChanged(e);
}
void MediaFilePanel::SwitchStorage(bool external)
{
if (m_external == external)
return;
m_external = external;
m_type_panel->Show(external);
if (!external) {
Button *buttons[]{m_button_timelapse, m_button_video, m_button_model};
auto button = buttons[PrinterFileSystem::F_MODEL];
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
event.SetEventObject(button);
wxPostEvent(button, event);
}
m_image_grid->SetFileType(m_last_type, m_external ? "" : "internal");
}
void MediaFilePanel::Rescale()
{
m_bmp_loading.msw_rescale();
@ -315,6 +369,7 @@ void MediaFilePanel::Rescale()
m_button_video->Rescale();
m_button_timelapse->Rescale();
m_button_model->Rescale();
m_type_panel->SetMinSize({-1, 48 * em_unit(this) / 10});
m_button_download->Rescale();
@ -354,17 +409,31 @@ void MediaFilePanel::fetchUrl(boost::weak_ptr<PrinterFileSystem> wfs)
{
boost::shared_ptr fs(wfs.lock());
if (!fs || fs != m_image_grid->GetFileSystem()) return;
if (!m_lan_ip.empty()) {
if (!IsEnabled()) {
m_waiting_enable = true;
m_image_grid->SetStatus(m_bmp_failed, _L("Initialize failed (Device connection not ready)!"));
fs->SetUrl("0");
return;
}
m_waiting_enable = false;
if (!m_local_support && !m_remote_support) {
m_image_grid->SetStatus(m_bmp_failed, _L("Initialize failed (Not supported on the current printer version)!"));
fs->SetUrl("0");
return;
}
if ((m_lan_mode || !m_remote_support) && m_local_support && !m_lan_ip.empty()) {
std::string url = "bambu:///local/" + m_lan_ip + ".?port=6000&user=" + m_lan_user + "&passwd=" + m_lan_passwd;
fs->SetUrl(url);
return;
}
if (m_lan_mode ) { // not support tutk
m_image_grid->SetStatus(m_bmp_failed, _L("Not accessible in LAN-only mode!"));
if (m_lan_mode) {
m_image_grid->SetStatus(m_bmp_failed, _L("Initialize failed (Not accessible in LAN-only mode)!"));
fs->SetUrl("0");
return;
}
if (!m_tutk_support) { // not support tutk
m_image_grid->SetStatus(m_bmp_failed, _L("Missing LAN ip of printer!"));
if (!m_remote_support && m_local_support) { // not support tutk
m_image_grid->SetStatus(m_bmp_failed, _L("Initialize failed (Missing LAN ip of printer)!"));
fs->SetUrl("1");
return;
}
NetworkAgent *agent = wxGetApp().getAgent();
@ -375,15 +444,138 @@ void MediaFilePanel::fetchUrl(boost::weak_ptr<PrinterFileSystem> wfs)
CallAfter([this, url, wfs] {
boost::shared_ptr fs(wfs.lock());
if (!fs || fs != m_image_grid->GetFileSystem()) return;
if (boost::algorithm::starts_with(url, "bambu:///"))
if (boost::algorithm::starts_with(url, "bambu:///")) {
fs->SetUrl(url);
else
m_image_grid->SetStatus(m_bmp_failed, url.empty() ? _L("Network unreachable") : from_u8(url));
} else {
m_image_grid->SetStatus(m_bmp_failed, wxString::Format(_L("Initialize failed (%s)!"), url.empty() ? _L("Network unreachable") : from_u8(url)));
fs->SetUrl("3");
}
});
});
}
}
struct MediaProgressDialog : ProgressDialog
{
MediaProgressDialog(wxString title, wxWindow * parent, std::function<void()> cancel)
: ProgressDialog(title, "", 100, parent, wxPD_NO_PROGRESS | wxPD_APP_MODAL | wxPD_CAN_ABORT)
, m_cancel(cancel) {}
void OnCancel() override{m_cancel(); }
std::function<void()> m_cancel;
};
void MediaFilePanel::doAction(size_t index, int action)
{
auto fs = m_image_grid->GetFileSystem();
if (action == 0) {
if (index == -1) {
MessageDialog dlg(this,
wxString::Format(_L_PLURAL("You are going to delete %u file from printer. Are you sure to continue?",
"You are going to delete %u files from printer. Are you sure to continue?", fs->GetSelectCount()),
fs->GetSelectCount()),
_L("Delete files"), wxYES_NO | wxICON_WARNING);
if (dlg.ShowModal() != wxID_YES)
return;
} else {
MessageDialog dlg(this,
wxString::Format(_L("Do you want to delete the file '%s' from printer?"), from_u8(fs->GetFile(index).name)),
_L("Delete file"), wxYES_NO | wxICON_WARNING);
if (dlg.ShowModal() != wxID_YES)
return;
}
fs->DeleteFiles(index);
} else if (action == 1) {
if (fs->GetFileType() == PrinterFileSystem::F_MODEL) {
if (index != -1) {
auto dlg = new MediaProgressDialog(_L("Print"), this, [fs] { fs->FetchModelCancel(); });
dlg->Update(0, _L("Fetching model infomations ..."));
fs->FetchModel(index, [this, fs, dlg, index](int result, std::string const &data) {
dlg->Destroy();
if (result == PrinterFileSystem::ERROR_CANCEL)
return;
if (result != 0) {
MessageDialog(this,
_L("Failed to fetching model infomations from printer."),
_L("Error"), wxOK).ShowModal();
return;
}
Slic3r::DynamicPrintConfig config;
Slic3r::Model model;
Slic3r::PlateDataPtrs plate_data_list;
Slic3r::Semver file_version;
std::istringstream is(data);
if (!Slic3r::load_gcode_3mf_from_stream(is, &config, &model, &plate_data_list, &file_version)
|| plate_data_list.empty()) {
MessageDialog(this,
_L("Failed to parse model infomations."),
_L("Error"), wxOK).ShowModal();
return;
}
auto &file = fs->GetFile(index);
int gcode_file_count = Slic3r::GUI::wxGetApp().plater()->update_print_required_data(config, model, plate_data_list, from_u8(file.name).ToStdString(), file.path);
if (gcode_file_count > 0) {
wxPostEvent(Slic3r::GUI::wxGetApp().plater(), SimpleEvent(EVT_PRINT_FROM_SDCARD_VIEW));
}
else {
MessageDialog dlg(this, _L("The .gcode.3mf file contains no G-code data.Please slice it whthBambu Studio and export a new .gcode.3mf file."), wxEmptyString, wxICON_WARNING | wxOK);
auto res = dlg.ShowModal();
}
});
return;
}
}
if (index != -1) {
auto &file = fs->GetFile(index);
if (file.IsDownload() && file.DownloadProgress() >= -1) {
if (!file.local_path.empty()) {
if (!fs->DownloadCheckFile(index)) {
MessageDialog(this,
wxString::Format(_L("File '%s' was lost! Please download it again."), from_u8(file.name)),
_L("Error"), wxOK).ShowModal();
Refresh();
return;
}
#ifdef __WXMSW__
auto wfile = boost::filesystem::path(file.local_path).wstring();
SHELLEXECUTEINFO info{sizeof(info), 0, NULL, NULL, wfile.c_str(), L"", SW_HIDE};
::ShellExecuteEx(&info);
#else
wxShell("open " + file.local_path);
#endif
} else {
fs->DownloadCancel(index);
}
return;
}
}
fs->DownloadFiles(index, wxGetApp().app_config->get("download_path"));
} else if (action == 2) {
if (index != -1) {
auto &file = fs->GetFile(index);
if (file.IsDownload() && file.DownloadProgress() >= -1) {
if (!file.local_path.empty()) {
if (!fs->DownloadCheckFile(index)) {
MessageDialog(this,
wxString::Format(_L("File '%s' was lost! Please download it again."), from_u8(file.name)),
_L("Error"), wxOK).ShowModal();
Refresh();
return;
}
desktop_open_any_folder(file.local_path);
} else if (fs->GetFileType() == PrinterFileSystem::F_MODEL) {
fs->DownloadCancel(index);
}
return;
}
}
fs->DownloadFiles(index, wxGetApp().app_config->get("download_path"));
}
}
MediaFileFrame::MediaFileFrame(wxWindow* parent)
: DPIFrame(parent, wxID_ANY, "Media Files", wxDefaultPosition, { 1600, 900 })
{