mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-12 18:31:18 +00:00
* feat(preset): pack bed texture and model into printer bundles Export copies bed_custom_texture and bed_custom_model into the .orca_printer zip under bed/. The manifest lists them in printer_asset. Import extracts each file into the bundle folder and rewrites the preset to that path. A missing file is skipped. A path that leaves the bundle directory is rejected. An old bundle with no printer_asset imports as before. * Add includes flagged by clang-tidy misc-include-cleaner * Gate bed asset packing on an export checkbox and key printer_asset per printer The Export Configs checkbox can leave a custom bed out of a shared printer bundle. printer_asset is keyed by each printer_config zip entry, with files under bed/<n>/, so a later multi-printer bundle does not need a second manifest. The unshipped flat printer_asset object is not read. --------- Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
21 lines
688 B
C++
21 lines
688 B
C++
#pragma once
|
|
|
|
#include "miniz_extension.hpp"
|
|
|
|
#include <miniz.h>
|
|
|
|
#include <nlohmann/json_fwd.hpp>
|
|
#include <string>
|
|
|
|
namespace Slic3r {
|
|
|
|
class DynamicPrintConfig;
|
|
|
|
// Not on PresetBundle.hpp: miniz.h's zlib-compat macros rename GUI methods (GLTexture::Compressor::compress).
|
|
// printer_config_entry is the zip name also pushed onto bundle_structure["printer_config"].
|
|
// printer_index is that entry's 0-based index in the exported printer_config list.
|
|
bool append_printer_bed_assets(mz_zip_archive &zip, const DynamicPrintConfig &config, nlohmann::json &bundle_structure,
|
|
const std::string &printer_config_entry, int printer_index);
|
|
|
|
} // namespace Slic3r
|