mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-16 17:02:56 +00:00
FIX:add error deal:mtl file lost some material
jira: github 5687 Change-Id: I2394d27b027cfe34ac3cb260735aceaee65ff6d9 (cherry picked from commit 58f9c7d0b2800c4b8b67991f5d3e43d57a6cd1eb)
This commit is contained in:
@@ -272,6 +272,7 @@ Model Model::read_from_file(const std::string&
|
||||
if (result){
|
||||
ObjDialogInOut in_out;
|
||||
in_out.model = &model;
|
||||
in_out.lost_material_name = obj_info.lost_material_name;
|
||||
if (obj_info.vertex_colors.size() > 0) {
|
||||
if (objFn) { // 1.result is ok and pop up a dialog
|
||||
in_out.input_colors = std::move(obj_info.vertex_colors);
|
||||
@@ -3091,7 +3092,9 @@ bool Model::obj_import_face_color_deal(const std::vector<unsigned char> &face_fi
|
||||
auto face_count = volume->mesh().its.indices.size();
|
||||
volume->mmu_segmentation_facets.reset();
|
||||
volume->mmu_segmentation_facets.reserve(face_count);
|
||||
if (volume->mesh().its.indices.size() != face_filament_ids.size()) { return false; }
|
||||
if (volume->mesh().its.indices.size() != face_filament_ids.size()) {
|
||||
return false;
|
||||
}
|
||||
for (size_t i = 0; i < volume->mesh().its.indices.size(); i++) {
|
||||
auto face = volume->mesh().its.indices[i];
|
||||
auto filament_id = face_filament_ids[i];
|
||||
|
||||
Reference in New Issue
Block a user