3#include "Engine/UndoRedo/UndoCommand.h"
4#include "Engine/Network/NetworkManager.h"
5#include "Engine/Operator/OperatorTable.h"
32 auto opInfo = op::OperatorTable::getOpInfo(typeName_);
37 nm().
moveNode(opId_, position_,
true);
40 UndoCommandType type()
const override {
return UndoCommandType::CreateNode; }
44 std::string typeName_;
45 bt::Vector2f position_;
Basic attribute, parameter, and node types for Enzo.
uint64_t OpId
The unique ID assigned to each node in the network.
Definition Types.h:87
Definition CreateNodeCommand.h:14
The unique runtime representation of a node.
Definition GeometryOperator.h:20
std::string getTypeName()
Returns the name belonging to this type of node (eg. grid or transform). Not to be confused with the ...
Definition GeometryOperator.cpp:196
bt::Vector2f getPosition() const
Returns the node's position in the network graph.
Definition GeometryOperator.h:156
void restoreOperator(OpId opId, op::OpInfo opInfo)
Restores a previously removed operator with a specific OpId.
Definition NetworkManager.cpp:69
void removeOperator(OpId opId)
Removes an operator and all its connections from the network.
Definition NetworkManager.cpp:84
GeometryOperator & getGeoOperator(nt::OpId opId)
Returns a reference to the GeometryOperator with the given OpId.
Definition NetworkManager.cpp:140
void moveNode(OpId opId, bt::Vector2f newPos, bool skipUndo=false)
Moves a node to a new position, pushing an undo command.
Definition NetworkManager.cpp:45
Definition UndoCommand.h:8