Updated
This commit is contained in:
93
Source/FLESHEditor/Public/FLESHGraph/FLESHGraphNode.h
Normal file
93
Source/FLESHEditor/Public/FLESHGraph/FLESHGraphNode.h
Normal file
@@ -0,0 +1,93 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "UObject/NoExportTypes.h"
|
||||
#include "FLESHCompiler.h"
|
||||
#include "FLESHGraphNode.generated.h"
|
||||
|
||||
/**
|
||||
* FLESH Graph Node Base Class
|
||||
* Base class for all FLESH graph node types
|
||||
*/
|
||||
UCLASS(BlueprintType, Abstract)
|
||||
class FLESHEDITOR_API UFLESHGraphNode : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
UFLESHGraphNode();
|
||||
|
||||
// Get node title
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
virtual FString GetNodeTitle() const;
|
||||
|
||||
// Get node type
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
virtual EFLESHNodeType GetNodeType() const;
|
||||
|
||||
// Get node color
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
virtual FLinearColor GetNodeColor() const;
|
||||
|
||||
// Get node position
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
FVector2D GetNodePosition() const;
|
||||
|
||||
// Set node position
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
void SetNodePosition(const FVector2D& InPosition);
|
||||
|
||||
// Get input nodes
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
TArray<UFLESHGraphNode*> GetInputNodes() const;
|
||||
|
||||
// Get output nodes
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
TArray<UFLESHGraphNode*> GetOutputNodes() const;
|
||||
|
||||
// Add input node
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
bool AddInputNode(UFLESHGraphNode* Node);
|
||||
|
||||
// Add output node
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
bool AddOutputNode(UFLESHGraphNode* Node);
|
||||
|
||||
// Remove input node
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
bool RemoveInputNode(UFLESHGraphNode* Node);
|
||||
|
||||
// Remove output node
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
bool RemoveOutputNode(UFLESHGraphNode* Node);
|
||||
|
||||
// Compile node
|
||||
UFUNCTION(BlueprintCallable, Category = "FLESH")
|
||||
virtual bool CompileNode(FFLESHNodeData& OutNodeData);
|
||||
|
||||
protected:
|
||||
// Node title
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "FLESH")
|
||||
FString NodeTitle;
|
||||
|
||||
// Node type
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "FLESH")
|
||||
EFLESHNodeType NodeType;
|
||||
|
||||
// Node color
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "FLESH")
|
||||
FLinearColor NodeColor;
|
||||
|
||||
// Node position
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "FLESH")
|
||||
FVector2D NodePosition;
|
||||
|
||||
// Input nodes
|
||||
UPROPERTY()
|
||||
TArray<TObjectPtr<UFLESHGraphNode>> InputNodes;
|
||||
|
||||
// Output nodes
|
||||
UPROPERTY()
|
||||
TArray<TObjectPtr<UFLESHGraphNode>> OutputNodes;
|
||||
};
|
Reference in New Issue
Block a user