Skip to content

Commit

Permalink
[js] make dependency on media plug-in optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jan 17, 2024
1 parent 3905a15 commit a2ac90c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plugins/score-plugin-js/JS/Qml/EditContext.curve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
#include <Curve/Segment/PointArray/PointArraySegment.hpp>

#include <JS/Qml/EditContext.hpp>
#if SCORE_PLUGIN_MEDIA
#include <Media/Step/Commands.hpp>
#include <Media/Step/Model.hpp>

#endif
namespace JS
{

Expand Down Expand Up @@ -69,6 +70,7 @@ void EditJsContext::setCurvePoints(QObject* process, QVector<QVariantList> point

void EditJsContext::setSteps(QObject* process, QVector<double> points)
{
#if SCORE_PLUGIN_MEDIA
if(points.empty())
return;

Expand All @@ -84,6 +86,7 @@ void EditJsContext::setSteps(QObject* process, QVector<double> points)
submit(
*m,
new Media::ChangeSteps{*proc, ossia::float_vector{points.begin(), points.end()}});
#endif
}

}

0 comments on commit a2ac90c

Please sign in to comment.