Navigation
API > API/Plugins > API/Plugins/TextureGraph
| Name | UTG_Graph |
| Type | class |
| Header File | /Engine/Plugins/TextureGraph/Source/TextureGraph/Public/TG_Graph.h |
| Include Path | #include "TG_Graph.h" |
Syntax
UCLASS (MinimalAPI)
class UTG_Graph : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UTG_Graph
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| NodeVisitor | void(*)(UTG_Node *, int32, int32) | Traversal Visitor function type Node visited Index of the node in the traverse order Subgraph level we are currently visiting | TG_Graph.h |
| NodeVisitorFunction | std::function< void(UTG_Node *, int32, int32)> | TG_Graph.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| LogHeaderWidth | int32 | TG_Graph.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| IsRuntime | int | 0 = DiskVersion, 1 = Runtime copy made by TG_Editor, 2 = Runtime copy made by TG_Expression_Graph | TG_Graph.h | |
| OnGraphChangedDelegate | FOnTextureGraphChanged | TG_Graph.h | ||
| OnNodePostEvaluateDelegate | FOnNodeEvaluation | TG_Graph.h | ||
| OnNodeSignatureChangedDelegate | FOnTGNodeSignatureChanged | Notifiers. | TG_Graph.h | |
| OnTGNodeAddedDelegate | FOnTGNodeAdded | TG_Graph.h | ||
| OnTGNodeRemovedDelegate | FOnTGNodeRemoved | TG_Graph.h | ||
| OnTGNodeRenamedDelegate | FOnTGNodeRenamed | TG_Graph.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Name | FString | TG_Graph.h | ||
| Nodes | TArray< TObjectPtr< UTG_Node > > | The array of nodes indexed by their uuid.NodeIdx() An element can be null if the node has been removed during the authoring | TG_Graph.h | |
| Params | TMap< FName, FTG_Id > | TG_Graph.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddPostPasteNode
(
UTG_Node* NewNode |
Accessed from TG_EdGraphNode after a paste of a new node. | TG_Graph.h | |
| 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 | TG_Graph.h | ||
void CollectOutputSettings
(
TMap< FTG_Id, FTG_OutputSettings >& OutExportSettingsMap |
Get a map of output settings from the graph | TG_Graph.h | |
| 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 | TG_Graph.h | ||
virtual void Construct
(
FString InName |
Construct the Graph, can only be done once before "using" the graph. | TG_Graph.h | |
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. | TG_Graph.h | |
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. | TG_Graph.h | |
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 | TG_Graph.h | |
const UTG_Pin * FindParamPin
(
const FName& InName |
TG_Graph.h | ||
UTG_Pin * FindParamPin
(
const FName& InName |
TG_Graph.h | ||
| Find a param pin from its name. | TG_Graph.h | ||
| Iterate through all the VALID edges. | TG_Graph.h | ||
void ForEachNodes
(
std::function< void(const UTG_Node*, uint32)> visitor |
Iterate through all the VALID nodes. | TG_Graph.h | |
void ForEachOutputSettings
(
std::function< void(const FTG_OutputSettings&)> visitor |
Iterate through all the output settings. | TG_Graph.h | |
void ForEachParams
(
std::function< void(const UTG_Pin*, uint32)> visitor |
Iterate through all the VALID Param pins. | TG_Graph.h | |
void ForEachPins
(
std::function< void(const UTG_Pin*, uint32, uint32)> visitor |
Iterate through all the VALID pins. | TG_Graph.h | |
void ForEachVars
(
std::function< void(const FTG_Var*, uint32, uint32)> visitor |
Iterate through all the VALID vars. | TG_Graph.h | |
| Useful function to navigate the Nodes Collect all the nodes which are connecting directly or indirectly into the specified node | TG_Graph.h | ||
TArray< FTG_Id > GatherSourceNodes
(
const UTG_Node* Node |
Traverseal of the graph and evaluation. | TG_Graph.h | |
int GetAllOutputParamValues
(
TArray< FTG_Variant >& OutVariants, |
Get all the output param's value as FTG_Variant along with their names optionally | TG_Graph.h | |
const TArray< TObjectPtr< UObject > > & GetExtraEditorNodes() |
TG_Graph.h | ||
FTG_Ids GetInputParamIds() |
TG_Graph.h | ||
FTG_VarMap GetInputParamsVarMap() |
Get a map of input parameter vars from the graph. | TG_Graph.h | |
| TG_Graph.h | |||
| Accessors for nodes, pins, params. | TG_Graph.h | ||
| Access the Node owning a Pin from the Pin Id. | TG_Graph.h | ||
FTG_Ids GetOutputParamIds() |
TG_Graph.h | ||
| Get the names and ids of the output params which are Textures. | TG_Graph.h | ||
bool GetOutputParamValue
(
const FName& InName, |
Accessors for output param values after evaluation Only valid AFTER Evaluation of the graph Get the nammed |
TG_Graph.h | |
FTG_Ids GetParamIds() |
Accessing the params A param is simply the Id of a pin exposed as a param of the graph, the pin can be retrieved using GetPin() The Param name is the Alias Name of the associated TG_Pin | TG_Graph.h | |
| TG_Graph.h | |||
| TG_Graph.h | |||
| TG_Graph.h | |||
| Access a Pin from Id. | TG_Graph.h | ||
const FTG_GraphTraversal & GetTraversal() |
Access the traversal (update it if needed) | TG_Graph.h | |
| Access a Var from Id (the Id of a Var is similar to the Id of the Pin that owns it. | TG_Graph.h | ||
void Log() |
Log the graph description to the log output buffer. | TG_Graph.h | |
| TG_Graph.h | |||
| TG_Graph.h | |||
| TG_Graph.h | |||
| TG_Graph.h | |||
| Remove a particular edge. | TG_Graph.h | ||
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 | TG_Graph.h | |
void RemovePinEdges
(
UTG_Node& InNode, |
Remove all the edges connected to the specified Pin. | TG_Graph.h | |
void Reset() |
Reset the graph empty, destroy any nodes or associated resources. | TG_Graph.h | |
void SetExtraEditorNodes
(
const TArray< TObjectPtr< const UObject > >& InNodes |
TG_Graph.h | ||
void SetInputParamsFromVarMap
(
FTG_VarMap InMap |
Apply an override map of input parameter vars to the graph. | TG_Graph.h | |
void SetOutputSettings
(
const TMap< FTG_Id, FTG_OutputSettings >& OutputSettingsMap |
Apply an override map of output settings to the graph. | TG_Graph.h | |
void Traverse
(
NodeVisitorFunction visitor, |
Traverse! | TG_Graph.h | |
bool Validate
(
MixUpdateCyclePtr Cycle |
Validate internal checks, warnings and errors, Returns true if Graph is valid and has no validation errors. | TG_Graph.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Modify
(
bool bAlwaysMarkDirty |
Overwrite the modify to also mark the transient states as dirty. | TG_Graph.h | |
virtual void PostLoad() |
Override the PostLoad method of UObject to finalize the un-serialization and fill in the runtime fields of the graph sub objects | TG_Graph.h | |
virtual void PreSave
(
FObjectPreSaveContext SaveContext |
Override PreSave method of UObject. | TG_Graph.h | |
virtual void Serialize
(
FArchive& Ar |
Override Serialize method of UObject. | TG_Graph.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void EvalInOutPins() |
TG_Graph.h | ||
void EvalTraverseOrder() |
TG_Graph.h | ||
| Utility functions used to establish the traversal order. | TG_Graph.h | ||
void OnNodeAdded
(
UTG_Node* InNode |
TG_Graph.h | ||
void OnNodeChanged
(
UTG_Node* InNode, |
TG_Graph.h | ||
| TG_Graph.h | |||
| TG_Graph.h | |||
| TG_Graph.h | |||
void OnNodeSignatureChanged
(
UTG_Node* InNode |
TG_Graph.h | ||
| Rename existing param. | TG_Graph.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
TG_Graph.h | ||
virtual void PostEditUndo() |
Override PostEditUndo method of UObject. | TG_Graph.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| 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 | TG_Graph.h | ||
| Check that the connection from PinFrom to PInTO doesn't create a loop. | TG_Graph.h | ||
| TG_Graph.h |