forked from qt-creator/qt-creator
QmlDesigner: Add PrincipledMaterialEx to QDS
Task-number: QDS-13226 Change-Id: I9313df343a92c5c2d55c4eba75e994b639fe7bb2 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -57,6 +57,11 @@ static bool containsTexture(const ModelNode &node)
|
||||
return false;
|
||||
};
|
||||
|
||||
static bool showPrincipledMaterialEx()
|
||||
{
|
||||
return Core::ICore::settings()->value("QML/Designer/ShowPrincipledMaterialEx", false).toBool();
|
||||
}
|
||||
|
||||
MaterialEditorView::MaterialEditorView(ExternalDependenciesInterface &externalDependencies)
|
||||
: AbstractView{externalDependencies}
|
||||
, m_stackedWidget(new QStackedWidget)
|
||||
@@ -719,12 +724,20 @@ void MaterialEditorView::updatePossibleTypes()
|
||||
if (!m_qmlBackEnd)
|
||||
return;
|
||||
|
||||
static const QStringList basicTypes {
|
||||
"CustomMaterial",
|
||||
"DefaultMaterial",
|
||||
"PrincipledMaterial",
|
||||
"SpecularGlossyMaterial"
|
||||
};
|
||||
static const QStringList basicTypes = []() {
|
||||
QStringList types = {
|
||||
"CustomMaterial",
|
||||
"DefaultMaterial",
|
||||
"PrincipledMaterial",
|
||||
"PrincipledMaterialEx",
|
||||
"SpecularGlossyMaterial",
|
||||
};
|
||||
|
||||
if (!showPrincipledMaterialEx())
|
||||
types.removeOne("PrincipledMaterialEx");
|
||||
|
||||
return types;
|
||||
}();
|
||||
|
||||
const QString matType = m_selectedMaterial.simplifiedTypeName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user