NEW: pass design info to PrintJob
Change-Id: Ic24462324b389e20647620366a5fe2b53bb4c1ce Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
d833ab1546
commit
b1fbdaf61c
|
@ -22,6 +22,9 @@ struct ThumbnailData;
|
|||
#define EMBEDDED_FILAMENT_FILE_FORMAT "Metadata/filament_settings_%1%.config"
|
||||
#define EMBEDDED_PRINTER_FILE_FORMAT "Metadata/machine_settings_%1%.config"
|
||||
|
||||
#define BBL_DESIGNER_PROFILE_ID_TAG "DesignProfileId"
|
||||
#define BBL_DESIGNER_MODEL_ID_TAG "DesignModelId"
|
||||
|
||||
|
||||
//BBS: define assistant struct to store temporary variable during exporting 3mf
|
||||
class PackingTemporaryData
|
||||
|
|
|
@ -161,6 +161,23 @@ void PrintJob::process()
|
|||
params.ams_mapping_info = this->task_ams_mapping_info;
|
||||
params.connection_type = this->connection_type;
|
||||
params.task_use_ams = this->task_use_ams;
|
||||
if (wxGetApp().model().model_info && wxGetApp().model().model_info.get()) {
|
||||
ModelInfo* model_info = wxGetApp().model().model_info.get();
|
||||
auto origin_profile_id = model_info->metadata_items.find(BBL_DESIGNER_PROFILE_ID_TAG);
|
||||
if (origin_profile_id != model_info->metadata_items.end()) {
|
||||
try {
|
||||
params.origin_profile_id = stoi(origin_profile_id->second.c_str());
|
||||
}
|
||||
catch(...) {}
|
||||
}
|
||||
auto origin_model_id = model_info->metadata_items.find(BBL_DESIGNER_MODEL_ID_TAG);
|
||||
if (origin_model_id != model_info->metadata_items.end()) {
|
||||
try {
|
||||
params.origin_model_id = origin_model_id->second;
|
||||
}
|
||||
catch(...) {}
|
||||
}
|
||||
}
|
||||
|
||||
// local print access
|
||||
params.dev_ip = m_dev_ip;
|
||||
|
|
Loading…
Reference in New Issue