diff options
Diffstat (limited to 'src/Authoring')
7 files changed, 25 insertions, 29 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.cpp b/src/Authoring/Client/Code/Core/Doc/Doc.cpp index 0a32a3c2..a8000182 100644 --- a/src/Authoring/Client/Code/Core/Doc/Doc.cpp +++ b/src/Authoring/Client/Code/Core/Doc/Doc.cpp @@ -90,7 +90,7 @@ using std::shared_ptr; //============================================================================== // Constants //============================================================================== -const long STUDIO_FILE_VERSION = 5; +const long STUDIO_FILE_VERSION = 6; const long STUDIO_LAST_SUPPORTED_FILE_VERSION = 1; IMPLEMENT_OBJECT_COUNTER(CDoc) @@ -1582,9 +1582,9 @@ void CDoc::SetDirectoryWatchingSystem( m_DirectoryWatchingSystem = inSystem; } -Q3DStudio::IDirectoryWatchingSystem *CDoc::GetDirectoryWatchingSystem() +Q3DStudio::IDirectoryWatchingSystem *CDoc::GetDirectoryWatchingSystem() const { - return m_DirectoryWatchingSystem ? m_DirectoryWatchingSystem.get() : NULL; + return m_DirectoryWatchingSystem ? m_DirectoryWatchingSystem.get() : nullptr; } bool CDoc::SetDocumentPath(const QString &inDocumentPath) @@ -2237,6 +2237,14 @@ void CDoc::LoadPresentationFile(CBufferedInputStream *inInputStream) m_StudioSystem->GetFullSystem()->GetSignalSender()->SendActiveSlide(theMasterSlide, 1, theChildSlide); + if (uipVersion < 6) { + // uipVersion 6 introduced vec4 colors + g_StudioApp.GetDialogs()->DisplayMessageBox( + tr("Old Presentation Version"), + tr("Some custom materials, effects, and behaviors may not work correctly."), + Qt3DSMessageBox::ICON_WARNING, false); + } + if (uipVersion == 3) { bool cleaned = m_SceneEditor->CleanUpMeshes(); QTimer::singleShot(0, [=](){ @@ -2469,7 +2477,7 @@ DoCreateDOMReader(qt3ds::foundation::IInStream &inStream, std::shared_ptr<IDOMFactory> theFactory(IDOMFactory::CreateDOMFactory(theStringTable)); SDOMElement *theElement = CDOMSerializer::Read(*theFactory, inStream); outVersion = 0; - if (theElement != NULL) { + if (theElement) { std::shared_ptr<IDOMReader> retval = IDOMReader::CreateDOMReader(*theElement, theStringTable, theFactory); @@ -2587,11 +2595,9 @@ void CDoc::SavePresentationFile(CBufferedOutputStream *inOutputStream) m_DocumentBufferCache->GetImageBuffers(theImageBuffers); // Remove buffers that aren't in the map. - erase_if( - theImageBuffers, - SBufferFilter(sourcePathToInstanceMap, - *m_StudioSystem->GetFullSystem()->GetCoreSystem()->GetStringTablePtr())); - if (theImageBuffers.empty() == false) { + erase_if(theImageBuffers, SBufferFilter(sourcePathToInstanceMap, + *m_StudioSystem->GetFullSystem()->GetCoreSystem()->GetStringTablePtr())); + if (!theImageBuffers.empty()) { // Ensure the source paths are always written out in the same order to keep source // control reasonable std::sort(theImageBuffers.begin(), theImageBuffers.end(), @@ -2864,7 +2870,7 @@ qt3dsdm::Qt3DSDMInstanceHandle CDoc::GetTopmostGroup(qt3dsdm::Qt3DSDMInstanceHan void CDoc::ScheduleRemoveImageInstances(qt3dsdm::Qt3DSDMInstanceHandle inInstance, CCmdBatch * /*outBatch*/) { - IterateImageInstances(inInstance, NULL); + IterateImageInstances(inInstance, nullptr); } //============================================================================== diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.h b/src/Authoring/Client/Code/Core/Doc/Doc.h index 54e0e3c1..1a82ae02 100644 --- a/src/Authoring/Client/Code/Core/Doc/Doc.h +++ b/src/Authoring/Client/Code/Core/Doc/Doc.h @@ -227,7 +227,7 @@ public: std::shared_ptr<Q3DStudio::IMoveRenameHandler> getMoveRenameHandler(); // The system may be null in the case where we are running without a UI. - Q3DStudio::IDirectoryWatchingSystem *GetDirectoryWatchingSystem(); + Q3DStudio::IDirectoryWatchingSystem *GetDirectoryWatchingSystem() const; bool SetDocumentPath(const QString &inFile); QString GetDocumentPath() const; void setPresentationId(const QString &id); diff --git a/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.cpp b/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.cpp index 41aa3365..2bd89418 100644 --- a/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.cpp +++ b/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.cpp @@ -223,11 +223,8 @@ struct DataConstructor<SObjectRefType> #define QT3DS_WCHAR_T_tracking L"tracking" #define QT3DS_WCHAR_T_dropshadow L"dropshadow" #define QT3DS_WCHAR_T_dropshadowstrength L"dropshadowstrength" -#define QT3DS_WCHAR_T_dropshadowoffset L"dropshadowoffset" // To be removed in 2.x (when UIP version is next updated) #define QT3DS_WCHAR_T_dropshadowoffsetx L"dropshadowoffsetx" #define QT3DS_WCHAR_T_dropshadowoffsety L"dropshadowoffsety" -#define QT3DS_WCHAR_T_dropshadowhorzalign L"dropshadowhorzalign" // To be removed in 2.x (when UIP version is next updated) -#define QT3DS_WCHAR_T_dropshadowvertalign L"dropshadowvertalign" // To be removed in 2.x (when UIP version is next updated) #define QT3DS_WCHAR_T_wordwrap L"wordwrap" #define QT3DS_WCHAR_T_boundingbox L"boundingbox" #define QT3DS_WCHAR_T_elide L"elide" diff --git a/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.h b/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.h index 664fc6f8..1a079402 100644 --- a/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.h +++ b/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.h @@ -287,11 +287,8 @@ class IPropertySystem; HANDLE_COMPOSER_PROPERTY(tracking, m_Tracking, float, 0.f) \ HANDLE_COMPOSER_PROPERTY(dropshadow, m_DropShadow, bool, false) \ HANDLE_COMPOSER_PROPERTY(dropshadowstrength, m_DropShadowStrength, float, 80.f) \ - HANDLE_COMPOSER_PROPERTY(dropshadowoffset, m_DropShadowOffset, float, 10.f) \ HANDLE_COMPOSER_PROPERTY(dropshadowoffsetx, m_DropShadowOffsetX, float, 0.f) \ HANDLE_COMPOSER_PROPERTY(dropshadowoffsety, m_DropShadowOffsetY, float, 0.f) \ - HANDLE_COMPOSER_PROPERTY(dropshadowhorzalign, m_DropShadowHorizontalAlignment, TDataStrPtr, L"Right") \ - HANDLE_COMPOSER_PROPERTY(dropshadowvertalign, m_DropShadowVerticalAlignment, TDataStrPtr, L"Bottom") \ HANDLE_COMPOSER_PROPERTY(wordwrap, m_WordWrap, TDataStrPtr, L"WrapWord") \ HANDLE_COMPOSER_PROPERTY(boundingbox, m_BoundingBox, SFloat2, SFloat2(0, 0)) \ HANDLE_COMPOSER_PROPERTY(elide, m_Elide, TDataStrPtr, L"ElideNone") \ diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp index 2821cf8e..9b52667b 100644 --- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp +++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp @@ -91,18 +91,17 @@ RowTree *RowManager::createRowFromBinding(ITimelineItemBinding *binding, RowTree binding->GetTimelineItem()->GetName().toQString(), QString(), index); + // connect the new row and its binding + binding->setRowTree(newRow); + newRow->setBinding(binding); + // hide if material container - const QString matContainerName = g_StudioApp.GetCore()->GetDoc()->GetStudioSystem() - ->GetClientDataModelBridge()->getMaterialContainerName(); - if (newRow->rowType() == OBJTYPE_MATERIAL && newRow->label() == matContainerName) { + auto bridge = g_StudioApp.GetCore()->GetDoc()->GetStudioSystem()->GetClientDataModelBridge(); + if (bridge->isMaterialContainer(newRow->instance())) { newRow->setVisible(false); newRow->rowTimeline()->setVisible(false); } - // connect the new row and its binding - binding->setRowTree(newRow); - newRow->setBinding(binding); - // set row start/end time & color ITimelineTimebar *timebar = binding->GetTimelineItem()->GetTimebar(); RowTimeline *rowTimeline = newRow->rowTimeline(); diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp index 1d54b64c..21281e42 100644 --- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp +++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp @@ -706,7 +706,7 @@ bool RowTree::isInVariantsFilter() const void RowTree::updateFilter() { auto bridge = g_StudioApp.GetCore()->GetDoc()->GetStudioSystem()->GetClientDataModelBridge(); - if (m_rowType == OBJTYPE_MATERIAL && m_label == bridge->getMaterialContainerName()) + if (bridge->isMaterialContainer(instance())) return; bool parentOk = !m_parentRow || m_parentRow->isVisible(); @@ -920,7 +920,7 @@ void RowTree::updateLabel() void RowTree::setRowVisible(bool visible) { auto bridge = g_StudioApp.GetCore()->GetDoc()->GetStudioSystem()->GetClientDataModelBridge(); - if (m_rowType == OBJTYPE_MATERIAL && m_label == bridge->getMaterialContainerName()) + if (bridge->isMaterialContainer(instance())) return; if (visible) { diff --git a/src/Authoring/Studio/Render/StudioRendererTranslation.cpp b/src/Authoring/Studio/Render/StudioRendererTranslation.cpp index 02f1c8a6..d2e92f67 100644 --- a/src/Authoring/Studio/Render/StudioRendererTranslation.cpp +++ b/src/Authoring/Studio/Render/StudioRendererTranslation.cpp @@ -474,11 +474,8 @@ struct STranslatorDataModelParser #define Text_Tracking m_Text.m_Tracking #define Text_DropShadow m_Text.m_DropShadow #define Text_DropShadowStrength m_Text.m_DropShadowStrength -#define Text_DropShadowOffset m_Text.m_DropShadowOffset // To be removed in 2.x (when UIP version is next updated) #define Text_DropShadowOffsetX m_Text.m_DropShadowOffsetX #define Text_DropShadowOffsetY m_Text.m_DropShadowOffsetY -#define Text_DropShadowHorizontalAlignment m_Text.m_DropShadowHorizontalAlignment // To be removed in 2.x (when UIP version is next updated) -#define Text_DropShadowVerticalAlignment m_Text.m_DropShadowVerticalAlignment // To be removed in 2.x (when UIP version is next updated) #define Text_WordWrap m_Text.m_WordWrap #define Text_BoundingBox m_Text.m_BoundingBox #define Text_Elide m_Text.m_Elide |