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:
Miikka Heikkinen
2022-10-25 15:28:43 +03:00
parent 162635cbe8
commit 8da35bac0f
6 changed files with 29 additions and 7 deletions

View File

@@ -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();
}