Material: Appearance Updates 2
Improves the use of the ShapeAppearance property for the Part workbench.
removes DiffuseColor property
adds Python compatibility using custom attributes
transitions DiffuseColor to ShapeAppearance on open
Improved UI elements for setting object appearance, and appearance per face
Lays the foundation for future texture support
This commit is contained in:
committed by
Chris Hennes
parent
958d83ed06
commit
8b5a3b1124
@@ -285,9 +285,19 @@ QModelIndex MaterialTreeWidget::findInTree(const QString& uuid)
|
||||
|
||||
void MaterialTreeWidget::setMaterial(const QString& uuid)
|
||||
{
|
||||
if (uuid.isEmpty() || uuid == m_uuid) {
|
||||
if (uuid == m_uuid) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (uuid.isEmpty()) {
|
||||
// Nothing is selected
|
||||
QItemSelectionModel* selectionModel = m_materialTree->selectionModel();
|
||||
selectionModel->clear();
|
||||
m_material->clear();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
updateMaterial(uuid);
|
||||
|
||||
// Now select the material in the tree
|
||||
@@ -634,6 +644,11 @@ void MaterialTreeWidget::onSelectMaterial(const QItemSelection& selected,
|
||||
{
|
||||
Q_UNUSED(deselected);
|
||||
|
||||
if (selected.isEmpty()) {
|
||||
m_uuid.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the UUID before changing the underlying data model
|
||||
QString uuid;
|
||||
auto model = dynamic_cast<QStandardItemModel*>(m_materialTree->model());
|
||||
|
||||
Reference in New Issue
Block a user