Fix several regressions:
+ improve PropertyMaterialList::readString + fix transparency handling in ViewProviderPartExt + do not register the private member '_diffuseColor' as property because it would be exposed to the public where it can be modified + fix ViewProviderPartExt::finishRestoring() to correctly restore old project files + fix ViewProviderPartExt::setHighlightedFaces() to correctly show face colours if VBO is enabled + fix ViewProviderBoolean::updateData() fix ViewProviderMultiFuse::updateData() fix ViewProviderMultiCommon::updateData() fix ViewProviderCompound::updateData() fix ViewProviderFillet::updateData() fix ViewProviderChamfer::updateData() that all set invalid transparency values + Filter ShapeAppearance in ViewProviderBody::unifyVisualProperty because body features usually have different number of faces than the body itself + manually fix some bad looking auto-formatted code + clean up code and remove duplicated code
This commit is contained in:
@@ -111,14 +111,14 @@ void ViewProviderCompound::updateData(const App::Property* prop)
|
||||
|
||||
auto vpBase = dynamic_cast<PartGui::ViewProviderPart*>(Gui::Application::Instance->getViewProvider(objBase));
|
||||
if (vpBase) {
|
||||
vpBase->ShapeAppearance.setTransparency(vpBase->Transparency.getValue());
|
||||
if (static_cast<int>(vpBase->ShapeAppearance.getSize()) == baseMap.Extent()) {
|
||||
applyMaterial(hist[index], vpBase->ShapeAppearance, compCol);
|
||||
std::vector<App::Material> baseCol = vpBase->ShapeAppearance.getValues();
|
||||
applyTransparency(vpBase->Transparency.getValue(), baseCol);
|
||||
if (static_cast<int>(baseCol.size()) == baseMap.Extent()) {
|
||||
applyMaterial(hist[index], baseCol, compCol);
|
||||
}
|
||||
else if (vpBase->ShapeAppearance.getSize() > 0
|
||||
&& vpBase->ShapeAppearance[0] != this->ShapeAppearance[0]) {
|
||||
vpBase->ShapeAppearance.setSize(baseMap.Extent(), vpBase->ShapeAppearance[0]);
|
||||
applyMaterial(hist[index], vpBase->ShapeAppearance, compCol);
|
||||
else if (!baseCol.empty() && baseCol[0] != this->ShapeAppearance[0]) {
|
||||
baseCol.resize(baseMap.Extent(), baseCol[0]);
|
||||
applyMaterial(hist[index], baseCol, compCol);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user