A Demo Project for the UnrealEngineSDK
|
#include <DialogueEditorUtilities.h>
Static Public Member Functions | |
static bool | AreDialogueNodesInSyncWithGraphNodes (const UDlgDialogue *Dialogue) |
static void | AutoPositionGraphNodes (UDialogueGraphNode *RootNode, const TArray< UDialogueGraphNode * > &GraphNodes, int32 OffsetBetweenColumnsX, int32 OffsetBetweenRowsY, bool bIsDirectionVertical) |
static UEdGraphNode_Comment * | BlueprintAddComment (UBlueprint *Blueprint, const FString &CommentString, FVector2D Location=FVector2D::ZeroVector) |
static UK2Node_Event * | BlueprintGetEvent (UBlueprint *Blueprint, FName EventName, UClass *EventClassSignature) |
static UEdGraph * | BlueprintGetFunction (UBlueprint *Blueprint, FName FunctionName, UClass *FunctionClassSignature) |
static UK2Node_Event * | BlueprintGetOrAddEvent (UBlueprint *Blueprint, FName EventName, UClass *EventClassSignature) |
static UEdGraph * | BlueprintGetOrAddFunction (UBlueprint *Blueprint, FName FunctionName, UClass *FunctionClassSignature) |
static bool | CanConvertSpeechNodesToSpeechSequence (const TSet< UObject * > &SelectedNodes) |
static bool | CanConvertSpeechNodesToSpeechSequence (const TSet< UObject * > &SelectedNodes, TArray< UDialogueGraphNode * > &OutSelectedGraphNodes) |
static bool | CanConvertSpeechSequenceNodeToSpeechNodes (const TSet< UObject * > &SelectedNodes) |
static bool | CheckAndTryToFixDialogue (UDlgDialogue *Dialogue, bool bDisplayWarning=true) |
static void | CloseOtherEditors (UObject *Asset, IAssetEditorInstance *OnlyEditor) |
static void | CopyNodeChildren (const UDialogueGraphNode *FromNode, UDialogueGraphNode *ToNode) |
static UEdGraph * | CreateNewGraph (UObject *ParentScope, FName GraphName, TSubclassOf< UEdGraph > GraphClass, TSubclassOf< UEdGraphSchema > SchemaClass) |
static bool | DeleteAllDialoguesTextFiles () |
static IAssetEditorInstance * | FindEditorForAsset (UObject *Asset, bool bFocusIfOpen) |
static bool | GetBoundsForSelectedNodes (const UEdGraph *Graph, FSlateRect &Rect, float Padding=0.0f) |
static UDlgNode * | GetClosestNodeFromGraphNode (UEdGraphNode *GraphNode) |
static UDlgDialogue * | GetDialogueForGraph (const UEdGraph *Graph) |
static UDlgDialogue * | GetDialogueFromGraphNode (const UEdGraphNode *GraphNode) |
static UDialogueGraphNode_Edge * | GetLastTargetGraphEdgeBeforeDrag (const UEdGraph *Graph) |
static const TSet< UObject * > | GetSelectedNodes (const UEdGraph *Graph) |
static bool | IsPointInsideGeometry (const FVector2D &TestPoint, const FGeometry &Geometry) |
static bool | JumpToGraphNode (const UEdGraphNode *GraphNode) |
static bool | JumpToGraphNodeIndex (const UDlgDialogue *Dialogue, int32 NodeIndex) |
static void | LoadAllDialoguesAndCheckGUIDs () |
static bool | OpenBlueprintEditor (UBlueprint *Blueprint, EDialogueBlueprintOpenType OpenType=EDialogueBlueprintOpenType::None, FName FunctionNameToOpen=NAME_None, bool bForceFullEditor=true, bool bAddBlueprintFunctionIfItDoesNotExist=false) |
static bool | OpenEditorAndJumpToGraphNode (const UEdGraphNode *GraphNode, bool bFocusIfOpen=false) |
static bool | OpenEditorForAsset (const UObject *Asset) |
static bool | PickChildrenOfClass (const FText &TitleText, UClass *&OutChosenClass, UClass *Class) |
static void | Refresh (const UEdGraph *Graph, bool bRestorePreviousSelection) |
static void | RefreshDetailsView (const UEdGraph *Graph, bool bRestorePreviousSelection) |
static void | RemapOldIndicesWithNewAndUpdateGUID (const TArray< UDialogueGraphNode * > &GraphNodes, const TMap< int32, int32 > &OldToNewIndexMap) |
static bool | RemoveNode (UEdGraphNode *NodeToRemove) |
static void | ReplaceParentConnectionsToNode (const UDialogueGraphNode *OldNode, const UDialogueGraphNode *NewNode) |
static bool | SaveAllDialogues () |
static void | SetLastTargetGraphEdgeBeforeDrag (const UEdGraph *Graph, UDialogueGraphNode_Edge *InEdge) |
static EAppReturnType::Type | ShowMessageBox (EAppMsgType::Type MsgType, const FString &Text, const FString &Caption) |
template<typename GraphNodeType > | |
static GraphNodeType * | SpawnGraphNodeFromTemplate (UEdGraph *ParentGraph, const FIntPoint &Location, bool bSelectNewNode=true) |
static void | TryToCreateDefaultGraph (UDlgDialogue *Dialogue, bool bPrompt=true) |
Private Member Functions | |
FDialogueEditorUtilities ()=delete | |
Static Private Member Functions | |
static TSharedPtr< class IDialogueEditor > | GetDialogueEditorForGraph (const UEdGraph *Graph) |
Definition at line 29 of file DialogueEditorUtilities.h.
|
privatedelete |
|
static |
Tells us if the number of dialogue nodes matches with the number of graph nodes (corresponding to dialogues).
Definition at line 355 of file DialogueEditorUtilities.cpp.
|
static |
Automatically reposition all the nodes in the graph.
RootNode | The Node that is considered the node |
GraphNodes | The rest of the graph nodes |
OffsetBetweenColumnsX | The offset between nodes on the X axis |
OffsetBetweenRowsY | The offset between nodes on the Y axis |
bIsDirectionVertical | Is direction vertical? If false it is horizontal |
Definition at line 393 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 1119 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 1099 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 1035 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 1066 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 1015 of file DialogueEditorUtilities.cpp.
|
static |
Tells us if the selected nodes can be converted to a speech sequence node.
SelectedNodes | The selected graph nodes we do the checking on. |
OutSelectedGraphNodes | The result graph nodes if the we can do the conversion. |
Definition at line 552 of file DialogueEditorUtilities.cpp.
|
static |
Tells us if the selected nodes (should be only one) can be converted from a speech sequence to speech nodes
SelectedNodes | The selected graph nodes we do the checking on. |
Definition at line 663 of file DialogueEditorUtilities.cpp.
|
static |
Helper function that checks if the data is valid in the Dialogue/Graph and tries to fix the data.
Definition at line 232 of file DialogueEditorUtilities.cpp.
|
static |
Close any editor which is not this one
Definition at line 678 of file DialogueEditorUtilities.cpp.
|
static |
Copy all children of the FromNode to be also the children of ToNode.
FromNode | Source Node |
ToNode | Destination Node |
Definition at line 777 of file DialogueEditorUtilities.cpp.
|
static |
Creates a new empty graph.
ParentScope | The outer of the new graph (typically a blueprint). |
GraphName | Name of the graph to add. |
SchemaClass | Schema to use for the new graph. |
Definition at line 188 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 927 of file DialogueEditorUtilities.cpp.
|
static |
Returns the primary editor if one is already open for the specified asset. If there is one open and bFocusIfOpen is true, that editor will be brought to the foreground and focused if possible.
Definition at line 706 of file DialogueEditorUtilities.cpp.
|
static |
Get the bounding area for the currently selected nodes
Graph | The Graph we are finding bounds for |
Rect | Final output bounding area, including padding |
Padding | An amount of padding to add to all sides of the bounds |
Definition at line 95 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 367 of file DialogueEditorUtilities.cpp.
|
staticprivate |
Definition at line 144 of file DialogueEditorUtilities.cpp.
|
inlinestatic |
Gets the Dialogue from the Graph
Definition at line 109 of file DialogueEditorUtilities.h.
|
static |
Definition at line 888 of file DialogueEditorUtilities.cpp.
|
static |
Useful for setting the last target edge on drap operations.
Definition at line 124 of file DialogueEditorUtilities.cpp.
Gets the nodes that are currently selected
Definition at line 84 of file DialogueEditorUtilities.cpp.
|
inlinestatic |
Definition at line 205 of file DialogueEditorUtilities.h.
|
static |
Definition at line 744 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 761 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 37 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 965 of file DialogueEditorUtilities.cpp.
|
static |
Tries to open an Dialogue editor for the GraphNode and jumps to it. Returns true if the asset is opened in an editor. If the file is already open in an editor, it will not create another editor window but instead bring it to front
Definition at line 720 of file DialogueEditorUtilities.cpp.
Tries to open the editor for the specified asset. Returns true if the asset is opened in an editor. If the file is already open in an editor, it will not create another editor window but instead bring it to front
Definition at line 692 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 945 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 115 of file DialogueEditorUtilities.cpp.
|
static |
Refreshes the details panel for the editor of the specified Graph.
Definition at line 106 of file DialogueEditorUtilities.cpp.
|
static |
Replaces all references to old Node indices from the provided GraphNodes with new indices. This can happen inside Conditions of type WasNodeVisited and HasSatisfiedChild because the NodeIndex is a weak reference. Also sets the correct GUID to nodes that reference the GUID
GraphNodes | The nodes we are replacing the old references |
OldToNewIndexMap | Map that tells us the mapping from old index to new index. Maps from old index -> new index |
Definition at line 817 of file DialogueEditorUtilities.cpp.
|
static |
Helper function to remove the provided node from it's graph. Returns true on success, false otherwise.
Definition at line 160 of file DialogueEditorUtilities.cpp.
|
static |
Replace all connection to the OldNode, so that they point to the NewNode. Make all parents of the OldNode point to NewNode instead.
OldNode | The old child node that will have its conections from its parents removed and replaced to point to NewNode. |
NewNode | The new child node that will have the connections to the parents of OldNode |
Definition at line 795 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 904 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 135 of file DialogueEditorUtilities.cpp.
|
static |
Definition at line 811 of file DialogueEditorUtilities.cpp.
|
inlinestatic |
Spawns a GraphNode in the specified ParentGraph and at Location.
Definition at line 34 of file DialogueEditorUtilities.h.
|
static |
Tries to create the default graph for the Dialogue if the number of nodes differ from the dialogue data and the graph data
Dialogue | The Dialogue we want to create the default graph for. |
bPrompt | Indicates if we should prompt the user for a response. |
Definition at line 306 of file DialogueEditorUtilities.cpp.