diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-12-03 13:03:36 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-12-03 13:04:44 +0200 |
commit | 8711d9b33dad7c0f1b42b904885e86bd0de21b36 (patch) | |
tree | 194c3a91ad1f384e53168e3a3c2f5f32c228043f /src/Authoring/QT3DSDM/Systems | |
parent | 82d2d1b5d9d96bab7cc0e2f5b390d5ae652667dc (diff) | |
parent | 911b1715659a8721ce0dc5d60289cd0feeec534f (diff) |
Merge branch '2.2'
Change-Id: I81b338c2a27a6714cec15e60cbe5dc98ace69721
Diffstat (limited to 'src/Authoring/QT3DSDM/Systems')
6 files changed, 34 insertions, 2 deletions
diff --git a/src/Authoring/QT3DSDM/Systems/Cores/SimpleSlideCore.cpp b/src/Authoring/QT3DSDM/Systems/Cores/SimpleSlideCore.cpp index 06d3de58..87eadb9f 100644 --- a/src/Authoring/QT3DSDM/Systems/Cores/SimpleSlideCore.cpp +++ b/src/Authoring/QT3DSDM/Systems/Cores/SimpleSlideCore.cpp @@ -206,6 +206,18 @@ void CSimpleSlideCore::ForceSetInstancePropertyValue(Qt3DSDMSlideHandle inSlide, inProperty, inValue); } +void CSimpleSlideCore::forceSetInstancePropertyValueOnAllSlides(Qt3DSDMInstanceHandle inInstance, + Qt3DSDMPropertyHandle inProperty, + const SValue &inValue) +{ + for (auto &it : m_Objects) { + if (it.second->GetType() == SSlide::s_Type) { + Qt3DSDMSlideHandle slide(it.first); + ForceSetInstancePropertyValue(slide, inInstance, inProperty, inValue); + } + } +} + bool CSimpleSlideCore::GetSpecificInstancePropertyValue(Qt3DSDMSlideHandle inSlide, Qt3DSDMInstanceHandle inInstance, Qt3DSDMPropertyHandle inProperty, diff --git a/src/Authoring/QT3DSDM/Systems/Cores/SimpleSlideCore.h b/src/Authoring/QT3DSDM/Systems/Cores/SimpleSlideCore.h index b18db73e..278ef777 100644 --- a/src/Authoring/QT3DSDM/Systems/Cores/SimpleSlideCore.h +++ b/src/Authoring/QT3DSDM/Systems/Cores/SimpleSlideCore.h @@ -294,6 +294,9 @@ public: // use Qt3DSDMPropertyHandle inProperty); void ForceSetInstancePropertyValue(Qt3DSDMSlideHandle inSlide, Qt3DSDMInstanceHandle inHandle, Qt3DSDMPropertyHandle inProperty, const SValue &inValue) override; + void forceSetInstancePropertyValueOnAllSlides(Qt3DSDMInstanceHandle inInstance, + Qt3DSDMPropertyHandle inProperty, + const SValue &inValue) override; bool GetSpecificInstancePropertyValue(Qt3DSDMSlideHandle inSlide, Qt3DSDMInstanceHandle inInstance, diff --git a/src/Authoring/QT3DSDM/Systems/Cores/SlideCoreProducer.cpp b/src/Authoring/QT3DSDM/Systems/Cores/SlideCoreProducer.cpp index 410df7a7..86b0d1fe 100644 --- a/src/Authoring/QT3DSDM/Systems/Cores/SlideCoreProducer.cpp +++ b/src/Authoring/QT3DSDM/Systems/Cores/SlideCoreProducer.cpp @@ -273,6 +273,13 @@ void CSlideCoreProducer::ForceSetInstancePropertyValue(Qt3DSDMSlideHandle inSlid m_Data->ForceSetInstancePropertyValue(inSlide, inHandle, inProperty, inValue); } +void CSlideCoreProducer::forceSetInstancePropertyValueOnAllSlides(Qt3DSDMInstanceHandle inInstance, + Qt3DSDMPropertyHandle inProperty, + const SValue &inValue) +{ + m_Data->forceSetInstancePropertyValueOnAllSlides(inInstance, inProperty, inValue); +} + bool CSlideCoreProducer::GetSpecificInstancePropertyValue(Qt3DSDMSlideHandle inSlide, Qt3DSDMInstanceHandle inInstance, Qt3DSDMPropertyHandle inProperty, diff --git a/src/Authoring/QT3DSDM/Systems/Cores/SlideCoreProducer.h b/src/Authoring/QT3DSDM/Systems/Cores/SlideCoreProducer.h index aa7e89e9..dec0297d 100644 --- a/src/Authoring/QT3DSDM/Systems/Cores/SlideCoreProducer.h +++ b/src/Authoring/QT3DSDM/Systems/Cores/SlideCoreProducer.h @@ -117,6 +117,9 @@ public: Qt3DSDMPropertyHandle inProperty, const SValue &inValue) override; void ForceSetInstancePropertyValue(Qt3DSDMSlideHandle inSlide, Qt3DSDMInstanceHandle inHandle, Qt3DSDMPropertyHandle inProperty, const SValue &inValue) override; + void forceSetInstancePropertyValueOnAllSlides(Qt3DSDMInstanceHandle inInstance, + Qt3DSDMPropertyHandle inProperty, + const SValue &inValue) override; bool GetSpecificInstancePropertyValue(Qt3DSDMSlideHandle inSlide, Qt3DSDMInstanceHandle inInstance, Qt3DSDMPropertyHandle inProperty, SValue &outValue) const override; 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/QT3DSDM/Systems/Qt3DSDMSlideCore.h b/src/Authoring/QT3DSDM/Systems/Qt3DSDMSlideCore.h index 6d6fb4ce..8216b01d 100644 --- a/src/Authoring/QT3DSDM/Systems/Qt3DSDMSlideCore.h +++ b/src/Authoring/QT3DSDM/Systems/Qt3DSDMSlideCore.h @@ -139,6 +139,13 @@ public: const SValue &inValue) = 0; /** + * Set a property value on an instance on all slides. + */ + virtual void forceSetInstancePropertyValueOnAllSlides(Qt3DSDMInstanceHandle inInstance, + Qt3DSDMPropertyHandle inProperty, + const SValue &inValue) = 0; + + /** * Return the value for this property if it exists on this slide. */ virtual bool GetSpecificInstancePropertyValue(Qt3DSDMSlideHandle inSlide, @@ -229,4 +236,4 @@ public: typedef std::shared_ptr<ISlideCore> TSlideCorePtr; } -#endif
\ No newline at end of file +#endif |