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.
|
#include <Slot.h>
Public Member Functions | |
AZ_CLASS_ALLOCATOR (SlotDefinition, AZ::SystemAllocator) | |
AZ_RTTI (SlotDefinition, "{917F9C1A-1513-4694-B25A-D6404A4991ED}") | |
SlotDefinition (SlotDirection slotDirection, SlotType slotType, const AZStd::string &name, const AZStd::string &displayName, const AZStd::string &description={}, const DataTypeList &supportedDataTypes={}, const AZStd::any &defaultValue={}, int minimumSlots={}, int maximumSlots={}, const AZStd::string &addButtonLabel={}, const AZStd::string &addButtonTooltip={}, const AZStd::vector< AZStd::string > &enumValues={}, bool visibleOnNode=true, bool editableOnNode=true) | |
SlotDirection | GetSlotDirection () const |
SlotType | GetSlotType () const |
bool | SupportsValues () const |
Returns true if this slot supports assigning values. | |
bool | SupportsDataTypes () const |
Returns true if this slot supports data types. | |
bool | SupportsConnections () const |
Returns whether this slot's configuration allows connections to other slots. | |
bool | SupportsExtendability () const |
Returns whether or not this slot is configured to be extendable. | |
bool | IsVisibleOnNode () const |
Return true if this slot is configured to appear on node UI, otherwise false. | |
bool | IsEditableOnNode () const |
Returns true if the value of this slot should be editable on the node UI, otherwise false. | |
bool | Is (SlotDirection slotDirection, SlotType slotType) const |
Returns whether this slot matches the given configuration. | |
const SlotName & | GetName () const |
Valid for all slot configurations. | |
const AZStd::string & | GetDisplayName () const |
Valid for all slot configurations. | |
const AZStd::string & | GetDescription () const |
Valid for all slot configurations. | |
const DataTypeList & | GetSupportedDataTypes () const |
Valid for Data and Property slots. Otherwise returns an empty DataTypeList. | |
AZStd::any | GetDefaultValue () const |
Valid for Input Data and Property slots. Otherwise returns an empty AZStd::any. | |
const AZStd::vector< AZStd::string > & | GetEnumValues () const |
Options exposed if this slot type is an enumeration with multiple values. | |
const int | GetMinimumSlots () const |
These methods are only pertinent for extendable slots. More... | |
const int | GetMaximumSlots () const |
Retrieve the maximum configured number of extendable slots (returns a default value if not configured) | |
const AZStd::string & | GetExtensionLabel () const |
Retrieve the text for the label with the '+' sign for adding extendable slots. | |
const AZStd::string & | GetExtensionTooltip () const |
Retrieve the hover tooltip for the label with the '+' sign for adding extendable slots. | |
Provides static information about a Slot, like its name and data type. The set of features provided by this slot is determined by the combination of SlotDirection and SlotType, which is set depending on which Create* function is used to create the SlotDefinition.
This information will either be hard-coded for each Node type, or reflected from some other source, so it does not need to be saved with the Node data (i.e. it isn't added to a SerializeContext).
See the Node class documentation for more.
(We take the approach of using a single class with some features unused in specific configurations because it ends up being cleaner than a complex class hierarchy).
const int GraphModel::SlotDefinition::GetMinimumSlots | ( | ) | const |
These methods are only pertinent for extendable slots.
Retrieve the minimum configured number of extendable slots (returns a default value if not configured)