|
|
nt::Network & | network () |
| | Returns the network holding every node, its wiring, and its scopes.
|
| |
|
auto | nodes () |
| | Returns an iterable range over all nodes in the network.
|
| |
|
| NetworkManager (const NetworkManager &obj)=delete |
| | Deleted the copy constructor for singleton.
|
| |
| NodeId | createNode (const nt::NodeType &nodeType, const Path &parent=Path("/"), const std::string &name="", Vector2 position={0.f, 0.f}) |
| | Creates a new node inside a scope.
|
| |
| Node * | getNodeAtPath (const Path &path) |
| | Returns the node at an exact path, or null when no node is there.
|
| |
| Scope * | getScope (const Path &path) |
| | Returns the scope at a path, or null when no scope sits there.
|
| |
| std::vector< NodeId > | getChildNodeIds (const Path &scope) |
| | Returns the ids of the nodes living directly inside a scope, in no particular order.
|
| |
|
std::optional< NodeId > | getDisplayNode () |
| | Returns the node ID for the node with its display flag set. There can only be only be one node displayed at a time. Return value is nullopt if no node is set to display.
|
| |
|
enzo::nt::UpdateLock | lockUpdates () |
| | Creates a lock object that prevents cooking until destroyed.
|
| |
|
void | update () |
| | Cooks dirtied nodes, is called automatically.
|
| |
| bool | isValidNode (nt::NodeId nodeId) |
| | Returns whether the node exists in the network and is valid.
|
| |
|
Node & | getNode (nt::NodeId nodeId) |
| | Returns a reference to the Node with the given NodeId.
|
| |
|
void | setDisplayNode (NodeId nodeId) |
| | Sets given NodeId to be displayed, releasing previous display Node.
|
| |
|
void | clearDisplayFlag () |
| | Clears the display flag so no node is displayed.
|
| |
| std::optional< NodeId > | getPrimaryNode () |
| | Returns the node ID of the primary node, or nullopt when none.
|
| |
|
void | setPrimaryNode (NodeId nodeId) |
| | Sets the given NodeId as the primary node, releasing the previous one.
|
| |
|
void | clearPrimaryNode () |
| | Clears the primary node so none is primary.
|
| |
| floatT | getFrame () const |
| | Returns the frame the scene sits on.
|
| |
|
void | setFrame (floatT frame) |
| | Moves the scene to a frame, clamped to the playback range.
|
| |
|
intT | getStartFrame () const |
| | Returns the first frame of the playback range.
|
| |
|
intT | getEndFrame () const |
| | Returns the last frame of the playback range.
|
| |
| void | setStartFrame (intT frame) |
| | Sets the frame the playback range starts on.
|
| |
| void | setEndFrame (intT frame) |
| | Sets the frame the playback range ends on.
|
| |
|
floatT | getFps () const |
| | Returns how many frames make up a second of playback.
|
| |
| void | setFps (floatT fps) |
| | Sets how many frames make up a second of playback.
|
| |
| floatT | getTime () const |
| | Returns the current frame as seconds, where the start of frame 1 is zero.
|
| |
| void | setSelectedNode (NodeId nodeId, bool selected, bool add=false) |
| | Set the selection state for the given node.
|
| |
|
const std::vector< enzo::nt::NodeId > & | getSelectedNodes () |
| | Returns the NodeIds for all selected nodes.
|
| |
|
void | setSelectedNodes (std::vector< enzo::nt::NodeId > nodeIds) |
| | Replaces the entire selection with the given set of nodes.
|
| |
| void | moveNode (NodeId nodeId, Vector2 newPos, bool skipUndo=false) |
| | Moves a node to a new position, pushing an undo command.
|
| |
| void | deleteNode (NodeId nodeId) |
| | Deletes a node, pushing an undo command.
|
| |
| void | createNodeWithId (NodeId nodeId, const nt::NodeType &nodeType, const Path &path, Vector2 position) |
| | Creates a node with an identity the caller dictates rather than one picked here.
|
| |
|
void | clear () |
| | Clears all nodes and resets the network to its initial state.
|
| |
| void | cook (enzo::nt::NodeId nodeId) |
| | Cooks the given node.
|
| |
| enzo::NodePacket | cookOutput (enzo::nt::NodeId nodeId, unsigned int outputIndex) |
| | Returns a copy of one of a node's outputs.
|
| |
|
nt::NetworkGraph & | graph () |
| | Returns the graph that owns the network's wiring and dependencies.
|
| |
| unsigned int | getInputCount (NodeId nodeId) |
| | Returns how many inputs a node currently takes.
|
| |
| nt::Connection | connectNodes (NodeId inputNodeId, unsigned int inputIndex, NodeId outputNodeId, unsigned int outputIndex) |
| | Wires one node's output into another node's input.
|
| |
| void | disconnectNodes (const nt::Connection &connection) |
| | Removes a wired connection between two nodes.
|
| |
| Node * | findNode (const NetworkPath &path, NodeId fromNode=nullNode) |
| | Resolves a node reference such as "grid1" or "../grid1" to its node.
|
| |
| std::weak_ptr< prm::NodeParameter > | findParameter (const NetworkPath &path, NodeId fromNode=nullNode) |
| | Resolves a parameter reference such as "grid1.tx" to its parameter.
|
| |
|
UndoStack & | undoStack () |
| |
| void | _reset () |
| | For use in unit tests, resets the state of the node.
|
| |
|
|
|
boost::signals2::signal< void(std::optional< nt::NodeId >)> | displayNodeChanged |
| |
|
boost::signals2::signal< void(std::shared_ptr< const enzo::NodePacket >)> | displayGeoChanged |
| |
|
boost::signals2::signal< void(std::shared_ptr< const enzo::NodePacket >)> | selectedGeoChanged |
| |
|
boost::signals2::signal< void(std::optional< nt::NodeId >)> | primaryNodeChanged |
| |
|
boost::signals2::signal< void(std::shared_ptr< const enzo::NodePacket >)> | primaryGeoChanged |
| |
|
boost::signals2::signal< void(std::vector< nt::NodeId > selectedNodeIds)> | selectedNodesChanged |
| |
|
boost::signals2::signal< void(nt::NodeId)> | nodeCreated |
| |
|
boost::signals2::signal< void(nt::NodeId)> | nodeRemoved |
| |
|
boost::signals2::signal< void(nt::Connection)> | connectionCreated |
| |
|
boost::signals2::signal< void(nt::Connection)> | connectionRemoved |
| |
|
boost::signals2::signal< void()> | networkCleared |
| |
|
boost::signals2::signal< void(nt::NodeId, Vector2)> | nodePositionChanged |
| |
|
boost::signals2::signal< void(floatT frame)> | frameChanged |
| |
|
boost::signals2::signal< void(intT startFrame, intT endFrame)> | frameRangeChanged |
| |
|
boost::signals2::signal< void(floatT fps)> | fpsChanged |
| |
The central coordinator of the engine's node system.
The manager owns one nt::Network and drives everything that happens to it. The network holds the nodes, the wiring, and the scopes, while the manager owns the lifecycle around them, so creating and deleting nodes, cooking, undo, selection, and the signals the interface listens to.
Keeping the network a plain value means it can be handed straight to something that only needs to read it, such as the serializer.
- Note
- A singleton, so every part of the engine works against one network.