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

#include <GraphModelBus.h>

Inherits AZ::EBusTraits.

Public Types

using BusIdType = AZ::EntityId
 

Public Member Functions

virtual GraphCanvas::NodeId AddNode (GraphModel::NodePtr node, AZ::Vector2 &sceneDropPosition)=0
 Add a new node at the specified position.
 
virtual bool RemoveNode (GraphModel::NodePtr node)=0
 Remove the specified node.
 
virtual AZ::Vector2 GetPosition (GraphModel::NodePtr node) const =0
 Retrieve the position for the specified node.
 
virtual void WrapNode (GraphModel::NodePtr wrapperNode, GraphModel::NodePtr node)=0
 Embed a node on a wrapper node.
 
virtual void WrapNodeOrdered (GraphModel::NodePtr wrapperNode, GraphModel::NodePtr node, AZ::u32 layoutOrder)=0
 Embed a node on a wrapper node with a layout order configured.
 
virtual void UnwrapNode (GraphModel::NodePtr wrapperNode, GraphModel::NodePtr node)=0
 
virtual bool IsNodeWrapped (GraphModel::NodePtr node) const =0
 Return if the specified node is a wrapped node.
 
virtual void SetWrapperNodeActionString (GraphModel::NodePtr node, const char *actionString)=0
 
virtual GraphModel::ConnectionPtr AddConnection (GraphModel::SlotPtr sourceSlot, GraphModel::SlotPtr targetSlot)=0
 Add a new connection between the specified source and target.
 
virtual GraphModel::ConnectionPtr AddConnectionBySlotId (GraphModel::NodePtr sourceNode, const GraphModel::SlotId &sourceSlotId, GraphModel::NodePtr targetNode, const GraphModel::SlotId &targetSlotId)=0
 Create a new connection between the specified source and target specified slots.
 
virtual bool AreSlotsConnected (GraphModel::NodePtr sourceNode, const GraphModel::SlotId &sourceSlotId, GraphModel::NodePtr targetNode, const GraphModel::SlotId &targetSlotId) const =0
 Check if there is a connection between the specified source and target specified slots.
 
virtual bool RemoveConnection (GraphModel::ConnectionPtr connection)=0
 Remove the specified connection.
 
virtual GraphModel::SlotId ExtendSlot (GraphModel::NodePtr node, const GraphModel::SlotName &slotName)=0
 Extend the given Slot on the specified node.
 
virtual GraphModel::NodePtr GetNodeById (const GraphCanvas::NodeId &nodeId)=0
 Returns a GraphModel::Node that corresponds to the Graph Canvas Node Id.
 
virtual GraphModel::NodePtrList GetNodesFromGraphNodeIds (const AZStd::vector< GraphCanvas::NodeId > &nodeIds)=0
 Retrieve the list of GraphModel::Nodes for the specified GraphCanvas node IDs.
 
virtual GraphCanvas::NodeId GetNodeIdByNode (GraphModel::NodePtr node) const =0
 Returns the GraphCanvas::NodeId that corresponds to the specified GraphModel::Node.
 
virtual GraphCanvas::SlotId GetSlotIdBySlot (GraphModel::SlotPtr slot) const =0
 Returns the GraphCanvas::SlotId that corresponds to the specified GraphModel::Slot.
 
virtual GraphModel::NodePtrList GetNodes ()=0
 Retrieve all of the nodes in our graph.
 
virtual GraphModel::NodePtrList GetSelectedNodes ()=0
 Retrieve the selected nodes in our graph.
 
virtual void SetSelected (GraphModel::NodePtrList nodes, bool selected)=0
 Set the selected property on the specified Nodes.
 
virtual void ClearSelection ()=0
 Clears the selection in the scene.
 
virtual void EnableNode (GraphModel::NodePtr node)=0
 Enable the specified node in the graph.
 
virtual void DisableNode (GraphModel::NodePtr node)=0
 Disable the specified node in the graph.
 
virtual void CenterOnNodes (GraphModel::NodePtrList nodes)=0
 Move the view to be centered on the given Nodes.
 
virtual AZ::Vector2 GetMajorPitch () const =0
 Retrieve the major pitch of the grid for this scene graph.
 
virtual void SetThumbnailImageOnNode (GraphModel::NodePtr node, const QPixmap &image)=0
 
virtual void SetThumbnailOnNode (GraphModel::NodePtr node, ThumbnailItem *item)=0
 
virtual void RemoveThumbnailFromNode (GraphModel::NodePtr node)=0
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 

Detailed Description

GraphControllerRequests Used to invoke functionality on specific Graph Controllers

Member Function Documentation

◆ RemoveThumbnailFromNode()

virtual void GraphModelIntegration::GraphControllerRequests::RemoveThumbnailFromNode ( GraphModel::NodePtr  node)
pure virtual

Remove the thumbnail from a specified node. If you created your own custom ThumbnailItem and set it using SetThumbnailOnNode, then ownership is passed back to whoever calls this method so they are in charge of deleting it.

Parameters
nodeNode to remove the thumbnail from

◆ SetThumbnailImageOnNode()

virtual void GraphModelIntegration::GraphControllerRequests::SetThumbnailImageOnNode ( GraphModel::NodePtr  node,
const QPixmap &  image 
)
pure virtual

Embed a thumbnail image on a specified node. This is the most straightforward use-case where the client just wants to show a static image. The thumnbnail image can be updated after being set using this same API.

Parameters
nodeNode to add the thumbnail on
imagePixmap for the image of the thumbnail

◆ SetThumbnailOnNode()

virtual void GraphModelIntegration::GraphControllerRequests::SetThumbnailOnNode ( GraphModel::NodePtr  node,
ThumbnailItem item 
)
pure virtual

Embed a custom thumbnail item on a specified node. This allows the client to implement their own ThumbnailItem to display anything they want by overriding paint() method. Ownership of the ThumbnailItem is passed to the node layout.

Parameters
nodeNode to add the thumbnail on
itemCustom item for the thumbnail

◆ SetWrapperNodeActionString()

virtual void GraphModelIntegration::GraphControllerRequests::SetWrapperNodeActionString ( GraphModel::NodePtr  node,
const char *  actionString 
)
pure virtual

Set the action string for the specified node (used by wrapper nodes for setting the action widget label)

◆ UnwrapNode()

virtual void GraphModelIntegration::GraphControllerRequests::UnwrapNode ( GraphModel::NodePtr  wrapperNode,
GraphModel::NodePtr  node 
)
pure virtual

Unwrap a node from a wrapper node This results in a no-op if node isn't actually wrapped on the wrapperNode


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