forked from qt-creator/qt-creator
QmlDesigner: Add support for SpecularGlossyMaterial
Task-number: QDS-8087 Change-Id: Ic5cdca5d61d5f4ad11f63f3f5a59907798cde763 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -123,10 +123,12 @@ bool MaterialBrowserModel::loadPropertyGroups(const QString &path)
|
||||
|
||||
m_defaultMaterialSections.clear();
|
||||
m_principledMaterialSections.clear();
|
||||
m_specularGlossyMaterialSections.clear();
|
||||
m_customMaterialSections.clear();
|
||||
if (ok) {
|
||||
m_defaultMaterialSections.append(m_propertyGroupsObj.value("DefaultMaterial").toObject().keys());
|
||||
m_principledMaterialSections.append(m_propertyGroupsObj.value("PrincipledMaterial").toObject().keys());
|
||||
m_specularGlossyMaterialSections.append(m_propertyGroupsObj.value("SpecularGlossyMaterial").toObject().keys());
|
||||
|
||||
QStringList customMatSections = m_propertyGroupsObj.value("CustomMaterial").toObject().keys();
|
||||
if (customMatSections.size() > 1) // as of now custom material has only 1 section, so we don't add it
|
||||
@@ -145,6 +147,7 @@ void MaterialBrowserModel::unloadPropertyGroups()
|
||||
m_propertyGroupsObj = {};
|
||||
m_defaultMaterialSections.clear();
|
||||
m_principledMaterialSections.clear();
|
||||
m_specularGlossyMaterialSections.clear();
|
||||
m_customMaterialSections.clear();
|
||||
emit materialSectionsChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user