forked from qt-creator/qt-creator
QmlDesigner: Add scene root material support to material editor/browser
If the scene root item is Material subclass, material library is not created for the scene. Material editor and browser functionalities that relate to having material library are disabled. Material editor will always show the material that is the scene root. Fixes: QDS-7374 Change-Id: Icd1c212c17b59e4a2caa6b3b4d7e615e68b21eb9 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -127,6 +127,7 @@ void MaterialBrowserView::modelAttached(Model *model)
|
||||
AbstractView::modelAttached(model);
|
||||
|
||||
m_widget->clearSearchFilter();
|
||||
m_widget->materialBrowserModel()->setHasMaterialRoot(rootModelNode().isSubclassOf("QtQuick3D.Material"));
|
||||
m_hasQuick3DImport = model->hasImport("QtQuick3D");
|
||||
|
||||
// Project load is already very busy and may even trigger puppet reset, so let's wait a moment
|
||||
|
||||
Reference in New Issue
Block a user