From 2a16ee12b3a9cd7055d4265c48be6d694738b711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Tue, 20 Feb 2024 21:16:45 -0500 Subject: [PATCH] [spline] Fix some issues in spline3d and 2d due to exprtk api changes --- .../Spline/GeneratorDialog.hpp | 4 ++-- .../Spline3D/GeneratorDialog.hpp | 6 +++--- .../score-plugin-spline3d/Spline3D/Metadata.hpp | 2 +- .../score-plugin-spline3d/Spline3D/Model.cpp | 16 ---------------- .../score-plugin-spline3d/Spline3D/Model.hpp | 5 ----- 5 files changed, 6 insertions(+), 27 deletions(-) diff --git a/src/plugins/score-plugin-spline/Spline/GeneratorDialog.hpp b/src/plugins/score-plugin-spline/Spline/GeneratorDialog.hpp index 13b34483b2..9ad5894fca 100644 --- a/src/plugins/score-plugin-spline/Spline/GeneratorDialog.hpp +++ b/src/plugins/score-plugin-spline/Spline/GeneratorDialog.hpp @@ -40,8 +40,8 @@ class GeneratorDialog : public Process::ScriptDialog expr.add_constants(); expr.register_symbol_table(); - setText(R"_(x := cos(2 * PI * t); -y := sin(2 * PI * t); + setText(R"_(x := cos(2 * pi * t); +y := sin(2 * pi * t); )_"); } diff --git a/src/plugins/score-plugin-spline3d/Spline3D/GeneratorDialog.hpp b/src/plugins/score-plugin-spline3d/Spline3D/GeneratorDialog.hpp index 3d8d422c87..67178414e1 100644 --- a/src/plugins/score-plugin-spline3d/Spline3D/GeneratorDialog.hpp +++ b/src/plugins/score-plugin-spline3d/Spline3D/GeneratorDialog.hpp @@ -41,9 +41,9 @@ class GeneratorDialog : public Process::ScriptDialog expr.add_constants(); expr.register_symbol_table(); - setText(R"_(x := cos(2 * PI * t); -y := sin(2 * PI * t); -z := sin(7 * PI * t); + setText(R"_(x := cos(2 * pi * t); +y := sin(2 * pi * t); +z := sin(7 * pi * t); )_"); } diff --git a/src/plugins/score-plugin-spline3d/Spline3D/Metadata.hpp b/src/plugins/score-plugin-spline3d/Spline3D/Metadata.hpp index d3826eea46..da142b24d0 100644 --- a/src/plugins/score-plugin-spline3d/Spline3D/Metadata.hpp +++ b/src/plugins/score-plugin-spline3d/Spline3D/Metadata.hpp @@ -16,4 +16,4 @@ PROCESS_METADATA( "Automation following a 3D curve", "ossia score", (QStringList{"Curve", "Automation", "3D"}), {}, {std::vector{Process::PortType::Message}}, - Process::ProcessFlags::SupportsTemporal) + Process::ProcessFlags::SupportsLasting) diff --git a/src/plugins/score-plugin-spline3d/Spline3D/Model.cpp b/src/plugins/score-plugin-spline3d/Spline3D/Model.cpp index 710eaab93b..12c96de370 100644 --- a/src/plugins/score-plugin-spline3d/Spline3D/Model.cpp +++ b/src/plugins/score-plugin-spline3d/Spline3D/Model.cpp @@ -60,22 +60,6 @@ QString ProcessModel::prettyName() const noexcept return QStringLiteral("Spline 3D"); } -void ProcessModel::setDurationAndScale(const TimeVal& newDuration) noexcept -{ - // We only need to change the duration. - setDuration(newDuration); -} - -void ProcessModel::setDurationAndGrow(const TimeVal& newDuration) noexcept -{ - setDuration(newDuration); -} - -void ProcessModel::setDurationAndShrink(const TimeVal& newDuration) noexcept -{ - setDuration(newDuration); -} - TimeVal ProcessModel::contentDuration() const noexcept { return duration(); diff --git a/src/plugins/score-plugin-spline3d/Spline3D/Model.hpp b/src/plugins/score-plugin-spline3d/Spline3D/Model.hpp index a82fa7aac3..32a03763d0 100644 --- a/src/plugins/score-plugin-spline3d/Spline3D/Model.hpp +++ b/src/plugins/score-plugin-spline3d/Spline3D/Model.hpp @@ -73,11 +73,6 @@ class ProcessModel final : public Process::ProcessModel void splineChanged() W_SIGNAL(splineChanged); private: - //// ProcessModel //// - void setDurationAndScale(const TimeVal& newDuration) noexcept override; - void setDurationAndGrow(const TimeVal& newDuration) noexcept override; - void setDurationAndShrink(const TimeVal& newDuration) noexcept override; - TimeVal contentDuration() const noexcept override; void loadPreset(const Process::Preset& preset) override; Process::Preset savePreset() const noexcept override;