Open 3D Engine GraphModel Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
GraphModelIntegration::GraphController Class Reference

This is the main class for binding the node graph data to the UI provided by Graph Canvas. More...

#include <GraphController.h>

Inherits GraphCanvas::GraphModelRequestBus::Handler, GraphCanvas::SceneNotificationBus::Handler, GraphCanvas::EntitySaveDataRequestBus::Router, and GraphControllerRequestBus::Handler.

Public Member Functions

 AZ_RTTI (GraphController, "{E8433794-4BAE-4B63-B5A5-6EE69DFF0793}")
 
 GraphController (GraphModel::GraphPtr graph, AZ::EntityId graphCanvasSceneId)
 
 GraphController (const GraphController &)=delete
 
GraphModel::GraphPtr GetGraph ()
 
const GraphModel::GraphPtr GetGraph () const
 
const AZ::EntityId GetGraphCanvasSceneId () const
 
GraphCanvas::NodeId AddNode (GraphModel::NodePtr node, AZ::Vector2 &sceneDropPosition) override
 
bool RemoveNode (GraphModel::NodePtr node) override
 
AZ::Vector2 GetPosition (GraphModel::NodePtr node) const override
 
void WrapNode (GraphModel::NodePtr wrapperNode, GraphModel::NodePtr node) override
 
void WrapNodeOrdered (GraphModel::NodePtr wrapperNode, GraphModel::NodePtr node, AZ::u32 layoutOrder) override
 
void UnwrapNode (GraphModel::NodePtr wrapperNode, GraphModel::NodePtr node) override
 
bool IsNodeWrapped (GraphModel::NodePtr node) const override
 
void SetWrapperNodeActionString (GraphModel::NodePtr node, const char *actionString) override
 
GraphModel::ConnectionPtr AddConnection (GraphModel::SlotPtr sourceSlot, GraphModel::SlotPtr targetSlot) override
 
GraphModel::ConnectionPtr AddConnectionBySlotId (GraphModel::NodePtr sourceNode, const GraphModel::SlotId &sourceSlotId, GraphModel::NodePtr targetNode, const GraphModel::SlotId &targetSlotId) override
 
bool AreSlotsConnected (GraphModel::NodePtr sourceNode, const GraphModel::SlotId &sourceSlotId, GraphModel::NodePtr targetNode, const GraphModel::SlotId &targetSlotId) const override
 
bool RemoveConnection (GraphModel::ConnectionPtr connection) override
 
GraphModel::SlotId ExtendSlot (GraphModel::NodePtr node, const GraphModel::SlotName &slotName) override
 
GraphModel::NodePtr GetNodeById (const GraphCanvas::NodeId &nodeId) override
 
GraphModel::NodePtrList GetNodesFromGraphNodeIds (const AZStd::vector< GraphCanvas::NodeId > &nodeIds) override
 
GraphCanvas::NodeId GetNodeIdByNode (GraphModel::NodePtr node) const override
 
GraphCanvas::SlotId GetSlotIdBySlot (GraphModel::SlotPtr slot) const override
 
GraphModel::NodePtrList GetNodes () override
 
GraphModel::NodePtrList GetSelectedNodes () override
 
void SetSelected (GraphModel::NodePtrList nodes, bool selected) override
 
void ClearSelection () override
 
void EnableNode (GraphModel::NodePtr node) override
 
void DisableNode (GraphModel::NodePtr node) override
 
void CenterOnNodes (GraphModel::NodePtrList nodes) override
 
AZ::Vector2 GetMajorPitch () const override
 
void SetThumbnailImageOnNode (GraphModel::NodePtr node, const QPixmap &image) override
 
void SetThumbnailOnNode (GraphModel::NodePtr node, ThumbnailItem *item) override
 
void RemoveThumbnailFromNode (GraphModel::NodePtr node) override
 

Detailed Description

This is the main class for binding the node graph data to the UI provided by Graph Canvas.

Member Function Documentation

◆ AddNode()

GraphCanvas::NodeId GraphModelIntegration::GraphController::AddNode ( GraphModel::NodePtr  node,
AZ::Vector2 &  sceneDropPosition 
)
override

Adds a node to the Graph and creates the corresponding Graph Canvas UI elements

Parameters
nodeThe node to add. This should be a freshly created Node that hasn't been added to the Graph yet.
sceneDropPositionThe position in the Graph Cavnas scene where the Node was dropped

The documentation for this class was generated from the following file: