You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
85 lines
3.1 KiB
C++
85 lines
3.1 KiB
C++
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "AssetData.h"
|
|
#include "EdGraph/EdGraph.h"
|
|
#include "Misc/AssetRegistryInterface.h"
|
|
#include "EdGraph_ReferenceViewer.generated.h"
|
|
|
|
class FAssetThumbnailPool;
|
|
class UEdGraphNode_Reference;
|
|
|
|
UCLASS()
|
|
class UEdGraph_ReferenceViewer : public UEdGraph
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
public:
|
|
// UObject implementation
|
|
virtual void BeginDestroy() override;
|
|
// End UObject implementation
|
|
|
|
void SetGraphRoot(const TArray<FAssetIdentifier>& GraphRootIdentifiers, const FIntPoint& GraphRootOrigin = FIntPoint(ForceInitToZero));
|
|
const TArray<FAssetIdentifier>& GetCurrentGraphRootIdentifiers() const;
|
|
class UEdGraphNode_Reference* RebuildGraph();
|
|
|
|
bool IsSearchDepthLimited() const;
|
|
bool IsSearchBreadthLimited() const;
|
|
bool IsShowSoftReferences() const;
|
|
bool IsShowHardReferences() const;
|
|
bool IsShowSearchableNames() const;
|
|
bool IsShowNativePackages() const;
|
|
|
|
void SetSearchDepthLimitEnabled(bool newEnabled);
|
|
void SetSearchBreadthLimitEnabled(bool newEnabled);
|
|
void SetShowSoftReferencesEnabled(bool newEnabled);
|
|
void SetShowHardReferencesEnabled(bool newEnabled);
|
|
void SetShowSearchableNames(bool newEnabled);
|
|
void SetShowNativePackages(bool newEnabled);
|
|
|
|
int32 GetSearchDepthLimit() const;
|
|
int32 GetSearchBreadthLimit() const;
|
|
|
|
void SetSearchDepthLimit(int32 NewDepthLimit);
|
|
void SetSearchBreadthLimit(int32 NewBreadthLimit);
|
|
|
|
/** Accessor for the thumbnail pool in this graph */
|
|
const TSharedPtr<class FAssetThumbnailPool>& GetAssetThumbnailPool() const;
|
|
|
|
private:
|
|
UEdGraphNode_Reference* ConstructNodes(const TArray<FAssetIdentifier>& GraphRootIdentifiers, const FIntPoint& GraphRootOrigin);
|
|
int32 RecursivelyGatherSizes(bool bReferencers, const TArray<FAssetIdentifier>& Identifiers, int32 CurrentDepth, TSet<FAssetIdentifier>& VisitedNames, TMap<FAssetIdentifier, int32>& OutNodeSizes) const;
|
|
void GatherAssetData(const TSet<FName>& AllPackageNames, TMap<FName, FAssetData>& OutPackageToAssetDataMap) const;
|
|
class UEdGraphNode_Reference* RecursivelyConstructNodes(bool bReferencers, UEdGraphNode_Reference* RootNode, const TArray<FAssetIdentifier>& Identifiers, const FIntPoint& NodeLoc, const TMap<FAssetIdentifier, int32>& NodeSizes, const TMap<FName, FAssetData>& PackagesToAssetDataMap, int32 CurrentDepth, TSet<FAssetIdentifier>& VisitedNames);
|
|
|
|
bool ExceedsMaxSearchDepth(int32 Depth) const;
|
|
bool ExceedsMaxSearchBreadth(int32 Breadth) const;
|
|
EAssetRegistryDependencyType::Type GetReferenceSearchFlags(bool bReferencers) const;
|
|
|
|
UEdGraphNode_Reference* CreateReferenceNode();
|
|
|
|
/** Removes all nodes from the graph */
|
|
void RemoveAllNodes();
|
|
|
|
private:
|
|
/** Pool for maintaining and rendering thumbnails */
|
|
TSharedPtr<class FAssetThumbnailPool> AssetThumbnailPool;
|
|
|
|
TArray<FAssetIdentifier> CurrentGraphRootIdentifiers;
|
|
FIntPoint CurrentGraphRootOrigin;
|
|
|
|
int32 MaxSearchDepth;
|
|
int32 MaxSearchBreadth;
|
|
|
|
bool bLimitSearchDepth;
|
|
bool bLimitSearchBreadth;
|
|
bool bIsShowSoftReferences;
|
|
bool bIsShowHardReferences;
|
|
bool bIsShowSearchableNames;
|
|
bool bIsShowNativePackages;
|
|
};
|
|
|