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

@@ -23,10 +23,10 @@
#include "PreCompiled.h"
#ifndef _PreComp_
#include <algorithm>
#include <functional>
#include <QMenu>
#include <QTimer>
#include <algorithm>
#include <functional>
#include <Inventor/SbLine.h>
#include <Inventor/SoPickedPoint.h>
@@ -51,8 +51,8 @@
#include <Gui/View3DInventor.h>
#include <Gui/View3DInventorViewer.h>
#include <Gui/WaitCursor.h>
#include <Mod/Mesh/App/MeshFeature.h>
#include <Mod/Mesh/App/Core/Algorithm.h>
#include <Mod/Mesh/App/MeshFeature.h>
#include "MeshEditor.h"
#include "SoFCMeshObject.h"
@@ -117,7 +117,7 @@ void ViewProviderFace::attach(App::DocumentObject* obj)
SoBaseColor* basecol = new SoBaseColor;
if (mesh) {
App::Color col = mesh->ShapeColor.getValue();
App::Color col = mesh->ShapeAppearance.getDiffuseColor();
basecol->rgb.setValue(col.r, col.g, col.b);
}
else {