Skip to content

Commit

Permalink
improve handling of face colors when creating a mesh with segments
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Sep 8, 2016
1 parent 435cc37 commit e15799c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Mod/MeshPart/Gui/Tessellation.cpp
Expand Up @@ -340,7 +340,17 @@ bool Tessellation::accept()
MeshGui::ViewProviderMesh* vpmesh = dynamic_cast<MeshGui::ViewProviderMesh*>(vpm);
PartGui::ViewProviderPart* vppart = dynamic_cast<PartGui::ViewProviderPart*>(vpp);
if (vpmesh && vppart) {
vpmesh->highlightSegments(vppart->DiffuseColor.getValues());
std::vector<App::Color> diff_col = vppart->DiffuseColor.getValues();
if (ui->groupsFaceColors->isChecked()) {
// unique colors
std::set<uint32_t> col_set;
for (auto it : diff_col)
col_set.insert(it.getPackedValue());
diff_col.clear();
for (auto it : col_set)
diff_col.push_back(App::Color(it));
}
vpmesh->highlightSegments(diff_col);
}
}
}
Expand Down

0 comments on commit e15799c

Please sign in to comment.