diff options
Diffstat (limited to 'src')
7 files changed, 17 insertions, 13 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp index eab8b2eb..e4c9c6ef 100644 --- a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp +++ b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp @@ -869,7 +869,8 @@ public: absAssetPath = QDir::cleanPath(projDir.absoluteFilePath(path)); } if (recurseSourceMaterial - && absAssetPath.endsWith(QLatin1String(".material")) + && (absAssetPath.endsWith(QLatin1String(".material")) + || absAssetPath.endsWith(QLatin1String(".shader"))) && !outPathMap.contains(path)) { ParseSourcePathsOutOfEffectFile(absAssetPath, projectPath, false, outPathMap, outPropertySet); diff --git a/src/Authoring/Client/Code/Core/Doc/IComposerSerializer.cpp b/src/Authoring/Client/Code/Core/Doc/IComposerSerializer.cpp index 94c3a29f..2e8f44a4 100644 --- a/src/Authoring/Client/Code/Core/Doc/IComposerSerializer.cpp +++ b/src/Authoring/Client/Code/Core/Doc/IComposerSerializer.cpp @@ -2530,7 +2530,9 @@ struct SComposerSerializerImpl : public IComposerSerializer warnings); } } else if (theFullPath.GetExtension().Compare( - L"material", CString::ENDOFSTRING, false)) { + L"material", CString::ENDOFSTRING, false) + || theFullPath.GetExtension().Compare( + L"shader", CString::ENDOFSTRING, false)) { if (theFullPath.Exists()) { std::vector<SMetaDataLoadWarning> warnings; NVScopedRefCounted<qt3ds::render::IRefCountedInputStream> diff --git a/src/Authoring/QT3DSDM/Systems/Qt3DSDMMetaData.cpp b/src/Authoring/QT3DSDM/Systems/Qt3DSDMMetaData.cpp index 9ac7a3ea..8c599cfb 100644 --- a/src/Authoring/QT3DSDM/Systems/Qt3DSDMMetaData.cpp +++ b/src/Authoring/QT3DSDM/Systems/Qt3DSDMMetaData.cpp @@ -3828,7 +3828,7 @@ public: qt3ds::foundation::IInStream &inStream) override { QString shaderFile(inShaderFile); - if (shaderFile.endsWith(".material")) { + if (shaderFile.endsWith(".material") || shaderFile.endsWith(".shader")) { LoadMaterialClassFromSourcePath(inShaderFile, inInstance, inName, outWarnings, inStream); } else { diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp index f9dedc12..4016fb33 100644 --- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp @@ -95,6 +95,7 @@ void InspectorControlView::filterMaterials(std::vector<Q3DStudio::CFilePath> &ma { static const wchar_t *extensions[] = { L"material", + L"shader", nullptr }; for (size_t i = 0; i < m_fileList.size(); ++i) { @@ -139,7 +140,7 @@ void InspectorControlView::onFilesChanged( const Q3DStudio::TFileModificationList &inFileModificationList) { static const wchar_t *materialExtensions[] = { - L"material", L"materialdef", + L"material", L"shader", L"materialdef", nullptr }; static const wchar_t *fontExtensions[] = { diff --git a/src/Authoring/Studio/Workspace/Dialogs.cpp b/src/Authoring/Studio/Workspace/Dialogs.cpp index e9ad3ede..7d3ea989 100644 --- a/src/Authoring/Studio/Workspace/Dialogs.cpp +++ b/src/Authoring/Studio/Workspace/Dialogs.cpp @@ -155,11 +155,11 @@ const wchar_t *wideEffectExts[] = { }; const char *materialExts[] = { - "material", "materialdef", nullptr, + "material", "shader", "materialdef", nullptr, }; const wchar_t *wideMaterialExts[] = { - L"material", L"materialdef", nullptr, + L"material", L"shader", L"materialdef", nullptr, }; const char *soundExts[] = { diff --git a/src/Runtime/Source/UIPParser/Source/Qt3DSUIPParserImpl.cpp b/src/Runtime/Source/UIPParser/Source/Qt3DSUIPParserImpl.cpp index 52aaa180..a9c581aa 100644 --- a/src/Runtime/Source/UIPParser/Source/Qt3DSUIPParserImpl.cpp +++ b/src/Runtime/Source/UIPParser/Source/Qt3DSUIPParserImpl.cpp @@ -653,7 +653,7 @@ BOOL CUIPParserImpl::LoadClasses(IPresentation & /*inPresentation*/, IDOMReader theLoadFlag = m_MetaData.LoadEffectXMLFile(inReader.GetNarrowElementName(), theId, theName, theFullPath.toUtf8().data()); - } else if (theFullPath.endsWith(".material")) { + } else if (theFullPath.endsWith(".material") || theFullPath.endsWith(".shader")) { theLoadFlag = m_MetaData.LoadMaterialXMLFile( inReader.GetNarrowElementName(), theId, theName, theFullPath.toUtf8().data()); diff --git a/src/Runtime/testres.qrc b/src/Runtime/testres.qrc index d099c345..7b3c20bc 100644 --- a/src/Runtime/testres.qrc +++ b/src/Runtime/testres.qrc @@ -1,11 +1,11 @@ <RCC> <qresource prefix="/"> - <file alias="aluminium.material">../../Studio/Content/Material Library/aluminum.material</file> - <file alias="asphalt.material">../../Studio/Content/Material Library/asphalt.material</file> - <file alias="concrete.material">../../Studio/Content/Material Library/concrete.material</file> - <file alias="copper.material">../../Studio/Content/Material Library/copper.material</file> - <file alias="porcelain.material">../../Studio/Content/Material Library/porcelain.material</file> - <file alias="simple_glass.material">../../Studio/Content/Material Library/simple_glass.material</file> + <file alias="aluminium.shader">../../Studio/Content/Material Library/aluminum.shader</file> + <file alias="asphalt.shader">../../Studio/Content/Material Library/asphalt.shader</file> + <file alias="concrete.shader">../../Studio/Content/Material Library/concrete.shader</file> + <file alias="copper.shader">../../Studio/Content/Material Library/copper.shader</file> + <file alias="porcelain.shader">../../Studio/Content/Material Library/porcelain.shader</file> + <file alias="simple_glass.shader">../../Studio/Content/Material Library/simple_glass.shader</file> <file alias="Desaturate.effect">../../Studio/Content/Effect Library/Desaturate.effect</file> <file alias="Gaussian Blur.effect">../../Studio/Content/Effect Library/Gaussian Blur.effect</file> <file alias="Sepia.effect">../../Studio/Content/Effect Library/Sepia.effect</file> |