Skip to content

Commit

Permalink
[spline] Fix some issues in spline3d and 2d due to exprtk api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Feb 21, 2024
1 parent d66c5df commit 2a16ee1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/plugins/score-plugin-spline/Spline/GeneratorDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
)_");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
)_");
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/score-plugin-spline3d/Spline3D/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ PROCESS_METADATA(
"Automation following a 3D curve", "ossia score",
(QStringList{"Curve", "Automation", "3D"}), {},
{std::vector<Process::PortType>{Process::PortType::Message}},
Process::ProcessFlags::SupportsTemporal)
Process::ProcessFlags::SupportsLasting)
16 changes: 0 additions & 16 deletions src/plugins/score-plugin-spline3d/Spline3D/Model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 0 additions & 5 deletions src/plugins/score-plugin-spline3d/Spline3D/Model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2a16ee1

Please sign in to comment.