Loading...
Searching...
No Matches
plugins/score-plugin-spline3d/Spline3D/commands.hpp
1#pragma once
2#include <score/command/Command.hpp>
3#include <score/model/path/Path.hpp>
4
5#include <ossia/dataflow/nodes/spline/spline3d.hpp>
6
7namespace Spline3D
8{
9class ProcessModel;
10const CommandGroupKey& CommandFactoryName();
11
12class ChangeSpline final : public score::Command
13{
14 SCORE_COMMAND_DECL(Spline3D::CommandFactoryName(), ChangeSpline, "Change 3D Spline")
15public:
16 ChangeSpline(const ProcessModel& autom, const ossia::spline3d_data& newval);
17
18public:
19 void undo(const score::DocumentContext& ctx) const override;
20 void redo(const score::DocumentContext& ctx) const override;
21
22 void update(const ProcessModel&, const ossia::spline3d_data& newval);
23 void update(const ProcessModel&, ossia::spline3d_data&& newval);
24
25protected:
26 void serializeImpl(DataStreamInput& s) const override;
27 void deserializeImpl(DataStreamOutput& s) override;
28
29private:
30 Path<ProcessModel> m_path;
31 ossia::spline3d_data m_old, m_new;
32};
33}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition plugins/score-plugin-spline3d/Spline3D/commands.hpp:13
Definition score-plugin-spline3d/Spline3D/Model.hpp:19
The Command class.
Definition Command.hpp:34
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition DocumentContext.hpp:18