Navigation
API > API/Plugins > API/Plugins/TextureGraph
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UTG_Graph
References
| Module | TextureGraph |
| Header | /Engine/Plugins/Experimental/TextureGraph/Source/TextureGraph/Public/TG_Graph.h |
| Include | #include "TG_Graph.h" |
Syntax
UCLASS ()
class UTG_Graph : public UObject
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bIsGraphTraversalDirty | Pure data struct evaluated at runtime when traversal is required And a dirty flag | |
| TArray< TObjectPtr< UObject > > | ExtraEditorNodes | Extra data to hold information that is useful only in editor (like comments) | |
| FOnTextureGraphChanged | OnGraphChangedDelegate | ||
| FOnNodeEvaluation | OnNodePostEvaluateDelegate | ||
| FOnTGNodeSignatureChanged | OnNodeSignatureChangedDelegate | Notifiers. | |
| FOnTGNodeAdded | OnTGNodeAddedDelegate | ||
| FOnTGNodeRemoved | OnTGNodeRemovedDelegate | ||
| FOnTGNodeRenamed | OnTGNodeRenamedDelegate | ||
| FTG_GraphTraversal | Traversal |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddPostPasteNode
(
UTG_Node* NewNode |
Accessed from TG_EdGraphNode after a paste of a new node. | |
| void | AppendParamsSignature
(
FTG_Arguments& InOutArguments, |
Create a Signature from the current graph topology declaring the current Params as Arguments The signature list the input and output pins of the graph | |
| bool | ArePinsCompatible
(
const UTG_Pin* PinFrom, |
Are 2 Pins compatible ? This function check that the 2 pins can be connected to each other in terms of their argument types A non empty ConverterKey is also returned if required to achieve a conversion of the pin A to the pin B The converterKey is then used during the evaluation to find the proper Converter | |
| bool | Connect a output pin from a node to the specified input pin of the to node Return true if the edge is created or false if couldn't create the edge | ||
| bool | ConnectionCausesLoop
(
const UTG_Pin* PinFrom, |
Check that the connection from PinFrom to PInTO doesn't create a loop. | |
| void | Construct the Graph, can only be done once before "using" the graph. | ||
| UTG_Node * | CreateExpressionNode
(
UTG_Expression* NewExpression |
Create a node from an initialized Expression A new Node instance is created which uses initialized expression The Node is setup with its input and output pins reflecting the Signature of the Expression. | |
| UTG_Node * | CreateExpressionNode
(
const UClass* ExpressionClass |
Create a node from an Expression Class A new Expression instance is created along with the Node instance The Node is setup with its input and output pins reflecting the Signature of the Expression. | |
| void | |||
| void | |||
| void | Evaluate
(
FTG_EvaluationContext* InContext |
Evaluate the graph Traverse every nodes in the traversal order and call the node's expression evaluate method A configured evaluation context with a valid Cycle is required Evaluation is concretely implemented in FTG_Evaluation struct | |
| const UTG_Pin * | FindParamPin
(
const FName& InName |
||
| UTG_Pin * | FindParamPin
(
const FName& InName |
||
| FTG_Id | FindParamPinId
(
const FName& InName |
Find a param pin from its name. | |
| void | ForEachEdges
(
std::function< void(const UTG_Pin*, const UTG_Pin*)> visitor |
Iterate through all the VALID edges. | |
| void | ForEachNodes
(
std::function< void(const UTG_Node*, uint32)> visitor |
Iterate through all the VALID nodes. | |
| void | ForEachOutputSettings
(
std::function< void(const FTG_OutputSettings&)> visitor |
Iterate through all the output settings. | |
| void | ForEachParams
(
std::function< void(const UTG_Pin*, uint32)> visitor |
Iterate through all the VALID Param pins. | |
| void | ForEachPins
(
std::function< void(const UTG_Pin*, uint32, uint32)> visitor |
Iterate through all the VALID pins. | |
| void | ForEachVars
(
std::function< void(const FTG_Var*, uint32, uint32)> visitor |
Iterate through all the VALID vars. | |
| TArray< FTG_Id > | GatherAllSourceNodes
(
const UTG_Node* Node |
Useful function to navigate the Nodes Collect all the nodes which are connecting directly or indirectly into the specified node | |
| void | Utility functions used to establish the traversal order. | ||
| TArray< FTG_Id > | GatherSourceNodes
(
const UTG_Node* Node |
Traverseal of the graph and evaluation. | |
| int | GetAllOutputParamValues
(
TArray< FTG_Variant >& OutVariants, |
Get all the output param's value as FTG_Variant along with their names optionally | |
| const TArray< TObjectPtr< UObject > > & | |||
| FTG_Ids | |||
| const UTG_Node * | |||
| UTG_Node * | Accessors for nodes, pins, params. | ||
| UTG_Node * | GetNodeFromPinId
(
FTG_Id PinId |
||
| FTG_Ids | |||
| int | GetOutputParamTextures
(
TArray< FName >& OutNames, |
Get the names and ids of the output params which are Textures. | |
| bool | GetOutputParamValue
(
const FName& InName, |
Accessors for output param values after evaluation Only valid AFTER Evaluation of the graph Get the nammed |
|
| FTG_Ids | GetParamIds () |
||
| TArray< FName > | |||
| const UTG_Pin * | |||
| UTG_Pin * | |||
| const FTG_GraphTraversal & | GetTraversal () |
Access the traversal (update it if needed) | |
| FTG_Var * | |||
| bool | IsDependentInternal
(
const UTG_Graph* SourceGraph, |
||
| void | Log () |
Log the graph description to the log output buffer. | |
| FString | |||
| FString | |||
| FString | |||
| FString | LogTraversal
(
FString InTab |
||
| FString | |||
| void | OnNodeAdded
(
UTG_Node* InNode |
||
| void | OnNodeChanged
(
UTG_Node* InNode, |
||
| void | OnNodePinChanged
(
FTG_Id InPinId, |
||
| void | OnNodeRemoved
(
UTG_Node* InNode, |
||
| void | OnNodeRenamed
(
UTG_Node* InNode, |
||
| void | OnNodeSignatureChanged
(
UTG_Node* InNode |
||
| void | RemoveEdge
(
UTG_Node& NodeFrom, |
Remove a particular edge. | |
| void | RemoveNode
(
UTG_Node* InNode |
Remove the node The node is destroyed, its Uuid becomes invalid The associated Expression is dereferenced and potentially GCed All the associated Pins are destroyed As a consequence, each pin's associated connection Edge(s) are destroyed associated Var is dereferenced and potentially GCed | |
| void | RemovePinEdges
(
UTG_Node& InNode, |
Remove all the edges connected to the specified Pin. | |
| bool | RenameParam
(
FName OldName, |
Rename existing param. | |
| void | Reset () |
Reset the graph empty, destroy any nodes or associated resources. | |
| void | SetExtraEditorNodes
(
const TArray< TObjectPtr< const UObject > >& InNodes |
||
| void | Traverse
(
NodeVisitorFunction visitor, |
Traverse! | |
| bool | Validate
(
MixUpdateCyclePtr Cycle |
Validate internal checks, warnings and errors, Returns true if Graph is valid and has no validation errors. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| bool | Modify
(
bool bAlwaysMarkDirty |
Overwrite the modify to also mark the transient states as dirty. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostEditUndo () |
Override PostEditUndo method of UObject. | |
| void | PostLoad () |
Override the PostLoad method of UObject to finalize the un-serialization and fill in the runtime fields of the graph sub objects | |
| void | PreSave
(
FObjectPreSaveContext SaveContext |
Override PreSave method of UObject. | |
| void | Override Serialize method of UObject. |
Typedefs
| Name | Description |
|---|---|
| NodeVisitor | Traversal Visitor function type Node visited Index of the node in the traverse order Subgraph level we are currently visiting |
| NodeVisitorFunction |
Constants
| Name | Description |
|---|---|
| LogHeaderWidth |