mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-14 04:35:59 +08:00
ENH: also load config when opening 3mf with higher version
just give an hint to user jira: STUDIO-11475 Change-Id: Idc6241d876133e3ee5309d7f0113cf687a5316d6
This commit is contained in:
parent
7ac47daa69
commit
ec3d5e8151
@ -1760,8 +1760,8 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||||||
if (m_bambuslicer_generator_version) {
|
if (m_bambuslicer_generator_version) {
|
||||||
Semver app_version = *(Semver::parse(SLIC3R_VERSION));
|
Semver app_version = *(Semver::parse(SLIC3R_VERSION));
|
||||||
Semver file_version = *m_bambuslicer_generator_version;
|
Semver file_version = *m_bambuslicer_generator_version;
|
||||||
if (file_version.maj() > app_version.maj())
|
/* if (file_version.maj() > app_version.maj())
|
||||||
dont_load_config = true;
|
dont_load_config = true;*/
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_bambuslicer_generator_version = Semver::parse("0.0.0.0");
|
m_bambuslicer_generator_version = Semver::parse("0.0.0.0");
|
||||||
|
@ -786,10 +786,10 @@ bool PresetBundle::import_json_presets(PresetsConfigSubstitutions & s
|
|||||||
boost::optional<Semver> version = Semver::parse(version_str);
|
boost::optional<Semver> version = Semver::parse(version_str);
|
||||||
if (!version) return false;
|
if (!version) return false;
|
||||||
Semver app_version = *(Semver::parse(SLIC3R_VERSION));
|
Semver app_version = *(Semver::parse(SLIC3R_VERSION));
|
||||||
if (version->maj() > app_version.maj()) {
|
/*if (version->maj() > app_version.maj()) {
|
||||||
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << " Preset incompatibla, not loading: " << name;
|
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << " Preset incompatibla, not loading: " << name;
|
||||||
return false;
|
return false;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
PresetCollection *collection = nullptr;
|
PresetCollection *collection = nullptr;
|
||||||
if (config.has("printer_settings_id"))
|
if (config.has("printer_settings_id"))
|
||||||
|
@ -5255,7 +5255,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
|||||||
}
|
}
|
||||||
else if (load_config && (file_version.maj() > app_version.maj())) {
|
else if (load_config && (file_version.maj() > app_version.maj())) {
|
||||||
// version mismatch, only load geometries
|
// version mismatch, only load geometries
|
||||||
load_config = false;
|
//load_config = false;
|
||||||
if (!load_model) {
|
if (!load_model) {
|
||||||
// only load config case, return directly
|
// only load config case, return directly
|
||||||
show_info(q, _L("The Config can not be loaded."), _L("Load 3mf"));
|
show_info(q, _L("The Config can not be loaded."), _L("Load 3mf"));
|
||||||
@ -5264,20 +5264,20 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
|||||||
}
|
}
|
||||||
load_old_project = true;
|
load_old_project = true;
|
||||||
// select view to 3D
|
// select view to 3D
|
||||||
q->select_view_3D("3D");
|
//q->select_view_3D("3D");
|
||||||
// select plate 0 as default
|
// select plate 0 as default
|
||||||
q->select_plate(0);
|
//q->select_plate(0);
|
||||||
if (load_type != LoadType::LoadGeometry) {
|
if (load_type != LoadType::LoadGeometry) {
|
||||||
if (en_3mf_file_type == En3mfType::From_BBS)
|
if (en_3mf_file_type == En3mfType::From_BBS)
|
||||||
show_info(q, _L("Due to the lower version of Bambu Studio, this 3mf file cannot be fully loaded. Please update Bambu Studio to the latest version"), _L("Load 3mf"));
|
show_info(q, _L("Due to the lower version of Bambu Studio, this 3mf file cannot be fully loaded. Please update Bambu Studio to the latest version"), _L("Load 3mf"));
|
||||||
else
|
else
|
||||||
show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf"));
|
show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf"));
|
||||||
}
|
}
|
||||||
for (ModelObject *model_object : model.objects) {
|
//for (ModelObject *model_object : model.objects) {
|
||||||
model_object->config.reset();
|
// model_object->config.reset();
|
||||||
// Is there any modifier or advanced config data?
|
// // Is there any modifier or advanced config data?
|
||||||
for (ModelVolume *model_volume : model_object->volumes) model_volume->config.reset();
|
// for (ModelVolume *model_volume : model_object->volumes) model_volume->config.reset();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
else if (load_config && (file_version > app_version)) {
|
else if (load_config && (file_version > app_version)) {
|
||||||
Semver cloud_ver;
|
Semver cloud_ver;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user