forked from qt-creator/qt-creator
QmlDesigner: Remove PrincipledMaterialEx from basic material types
Change-Id: I290b1c3fb8ce12b6d0319d2ce2dee6cb71fd0a57 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -58,11 +58,6 @@ 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)
|
||||
@@ -705,20 +700,12 @@ void MaterialEditorView::updatePossibleTypes()
|
||||
if (!m_qmlBackEnd)
|
||||
return;
|
||||
|
||||
static const QStringList basicTypes = []() {
|
||||
QStringList types = {
|
||||
"CustomMaterial",
|
||||
"DefaultMaterial",
|
||||
"PrincipledMaterial",
|
||||
"PrincipledMaterialEx",
|
||||
"SpecularGlossyMaterial",
|
||||
};
|
||||
|
||||
if (!showPrincipledMaterialEx())
|
||||
types.removeOne("PrincipledMaterialEx");
|
||||
|
||||
return types;
|
||||
}();
|
||||
static const QStringList basicTypes{
|
||||
"CustomMaterial",
|
||||
"DefaultMaterial",
|
||||
"PrincipledMaterial",
|
||||
"SpecularGlossyMaterial",
|
||||
};
|
||||
|
||||
const QString matType = m_selectedMaterial.simplifiedTypeName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user