You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb sara.schvartzman #jira UE-139731 #preflight https://horde.devtools.epicgames.com/job/61ea9f26445cebac10bf1f63 #ROBOMERGE-AUTHOR: helge.mathee #ROBOMERGE-SOURCE: CL 18688153 in //UE5/Release-5.0/... via CL 18688156 via CL 18688161 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472) [CL 18688164 by helge mathee in ue5-main branch]
77 lines
1.8 KiB
C++
77 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "RigVMPin.h"
|
|
#include "RigVMLink.generated.h"
|
|
|
|
class URigVMGraph;
|
|
|
|
/**
|
|
* The Link represents a connection between two Pins
|
|
* within a Graph. The Link can be accessed on the
|
|
* Graph itself - or through the URigVMPin::GetLinks()
|
|
* method.
|
|
*/
|
|
UCLASS(BlueprintType)
|
|
class RIGVMDEVELOPER_API URigVMLink : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
|
|
// Default constructor
|
|
URigVMLink()
|
|
{
|
|
SourcePin = TargetPin = nullptr;
|
|
}
|
|
|
|
// Serialization override
|
|
virtual void Serialize(FArchive& Ar) override;
|
|
|
|
// Returns the current index of this Link within its owning Graph.
|
|
UFUNCTION(BlueprintCallable, Category = RigVMLink)
|
|
int32 GetLinkIndex() const;
|
|
|
|
// Returns the Link's owning Graph/
|
|
UFUNCTION(BlueprintCallable, Category = RigVMLink)
|
|
URigVMGraph* GetGraph() const;
|
|
|
|
// Returns the source Pin of this Link (or nullptr)
|
|
UFUNCTION(BlueprintCallable, Category = RigVMLink)
|
|
URigVMPin* GetSourcePin();
|
|
|
|
// Returns the target Pin of this Link (or nullptr)
|
|
UFUNCTION(BlueprintCallable, Category = RigVMLink)
|
|
URigVMPin* GetTargetPin();
|
|
|
|
// Returns a string representation of the Link,
|
|
// for example: "NodeA.Color.R -> NodeB.Translation.X"
|
|
// note: can be split again using SplitPinPathRepresentation
|
|
UFUNCTION(BlueprintCallable, Category = RigVMLink)
|
|
FString GetPinPathRepresentation();
|
|
|
|
// Splits a pin path represenation of a link
|
|
// for example: "NodeA.Color.R -> NodeB.Translation.X"
|
|
// into its two pin paths
|
|
static bool SplitPinPathRepresentation(const FString& InString, FString& OutSource, FString& OutTarget);
|
|
|
|
private:
|
|
|
|
void PrepareForCopy();
|
|
|
|
UPROPERTY()
|
|
FString SourcePinPath;
|
|
|
|
UPROPERTY()
|
|
FString TargetPinPath;
|
|
|
|
URigVMPin* SourcePin;
|
|
URigVMPin* TargetPin;
|
|
|
|
friend class URigVMController;
|
|
};
|
|
|