Open 3D Engine ScriptCanvas 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.
ScriptCanvas::GraphRequests Class Referenceabstract

These are public graph requests. More...

#include <GraphBus.h>

Inherits AZ::EBusTraits.

Public Types

using BusIdType = ScriptCanvasId
 

Public Member Functions

virtual bool AddNode (const AZ::EntityId &)=0
 Add a ScriptCanvas Node to the Graph.
 
virtual bool RemoveNode (const AZ::EntityId &nodeId)=0
 Remove a ScriptCanvas Node to the Graph.
 
virtual bool AddConnection (const AZ::EntityId &)=0
 Add a ScriptCanvas Connection to the Graph.
 
virtual bool RemoveConnection (const AZ::EntityId &nodeId)=0
 Remove a ScriptCanvas Connection from the Graph.
 
virtual bool AddDependentAsset (AZ::EntityId nodeId, const AZ::TypeId assetType, const AZ::Data::AssetId assetId)=0
 Add an asset dependency to the Graph.
 
virtual bool RemoveDependentAsset (AZ::EntityId nodeId)=0
 Remove an asset dependency from the Graph.
 
virtual AZStd::vector< AZ::EntityId > GetNodes () const =0
 
virtual AZStd::vector< AZ::EntityId > GetConnections () const =0
 
virtual AZStd::vector< EndpointGetConnectedEndpoints (const Endpoint &firstEndpoint) const =0
 
virtual bool FindConnection (AZ::Entity *&connectionEntity, const Endpoint &firstEndpoint, const Endpoint &otherEndpoint) const =0
 
virtual SlotFindSlot (const Endpoint &endpoint) const =0
 
virtual AZ::Entity * GetGraphEntity () const =0
 
virtual GraphGetGraph ()=0
 Retrieves the Graph Component directly using the BusId.
 
virtual bool Connect (const AZ::EntityId &sourceNodeId, const SlotId &sourceSlot, const AZ::EntityId &targetNodeId, const SlotId &targetSlot)=0
 
virtual bool Disconnect (const AZ::EntityId &sourceNodeId, const SlotId &sourceSlot, const AZ::EntityId &targetNodeId, const SlotId &targetSlot)=0
 
virtual bool ConnectByEndpoint (const Endpoint &sourceEndpoint, const Endpoint &targetEndpoint)=0
 
virtual AZ::Outcome< void, AZStd::string > CanCreateConnectionBetween (const Endpoint &sourceEndpoint, const Endpoint &targetEndpoint) const =0
 
virtual AZ::Outcome< void, AZStd::string > CanConnectionExistBetween (const Endpoint &sourceEndpoint, const Endpoint &targetEndpoint) const =0
 
virtual bool DisconnectByEndpoint (const Endpoint &sourceEndpoint, const Endpoint &targetEndpoint)=0
 
virtual bool DisconnectById (const AZ::EntityId &connectionId)=0
 
virtual AZStd::unordered_set< AZ::Entity * > CopyItems (const AZStd::unordered_set< AZ::Entity * > &entities)=0
 Copies any Node and Connection Entities that belong to the graph to a GraphSerializableField.
 
virtual void AddItems (const AZStd::unordered_set< AZ::Entity * > &entities)=0
 Adds any Node and Connection Entities to the graph.
 
virtual void RemoveItems (const AZStd::unordered_set< AZ::Entity * > &entities)=0
 Removes any Node and Connection Entities that belong to the graph.
 
virtual AZStd::unordered_set< AZ::Entity * > GetItems () const =0
 Retrieves any entities that can be be added to graphs.
 
virtual bool AddItem (AZ::Entity *itemEntity)=0
 Add item to graph if the item is of the type that can be added to the graph.
 
virtual bool RemoveItem (AZ::Entity *itemEntity)=0
 Remove item if it is on the graph.
 
virtual GraphDataGetGraphData ()=0
 Retrieves a pointer the GraphData structure stored on the graph.
 
virtual const GraphDataGetGraphDataConst () const =0
 
virtual bool AddGraphData (const GraphData &)=0
 
virtual void RemoveGraphData (const GraphData &)=0
 
virtual bool IsBatchAddingGraphData () const =0
 
virtual void SetIsGraphObserved (bool observed)=0
 
virtual bool IsGraphObserved () const =0
 
virtual VariableId FindAssetVariableIdByRuntimeVariableId (VariableId runtimeId) const =0
 
virtual AZ::EntityId FindAssetNodeIdByRuntimeNodeId (AZ::EntityId editorNode) const =0
 
virtual AZ::Data::AssetId GetAssetId () const =0
 
virtual GraphIdentifier GetGraphIdentifier () const =0
 
virtual AZStd::string GetAssetName () const =0
 
virtual NodeFindNode (AZ::EntityId nodeId) const =0
 Looks up the nodeId within the bus handler.
 
virtual AZ::EntityId FindRuntimeNodeIdByAssetNodeId (AZ::EntityId runtimeNode) const =0
 
virtual AZ::EntityId GetRuntimeEntityId () const =0
 Returns the entity id of the execution component.
 
virtual AZStd::pair< EndpointMapConstIterator, EndpointMapConstIterator > GetConnectedEndpointIterators (const Endpoint &endpoint) const =0
 
virtual bool IsEndpointConnected (const Endpoint &endpoint) const =0
 Returns whether the given endpoint has any connections.
 
virtual VariableDataGetVariableData ()=0
 Retrieves VariableData structure which manages variable data for the execution component.
 
virtual const VariableDataGetVariableDataConst () const =0
 
virtual const GraphVariableMapping * GetVariables () const =0
 Retrieves a map of variable id to variable name and variable datums pair.
 
virtual GraphVariableFindVariable (AZStd::string_view varName)=0
 
virtual GraphVariableFindVariableById (const VariableId &variableId)=0
 
virtual void RefreshVariableReferences (const VariableId &variableId)=0
 

Static Public Attributes

static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 

Detailed Description

These are public graph requests.

Member Function Documentation

◆ CanConnectionExistBetween()

virtual AZ::Outcome<void, AZStd::string> ScriptCanvas::GraphRequests::CanConnectionExistBetween ( const Endpoint sourceEndpoint,
const Endpoint targetEndpoint 
) const
pure virtual

Returns whether or not a connection could exist between the two connections. Does not take into account if the endpoints are already connected.

◆ CanCreateConnectionBetween()

virtual AZ::Outcome<void, AZStd::string> ScriptCanvas::GraphRequests::CanCreateConnectionBetween ( const Endpoint sourceEndpoint,
const Endpoint targetEndpoint 
) const
pure virtual

Returns whether or not a new connecion can be created between two connections. This will take into account if the endpoints are already connected

◆ FindVariable()

virtual GraphVariable* ScriptCanvas::GraphRequests::FindVariable ( AZStd::string_view  varName)
pure virtual

Searches for a variable with the specified name returns pointer to the first variable with the specified name or nullptr

◆ FindVariableById()

virtual GraphVariable* ScriptCanvas::GraphRequests::FindVariableById ( const VariableId variableId)
pure virtual

Searches for a variable by VariableId returns a pair of <variable datum pointer, variable name> with the supplied id The variable datum pointer is non-null if the variable has been found

◆ GetGraphEntity()

virtual AZ::Entity* ScriptCanvas::GraphRequests::GetGraphEntity ( ) const
pure virtual

Retrieves the Entity this Graph component is located on NOTE: There can be multiple Graph components on the same entity so calling FindComponent may not not return this GraphComponent


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