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:
committed by
Chris Hennes
parent
37c38acd19
commit
ba20441935
@@ -196,7 +196,7 @@ ViewProviderFemMesh::ViewProviderFemMesh()
|
||||
ADD_PROPERTY(LineWidth, (2.0f));
|
||||
LineWidth.setConstraints(&floatRange);
|
||||
|
||||
ShapeColor.setValue(App::Color(1.0f, 0.7f, 0.0f));
|
||||
ShapeAppearance.setDiffuseColor(App::Color(1.0f, 0.7f, 0.0f));
|
||||
Transparency.setValue(0);
|
||||
ADD_PROPERTY(BackfaceCulling, (true));
|
||||
ADD_PROPERTY(ShowInner, (false));
|
||||
@@ -597,7 +597,7 @@ void ViewProviderFemMesh::resetColorByNodeId()
|
||||
{
|
||||
pcMatBinding->value = SoMaterialBinding::OVERALL;
|
||||
pcShapeMaterial->diffuseColor.setNum(0);
|
||||
const App::Color& c = ShapeColor.getValue();
|
||||
const App::Color& c = ShapeAppearance.getDiffuseColor();
|
||||
pcShapeMaterial->diffuseColor.setValue(c.r, c.g, c.b);
|
||||
}
|
||||
|
||||
@@ -710,7 +710,7 @@ void ViewProviderFemMesh::resetColorByElementId()
|
||||
{
|
||||
pcMatBinding->value = SoMaterialBinding::OVERALL;
|
||||
pcShapeMaterial->diffuseColor.setNum(0);
|
||||
const App::Color& c = ShapeColor.getValue();
|
||||
const App::Color& c = ShapeAppearance.getDiffuseColor();
|
||||
pcShapeMaterial->diffuseColor.setValue(c.r, c.g, c.b);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user