Part: Set per-face transparency in boolean ops - fixes #1029,#2806

This commit is contained in:
Yorik van Havre
2017-02-10 21:53:57 -02:00
parent ebb3c84bcb
commit d7ed8c4383
3 changed files with 20 additions and 0 deletions

View File

@@ -106,6 +106,8 @@ void ViewProviderBoolean::updateData(const App::Property* prop)
std::vector<App::Color> colTool = static_cast<PartGui::ViewProviderPart*>(vpTool)->DiffuseColor.getValues();
std::vector<App::Color> colBool;
colBool.resize(boolMap.Extent(), this->ShapeColor.getValue());
applyTransparency(static_cast<PartGui::ViewProviderPart*>(vpBase)->Transparency.getValue(),colBase);
applyTransparency(static_cast<PartGui::ViewProviderPart*>(vpTool)->Transparency.getValue(),colTool);
bool setColor=false;
if (static_cast<int>(colBase.size()) == baseMap.Extent()) {
@@ -203,6 +205,7 @@ void ViewProviderMultiFuse::updateData(const App::Property* prop)
Gui::ViewProvider* vpBase = Gui::Application::Instance->getViewProvider(objBase);
std::vector<App::Color> colBase = static_cast<PartGui::ViewProviderPart*>(vpBase)->DiffuseColor.getValues();
applyTransparency(static_cast<PartGui::ViewProviderPart*>(vpBase)->Transparency.getValue(),colBase);
if (static_cast<int>(colBase.size()) == baseMap.Extent()) {
applyColor(hist[index], colBase, colBool);
setColor = true;
@@ -332,6 +335,7 @@ void ViewProviderMultiCommon::updateData(const App::Property* prop)
Gui::ViewProvider* vpBase = Gui::Application::Instance->getViewProvider(objBase);
std::vector<App::Color> colBase = static_cast<PartGui::ViewProviderPart*>(vpBase)->DiffuseColor.getValues();
applyTransparency(static_cast<PartGui::ViewProviderPart*>(vpBase)->Transparency.getValue(),colBase);
if (static_cast<int>(colBase.size()) == baseMap.Extent()) {
applyColor(hist[index], colBase, colBool);
setColor = true;