70 lines
1.7 KiB
C++
70 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/Object.h"
|
|
#include "WingBasics.h"
|
|
#include "WingReferences.generated.h"
|
|
|
|
class UEdGraphNode;
|
|
class UEdGraphPin;
|
|
|
|
////////////////////////////////////////////////////////////
|
|
//
|
|
// The WingFetcher module allows you to start at an asset and
|
|
// walk to any object within that asset. For example, you can
|
|
// start at an actor blueprint, walk to its event graph, then
|
|
// walk to a graph node, and then walk to a graph pin.
|
|
//
|
|
// The following classes make it possible to 'walk' to a
|
|
// place that isn't a UObject, or that isn't a single UObject.
|
|
// We accomplish this by creating a UObject class that
|
|
// contains some sort of reference to the item in question.
|
|
//
|
|
////////////////////////////////////////////////////////////
|
|
|
|
|
|
// WingStructPointer: Stores a pointer to a ustruct which is
|
|
// inside a UObject. This makes it possible to walk to a
|
|
// struct property.
|
|
//
|
|
// The Object field should be point at the containing object
|
|
// to ensure it doesn't get garbage collected.
|
|
//
|
|
// The editable flag indicates whether the struct property
|
|
// we walked into is marked CPF_Edit. If not, then the intent
|
|
// is that this struct is for viewing only.
|
|
|
|
UCLASS()
|
|
class UWingStructPointer : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
UPROPERTY()
|
|
UObject* Object;
|
|
|
|
UPROPERTY()
|
|
UStruct* StructType;
|
|
|
|
void *StructBase;
|
|
|
|
bool Editable;
|
|
};
|
|
|
|
// WingPinReference: Stores the name of a UEdGraphPin which is
|
|
// inside a UEdGraphNode.
|
|
|
|
UCLASS()
|
|
class UWingPinReference : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY()
|
|
UEdGraphNode* Node = nullptr;
|
|
|
|
FName PinName;
|
|
|
|
UEdGraphPin* GetPin() const;
|
|
UEdGraphPin* CheckGetPin(WingOut Errors) const;
|
|
};
|