Part: Set per-face transparency in boolean ops - fixes #1029,#2806
This commit is contained in:
@@ -78,6 +78,20 @@ void ViewProviderPart::applyColor(const Part::ShapeHistory& hist,
|
||||
}
|
||||
}
|
||||
|
||||
void ViewProviderPart::applyTransparency(const float& transparency,
|
||||
std::vector<App::Color>& colors)
|
||||
{
|
||||
if (transparency != 0.0) {
|
||||
// transparency has been set object-wide
|
||||
std::vector<App::Color>::iterator j;
|
||||
for (j = colors.begin(); j != colors.end(); ++j) {
|
||||
// transparency hasn't been set for this face
|
||||
if (j->a == 0.0)
|
||||
j->a = transparency/100.0; // transparency comes in percent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void ViewProviderShapeBuilder::buildNodes(const App::Property* , std::vector<SoNode*>& ) const
|
||||
|
||||
Reference in New Issue
Block a user