mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 00:07:52 -06:00
write Orca version into 3mf project file
This commit is contained in:
parent
22d3c713fb
commit
e187ada1e9
1 changed files with 5 additions and 5 deletions
|
@ -1720,7 +1720,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
//BBS: version check
|
||||
bool dont_load_config = !m_load_config;
|
||||
if (m_bambuslicer_generator_version) {
|
||||
Semver app_version = *(Semver::parse(SLIC3R_VERSION));
|
||||
Semver app_version = *(Semver::parse(SoftFever_VERSION));
|
||||
Semver file_version = *m_bambuslicer_generator_version;
|
||||
if (file_version.maj() != app_version.maj())
|
||||
dont_load_config = true;
|
||||
|
@ -3638,7 +3638,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
}*/
|
||||
} else if (m_curr_metadata_name == BBL_APPLICATION_TAG) {
|
||||
// Generator application of the 3MF.
|
||||
// SLIC3R_APP_KEY - SLIC3R_VERSION
|
||||
// SLIC3R_APP_KEY - SoftFever_VERSION
|
||||
if (boost::starts_with(m_curr_characters, "BambuStudio-")) {
|
||||
m_is_bbl_3mf = true;
|
||||
m_bambuslicer_generator_version = Semver::parse(m_curr_characters.substr(12));
|
||||
|
@ -6380,7 +6380,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
metadata_item_map[BBL_CREATION_DATE_TAG] = date;
|
||||
metadata_item_map[BBL_MODIFICATION_TAG] = date;
|
||||
//SoftFever: write BambuStudio tag to keep it compatible
|
||||
metadata_item_map[BBL_APPLICATION_TAG] = (boost::format("%1%-%2%") % "BambuStudio" % SLIC3R_VERSION).str();
|
||||
metadata_item_map[BBL_APPLICATION_TAG] = (boost::format("%1%-%2%") % "BambuStudio" % SoftFever_VERSION).str();
|
||||
}
|
||||
metadata_item_map[BBS_3MF_VERSION] = std::to_string(VERSION_BBS_3MF);
|
||||
|
||||
|
@ -7197,7 +7197,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
{
|
||||
const std::string& temp_path = model.get_backup_path();
|
||||
std::string temp_file = temp_path + std::string("/") + "_temp_1.config";
|
||||
config.save_to_json(temp_file, std::string("project_settings"), std::string("project"), std::string(SLIC3R_VERSION));
|
||||
config.save_to_json(temp_file, std::string("project_settings"), std::string("project"), std::string(SoftFever_VERSION));
|
||||
return _add_file_to_archive(archive, BBS_PROJECT_CONFIG_FILE, temp_file);
|
||||
}
|
||||
|
||||
|
@ -7538,7 +7538,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
// save slice header for debug
|
||||
stream << " <" << SLICE_HEADER_TAG << ">\n";
|
||||
stream << " <" << SLICE_HEADER_ITEM_TAG << " " << KEY_ATTR << "=\"" << "X-BBL-Client-Type" << "\" " << VALUE_ATTR << "=\"" << "slicer" << "\"/>\n";
|
||||
stream << " <" << SLICE_HEADER_ITEM_TAG << " " << KEY_ATTR << "=\"" << "X-BBL-Client-Version" << "\" " << VALUE_ATTR << "=\"" << convert_to_full_version(SLIC3R_VERSION) << "\"/>\n";
|
||||
stream << " <" << SLICE_HEADER_ITEM_TAG << " " << KEY_ATTR << "=\"" << "X-BBL-Client-Version" << "\" " << VALUE_ATTR << "=\"" << convert_to_full_version(SoftFever_VERSION) << "\"/>\n";
|
||||
stream << " </" << SLICE_HEADER_TAG << ">\n";
|
||||
|
||||
for (unsigned int i = 0; i < (unsigned int)plate_data_list.size(); ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue