Material: Material appearance

Uses new material system for appearance

Each feature object now has a property called ShapeMaterial that
describes its physical properties. If it has a shape, it has a
material.

The ShapeColor attribute is replaced by a ShapeAppearance attribute.
This is a material list that describes all appearance properties, not
just diffuse color. As a list in can be used for all elements of a
shape, such as edges and faces.

A new widget is provided to allow the user to select materials in a
consistent fashion. It can also launch the material editor with its
more advanced capabilities.
This commit is contained in:
David Carter
2024-03-17 18:37:56 -04:00
committed by Chris Hennes
parent 37c38acd19
commit ba20441935
121 changed files with 4682 additions and 1685 deletions

View File

@@ -96,7 +96,7 @@ void ViewProviderCompound::updateData(const App::Property* prop)
TopExp::MapShapes(compShape, TopAbs_FACE, compMap);
std::vector<App::Color> compCol;
compCol.resize(compMap.Extent(), this->ShapeColor.getValue());
compCol.resize(compMap.Extent(), this->ShapeAppearance.getDiffuseColor());
int index=0;
for (std::vector<App::DocumentObject*>::iterator it = sources.begin(); it != sources.end(); ++it, ++index) {
@@ -116,7 +116,7 @@ void ViewProviderCompound::updateData(const App::Property* prop)
if (static_cast<int>(baseCol.size()) == baseMap.Extent()) {
applyColor(hist[index], baseCol, compCol);
}
else if (!baseCol.empty() && baseCol[0] != this->ShapeColor.getValue()) {
else if (!baseCol.empty() && baseCol[0] != this->ShapeAppearance.getDiffuseColor()) {
baseCol.resize(baseMap.Extent(), baseCol[0]);
applyColor(hist[index], baseCol, compCol);
}