FIX: cli: fix the thumbnail rendering issue
1. fix the color not correct issue 2. fix the warning when loading thumbnail under cli 3. remove the invalid error log Change-Id: I4dd553b218e264bb811606053d920b5861ad6bd4
This commit is contained in:
parent
b685cbf37c
commit
2406cc35b6
|
@ -126,7 +126,7 @@ int CLI::run(int argc, char **argv)
|
||||||
BOOST_LOG_TRIVIAL(info) << "index="<< index <<", arg is "<< argv[index] <<std::endl;
|
BOOST_LOG_TRIVIAL(info) << "index="<< index <<", arg is "<< argv[index] <<std::endl;
|
||||||
int debug_argc = 9;
|
int debug_argc = 9;
|
||||||
char *debug_argv[] = {
|
char *debug_argv[] = {
|
||||||
"E:\work\projects\bambu_studio\bamboo_slicer\build\src\Debug\bambu-studio.exe",
|
"E:\work\projects\bambu_release\bamboo_slicer\build_debug\src\Debug\bambu-studio.exe",
|
||||||
"--slice",
|
"--slice",
|
||||||
"0",
|
"0",
|
||||||
"--export-3mf=output.3mf",
|
"--export-3mf=output.3mf",
|
||||||
|
@ -1330,6 +1330,13 @@ int CLI::run(int argc, char **argv)
|
||||||
unsigned char rgb_color[3] = {};
|
unsigned char rgb_color[3] = {};
|
||||||
Slic3r::GUI::BitmapCache::parse_color(color, rgb_color);
|
Slic3r::GUI::BitmapCache::parse_color(color, rgb_color);
|
||||||
glvolume_collection.volumes.back()->set_render_color( float(rgb_color[0]) / 255.f, float(rgb_color[1]) / 255.f, float(rgb_color[2]) / 255.f, 1.f);
|
glvolume_collection.volumes.back()->set_render_color( float(rgb_color[0]) / 255.f, float(rgb_color[1]) / 255.f, float(rgb_color[2]) / 255.f, 1.f);
|
||||||
|
|
||||||
|
std::array<float, 4> new_color;
|
||||||
|
new_color[0] = float(rgb_color[0]) / 255.f;
|
||||||
|
new_color[1] = float(rgb_color[1]) / 255.f;
|
||||||
|
new_color[2] = float(rgb_color[2]) / 255.f;
|
||||||
|
new_color[3] = 1.f;
|
||||||
|
glvolume_collection.volumes.back()->set_color(new_color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,7 +302,7 @@ bool OpenGLManager::init_gl()
|
||||||
BOOST_LOG_TRIVIAL(error) << "Not recognized format of version.";
|
BOOST_LOG_TRIVIAL(error) << "Not recognized format of version.";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
BOOST_LOG_TRIVIAL(error) << "Unable to parse version of AMD driver.";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "not AMD driver.";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -4137,19 +4137,19 @@ int PartPlateList::load_from_3mf_structure(PlateDataPtrs& plate_data_list)
|
||||||
gcode_result->toolpath_outside = plate_data_list[i]->toolpath_outside;
|
gcode_result->toolpath_outside = plate_data_list[i]->toolpath_outside;
|
||||||
m_plate_list[index]->slice_filaments_info = plate_data_list[i]->slice_filaments_info;
|
m_plate_list[index]->slice_filaments_info = plate_data_list[i]->slice_filaments_info;
|
||||||
gcode_result->warnings = plate_data_list[i]->warnings;
|
gcode_result->warnings = plate_data_list[i]->warnings;
|
||||||
if (!plate_data_list[i]->thumbnail_file.empty()) {
|
if (m_plater && !plate_data_list[i]->thumbnail_file.empty()) {
|
||||||
if (boost::filesystem::exists(plate_data_list[i]->thumbnail_file)) {
|
if (boost::filesystem::exists(plate_data_list[i]->thumbnail_file)) {
|
||||||
m_plate_list[index]->load_thumbnail_data(plate_data_list[i]->thumbnail_file);
|
m_plate_list[index]->load_thumbnail_data(plate_data_list[i]->thumbnail_file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!plate_data_list[i]->pattern_file.empty()) {
|
if (m_plater && !plate_data_list[i]->pattern_file.empty()) {
|
||||||
if (boost::filesystem::exists(plate_data_list[i]->pattern_file)) {
|
if (boost::filesystem::exists(plate_data_list[i]->pattern_file)) {
|
||||||
//no need to load pattern data currently
|
//no need to load pattern data currently
|
||||||
//m_plate_list[index]->load_pattern_thumbnail_data(plate_data_list[i]->pattern_file);
|
//m_plate_list[index]->load_pattern_thumbnail_data(plate_data_list[i]->pattern_file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!plate_data_list[i]->pattern_bbox_file.empty()) {
|
if (m_plater && !plate_data_list[i]->pattern_bbox_file.empty()) {
|
||||||
if (boost::filesystem::exists(plate_data_list[i]->pattern_bbox_file)) {
|
if (boost::filesystem::exists(plate_data_list[i]->pattern_bbox_file)) {
|
||||||
m_plate_list[index]->load_pattern_box_data(plate_data_list[i]->pattern_bbox_file);
|
m_plate_list[index]->load_pattern_box_data(plate_data_list[i]->pattern_bbox_file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue