diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index adc1355fe..d95b3fc60 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -426,6 +426,7 @@ set( icons.qrc hicolor.qrc ${CMAKE_CURRENT_SOURCE_DIR}/../../docs/docs.qrc + ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing.qrc ) if(${USE_ROBOTO}) @@ -588,41 +589,6 @@ if(UNIX AND NOT APPLE) DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/mimetypes/ ) - install( - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInBack.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInBounce.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInCirc.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInCubic.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInElastic.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInExpo.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInOutBack.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInOutBounce.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInOutCirc.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInOutCubic.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInOutElastic.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInOutExpo.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInOutQuad.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInOutQuart.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInOutQuint.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInOutSine.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInQuad.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInQuart.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInQuint.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeInSine.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeOutBack.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeOutBounce.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeOutCirc.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeOutCubic.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeOutElastic.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeOutExpo.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeOutQuad.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeOutQuart.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeOutQuint.js - ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing/presets/easeOutSine.js - DESTINATION - ${CMAKE_INSTALL_DATAROOTDIR}/friction/presets/expressions/easing/ - ) install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../LICENSE.md diff --git a/src/app/GUI/Expressions/expressiondialog.cpp b/src/app/GUI/Expressions/expressiondialog.cpp index 5ca6699b9..cbb78a13c 100755 --- a/src/app/GUI/Expressions/expressiondialog.cpp +++ b/src/app/GUI/Expressions/expressiondialog.cpp @@ -623,7 +623,7 @@ void ExpressionDialog::setCurrentTabId(const int id) { const QStringList ExpressionDialog::generateEasingPresets() { - QDir userDir(QString::fromUtf8("%1/easing").arg(AppSupport::getAppUserExPresetsPath())); + /*QDir userDir(QString::fromUtf8("%1/easing").arg(AppSupport::getAppUserExPresetsPath())); QDir appDir(QString::fromUtf8("%1/easing").arg(AppSupport::getAppExPresetsPath())); const auto userPresets = userDir.entryInfoList(QStringList() << "*.js", QDir::Files); const auto appPresets = appDir.entryInfoList(QStringList() << "*.js", QDir::Files); @@ -634,8 +634,39 @@ const QStringList ExpressionDialog::generateEasingPresets() qDebug() << "Checking expression preset" << presets.at(i).absoluteFilePath(); if (!readEasingPreset(presets.at(i).absoluteFilePath()).valid) { continue; } usable << presets.at(i).absoluteFilePath(); - } - return usable; + }*/ + QStringList presets; + presets << ":/easing/presets/easeInBack.js" + << ":/easing/presets/easeInBounce.js" + << ":/easing/presets/easeInCirc.js" + << ":/easing/presets/easeInCubic.js" + << ":/easing/presets/easeInElastic.js" + << ":/easing/presets/easeInExpo.js" + << ":/easing/presets/easeInOutBack.js" + << ":/easing/presets/easeInOutBounce.js" + << ":/easing/presets/easeInOutCirc.js" + << ":/easing/presets/easeInOutCubic.js" + << ":/easing/presets/easeInOutElastic.js" + << ":/easing/presets/easeInOutExpo.js" + << ":/easing/presets/easeInOutQuad.js" + << ":/easing/presets/easeInOutQuart.js" + << ":/easing/presets/easeInOutQuint.js" + << ":/easing/presets/easeInOutSine.js" + << ":/easing/presets/easeInQuad.js" + << ":/easing/presets/easeInQuart.js" + << ":/easing/presets/easeInQuint.js" + << ":/easing/presets/easeInSine.js" + << ":/easing/presets/easeOutBack.js" + << ":/easing/presets/easeOutBounce.js" + << ":/easing/presets/easeOutCirc.js" + << ":/easing/presets/easeOutCubic.js" + << ":/easing/presets/easeOutElastic.js" + << ":/easing/presets/easeOutExpo.js" + << ":/easing/presets/easeOutQuad.js" + << ":/easing/presets/easeOutQuart.js" + << ":/easing/presets/easeOutQuint.js" + << ":/easing/presets/easeOutSine.js"; + return presets; } bool ExpressionDialog::populateEasingPresets() diff --git a/src/scripts/easing.qrc b/src/scripts/easing.qrc new file mode 100644 index 000000000..96156d193 --- /dev/null +++ b/src/scripts/easing.qrc @@ -0,0 +1,34 @@ + + + easing/presets/easeOutSine.js + easing/presets/easeOutQuint.js + easing/presets/easeOutQuart.js + easing/presets/easeOutQuad.js + easing/presets/easeOutExpo.js + easing/presets/easeOutElastic.js + easing/presets/easeOutCubic.js + easing/presets/easeOutCirc.js + easing/presets/easeOutBounce.js + easing/presets/easeOutBack.js + easing/presets/easeInSine.js + easing/presets/easeInQuint.js + easing/presets/easeInQuart.js + easing/presets/easeInQuad.js + easing/presets/easeInOutSine.js + easing/presets/easeInOutQuint.js + easing/presets/easeInOutQuart.js + easing/presets/easeInOutQuad.js + easing/presets/easeInOutExpo.js + easing/presets/easeInOutElastic.js + easing/presets/easeInOutCubic.js + easing/presets/easeInOutCirc.js + easing/presets/easeInOutBounce.js + easing/presets/easeInOutBack.js + easing/presets/easeInExpo.js + easing/presets/easeInElastic.js + easing/presets/easeInCubic.js + easing/presets/easeInCirc.js + easing/presets/easeInBounce.js + easing/presets/easeInBack.js + +