4#include "Engine/Network/NetworkManager.h"
5#include "Engine/Network/OperatorTable.h"
6#include "Engine/UndoRedo/UndoCommand.h"
30 auto opInfo = op::OperatorTable::getOpInfo(typeName_);
35 nm().
moveNode(opId_, position_,
true);
38 UndoCommandType type()
const override {
return UndoCommandType::CreateNode; }
42 std::string typeName_;
Basic attribute, parameter, and node types for Enzo.
uint64_t OpId
The unique ID assigned to each node in the network.
Definition Types.h:137
Definition CreateNodeCommand.h:14
The unique runtime representation of a node.
Definition GeometryOperator.h:16
const op::OpInfo & getType() const
Returns the static type definition this node was created from.
Definition GeometryOperator.cpp:163
Vector2 getPosition() const
Returns the node's position in the network graph.
Definition GeometryOperator.h:116
void restoreOperator(OpId opId, op::OpInfo opInfo)
Restores a previously removed operator with a specific OpId.
Definition NetworkManager.cpp:74
void removeOperator(OpId opId, bool removeConnections=true)
Removes an operator from the network.
Definition NetworkManager.cpp:87
void moveNode(OpId opId, Vector2 newPos, bool skipUndo=false)
Moves a node to a new position, pushing an undo command.
Definition NetworkManager.cpp:42
GeometryOperator & getGeoOperator(nt::OpId opId)
Returns a reference to the GeometryOperator with the given OpId.
Definition NetworkManager.cpp:141
Definition UndoCommand.h:8
const std::string & getName() const
Returns the internal type name shared by all nodes of this type (eg. "copy_to_points")
Definition OpInfo.h:30