Implemented possibility to show resin colors from the Plater (Bottles with resin are colored now in preset combobox)

+ Added nsvgParseFromFileWithReplace() to replace some colors before parsing from SVG file
+ Thumbnails are saved with selected resin color in SL1 or SL1S files
+ "white" folder is deleted from "icons" now. THere is no needed anymore.
This commit is contained in:
YuSanka 2021-11-09 17:00:57 +01:00
parent 69731b1d96
commit e8be7b2ecd
100 changed files with 109 additions and 2126 deletions

View file

@ -1136,15 +1136,11 @@ void GLVolumeCollection::update_colors_by_extruder(const DynamicPrintConfig* con
if (static_cast<PrinterTechnology>(config->opt_int("printer_technology")) == ptSLA)
{
const ConfigOptionStrings* resin_clr = dynamic_cast<const ConfigOptionStrings*>(config->option("material_colour"));
if (resin_clr == nullptr)
return;
assert(resin_clr->values.size() == 1);
colors.resize(1);
const std::string& txt_color = config->opt_string("material_colour", 0);
if (Slic3r::GUI::BitmapCache::parse_color(txt_color, rgb))
const std::string& txt_color = config->opt_string("material_colour");
if (Slic3r::GUI::BitmapCache::parse_color(txt_color, rgb)) {
colors.resize(1);
colors[0].set(txt_color, rgb);
}
}
else
{