From 7b15a63e06b097e29edf3946bfa6e328491227d7 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 11 Sep 2019 19:51:31 +1000 Subject: [PATCH] changed refresh system slightly and added include dirs for deps --- .travis/script.sh | 9 ++++++--- app/CMakeLists.txt | 8 ++++++++ app/node/block/block.cpp | 19 +++++-------------- app/node/block/block.h | 5 ----- app/node/output/track/track.cpp | 1 + 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.travis/script.sh b/.travis/script.sh index 9256f833e..b020771c4 100644 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -9,14 +9,17 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make -j$(sysctl -n hw.ncpu) # Move Qt deps into bundle - macdeployqt app/Olive.app + cd app/CMakeFiles/Olive.dir + + macdeployqt Olive.app # Fix other deps that macdeployqt missed wget -c -nv https://github.com/arl/macdeployqtfix/raw/master/macdeployqtfix.py - python2 macdeployqtfix.py app/Olive.app/Contents/MacOS/Olive /usr/local/Cellar/qt5/5.*/ + python2 macdeployqtfix.py Olive.app/Contents/MacOS/Olive /usr/local/Cellar/qt5/5.*/ # Distribute in zip - zip -r Olive-$(git rev-parse --short HEAD)-macOS.zip app/Olive.app + zip -r Olive-$(git rev-parse --short HEAD)-macOS.zip Olive.app + mv *.zip ../../.. elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index dab602ae7..4db696a24 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -60,6 +60,14 @@ target_compile_options( PRIVATE $<$:-Werror -Wuninitialized -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion>) +target_include_directories( + ${OLIVE_TARGET} + PRIVATE + ${OPENCOLORIO_INCLUDE_DIR} + ${OIIO_INCLUDE_DIRS} + ${FFMPEG_INCLUDE_DIRS} +) + target_link_libraries(${OLIVE_TARGET} PRIVATE OpenGL::GL diff --git a/app/node/block/block.cpp b/app/node/block/block.cpp index d616f41e3..357d1ee7d 100644 --- a/app/node/block/block.cpp +++ b/app/node/block/block.cpp @@ -70,7 +70,7 @@ void Block::set_length(const rational &length) Unlock(); - RefreshFollowing(); + Refresh(); } Block *Block::previous() @@ -106,7 +106,7 @@ void Block::EdgeAddedSlot(NodeEdgePtr edge) static_cast(edge->output()->parent())->next_ = this; // The blocks surrounding this one have changed, we need to Refresh() - RefreshFollowing(); + Refresh(); // Entire track will have shifted, so the whole cache needs to be re-validated SendInvalidateCache(0, RATIONAL_MAX); @@ -119,7 +119,7 @@ void Block::EdgeRemovedSlot(NodeEdgePtr edge) static_cast(edge->output()->parent())->next_ = nullptr; // The blocks surrounding this one have changed, we need to Refresh() - RefreshFollowing(); + Refresh(); } } @@ -136,18 +136,9 @@ void Block::Refresh() out_point_ = in_point_ + length(); emit Refreshed(); -} -void Block::RefreshFollowing() -{ - Refresh(); - - Block* next_block = next(); - - while (next_block != nullptr) { - next_block->Refresh(); - - next_block = next_block->next(); + if (next() != nullptr) { + next()->Refresh(); } } diff --git a/app/node/block/block.h b/app/node/block/block.h index ee08ce4b2..f8670db4c 100644 --- a/app/node/block/block.h +++ b/app/node/block/block.h @@ -83,11 +83,6 @@ public slots: */ virtual void Refresh(); - /** - * @brief Calls Refresh() on this block and all blocks connected after it (but not before it) - */ - void RefreshFollowing(); - signals: /** * @brief Signal emitted when this Block is refreshed diff --git a/app/node/output/track/track.cpp b/app/node/output/track/track.cpp index a639e80a5..982fa69fd 100644 --- a/app/node/output/track/track.cpp +++ b/app/node/output/track/track.cpp @@ -104,6 +104,7 @@ void TrackOutput::Refresh() block_cache_ = detect_attached_blocks; Block::Refresh(); + qDebug() << "Refreshed with in point" << in().toDouble() << "(from connected block" << previous << ")"; } QList TrackOutput::RunDependencies(NodeOutput* output, const rational &time)