mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
ENH: Ignore Not Exist Profile Json
JIRA: none Change-Id: Ied94cdadf0097b819328284cbc773ffe3c47d32b (cherry picked from commit a081818b0c03170e749ae1461c57e24dae75bc94)
This commit is contained in:
parent
17d08aec41
commit
f1cba23976
1 changed files with 8 additions and 0 deletions
|
@ -1169,6 +1169,8 @@ int GuideFrame::LoadProfileFamily(std::string strVendor, std::string strFilePath
|
||||||
std::string s2 = OneModel["sub_path"];
|
std::string s2 = OneModel["sub_path"];
|
||||||
|
|
||||||
boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
||||||
|
if (!boost::filesystem::exists(sub_path)) continue;
|
||||||
|
|
||||||
std::string sub_file = sub_path.string();
|
std::string sub_file = sub_path.string();
|
||||||
|
|
||||||
// wxLogMessage("GUIDE: json_path2 %s", w2s(ModelFilePath));
|
// wxLogMessage("GUIDE: json_path2 %s", w2s(ModelFilePath));
|
||||||
|
@ -1211,6 +1213,8 @@ int GuideFrame::LoadProfileFamily(std::string strVendor, std::string strFilePath
|
||||||
|
|
||||||
// wxString ModelFilePath = wxString::Format("%s\\%s\\%s", strFolder, strVendor, s2);
|
// wxString ModelFilePath = wxString::Format("%s\\%s\\%s", strFolder, strVendor, s2);
|
||||||
boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
||||||
|
if (!boost::filesystem::exists(sub_path)) continue;
|
||||||
|
|
||||||
std::string sub_file = sub_path.string();
|
std::string sub_file = sub_path.string();
|
||||||
LoadFile(sub_file, contents);
|
LoadFile(sub_file, contents);
|
||||||
json pm = json::parse(contents);
|
json pm = json::parse(contents);
|
||||||
|
@ -1252,6 +1256,8 @@ int GuideFrame::LoadProfileFamily(std::string strVendor, std::string strFilePath
|
||||||
if (!m_ProfileJson["filament"].contains(s1)) {
|
if (!m_ProfileJson["filament"].contains(s1)) {
|
||||||
// wxString ModelFilePath = wxString::Format("%s\\%s\\%s", strFolder, strVendor, s2);
|
// wxString ModelFilePath = wxString::Format("%s\\%s\\%s", strFolder, strVendor, s2);
|
||||||
boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
||||||
|
if (!boost::filesystem::exists(sub_path)) continue;
|
||||||
|
|
||||||
std::string sub_file = sub_path.string();
|
std::string sub_file = sub_path.string();
|
||||||
LoadFile(sub_file, contents);
|
LoadFile(sub_file, contents);
|
||||||
json pm = json::parse(contents);
|
json pm = json::parse(contents);
|
||||||
|
@ -1312,6 +1318,8 @@ int GuideFrame::LoadProfileFamily(std::string strVendor, std::string strFilePath
|
||||||
std::string s2 = OneProcess["sub_path"];
|
std::string s2 = OneProcess["sub_path"];
|
||||||
// wxString ModelFilePath = wxString::Format("%s\\%s\\%s", strFolder, strVendor, s2);
|
// wxString ModelFilePath = wxString::Format("%s\\%s\\%s", strFolder, strVendor, s2);
|
||||||
boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
||||||
|
if (!boost::filesystem::exists(sub_path)) continue;
|
||||||
|
|
||||||
std::string sub_file = sub_path.string();
|
std::string sub_file = sub_path.string();
|
||||||
LoadFile(sub_file, contents);
|
LoadFile(sub_file, contents);
|
||||||
json pm = json::parse(contents);
|
json pm = json::parse(contents);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue