ENH:is_bbl_3mf pointer should determine if it is empty
jira: STUDIO-11031 Change-Id: I14c6daeb275a82d019f88246b23013163a14ded1
This commit is contained in:
parent
b48d52feeb
commit
aa7fbd4926
|
@ -930,8 +930,9 @@ bool load_amf_file(const char *path, DynamicPrintConfig *config, ConfigSubstitut
|
|||
|
||||
if (result)
|
||||
ctx.endDocument();
|
||||
|
||||
*use_inches = ctx.m_use_inches;
|
||||
if (use_inches) {
|
||||
*use_inches = ctx.m_use_inches;
|
||||
}
|
||||
|
||||
for (ModelObject* o : model->objects)
|
||||
{
|
||||
|
@ -1009,7 +1010,9 @@ bool extract_model_from_archive(mz_zip_archive& archive, const mz_zip_archive_fi
|
|||
}
|
||||
|
||||
ctx.endDocument();
|
||||
*use_inches = ctx.m_use_inches;
|
||||
if (use_inches) {
|
||||
*use_inches = ctx.m_use_inches;
|
||||
}
|
||||
//if (check_version && (ctx.m_version > VERSION_AMF_COMPATIBLE))
|
||||
//{
|
||||
// std::string msg = _(L("The selected amf file has been saved with a newer version of " + std::string(SLIC3R_APP_NAME) + " and is not compatible."));
|
||||
|
|
|
@ -1067,7 +1067,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
//BBS: add plate data related logic
|
||||
// add backup & restore logic
|
||||
bool load_model_from_file(const std::string& filename, Model& model, PlateDataPtrs& plate_data_list, std::vector<Preset*>& project_presets, DynamicPrintConfig& config,
|
||||
ConfigSubstitutionContext& config_substitutions, LoadStrategy strategy, bool& is_bbl_3mf, Semver& file_version, Import3mfProgressFn proFn = nullptr, BBLProject *project = nullptr, int plate_id = 0);
|
||||
ConfigSubstitutionContext& config_substitutions, LoadStrategy strategy, bool* is_bbl_3mf, Semver& file_version, Import3mfProgressFn proFn = nullptr, BBLProject *project = nullptr, int plate_id = 0);
|
||||
bool get_thumbnail(const std::string &filename, std::string &data);
|
||||
bool load_gcode_3mf_from_stream(std::istream & data, Model& model, PlateDataPtrs& plate_data_list, DynamicPrintConfig& config, Semver& file_version);
|
||||
unsigned int version() const { return m_version; }
|
||||
|
@ -1274,7 +1274,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
//BBS: add plate data related logic
|
||||
// add backup & restore logic
|
||||
bool _BBS_3MF_Importer::load_model_from_file(const std::string& filename, Model& model, PlateDataPtrs& plate_data_list, std::vector<Preset*>& project_presets, DynamicPrintConfig& config,
|
||||
ConfigSubstitutionContext& config_substitutions, LoadStrategy strategy, bool& is_bbl_3mf, Semver& file_version, Import3mfProgressFn proFn, BBLProject *project, int plate_id)
|
||||
ConfigSubstitutionContext& config_substitutions, LoadStrategy strategy, bool* is_bbl_3mf, Semver& file_version, Import3mfProgressFn proFn, BBLProject *project, int plate_id)
|
||||
{
|
||||
m_version = 0;
|
||||
m_fdm_supports_painting_version = 0;
|
||||
|
@ -1327,7 +1327,9 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
m_backup_path = model.get_backup_path();
|
||||
}
|
||||
bool result = _load_model_from_file(filename, model, plate_data_list, project_presets, config, config_substitutions, proFn, project, plate_id);
|
||||
is_bbl_3mf = m_is_bbl_3mf;
|
||||
if (is_bbl_3mf) {
|
||||
*is_bbl_3mf = m_is_bbl_3mf;
|
||||
}
|
||||
if (m_bambuslicer_generator_version)
|
||||
file_version = *m_bambuslicer_generator_version;
|
||||
// save for restore
|
||||
|
@ -8518,7 +8520,7 @@ bool load_bbs_3mf(const char* path, DynamicPrintConfig* config, ConfigSubstituti
|
|||
// All import should use "C" locales for number formatting.
|
||||
CNumericLocalesSetter locales_setter;
|
||||
_BBS_3MF_Importer importer;
|
||||
bool res = importer.load_model_from_file(path, *model, *plate_data_list, *project_presets, *config, *config_substitutions, strategy, *is_bbl_3mf, *file_version, proFn, project, plate_id);
|
||||
bool res = importer.load_model_from_file(path, *model, *plate_data_list, *project_presets, *config, *config_substitutions, strategy, is_bbl_3mf, *file_version, proFn, project, plate_id);
|
||||
importer.log_errors();
|
||||
//BBS: remove legacy project logic currently
|
||||
//handle_legacy_project_loaded(importer.version(), *config);
|
||||
|
|
Loading…
Reference in New Issue