You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* SetPackageThatInitiatedCopy() is now called before any customization steps to fix issue with inconsistent values in PackageThatInitiatedCopy. Notably that PackageThatInitiatedCopy could be the name of the previous package initiator during some method calls if the same advanced copy customization was re-used during the editor lifetime * Made UAdvancedCopyCustomization::GetARFilter() virtual so customization have an opportunity to define additional filtering #rb Lauren.Barnes #ROBOMERGE-AUTHOR: jay.nakai #ROBOMERGE-SOURCE: CL 21293857 via CL 21293920 via CL 21293937 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824) [CL 21297704 by jay nakai in ue5-main branch]
61 lines
2.1 KiB
C++
61 lines
2.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "AssetRegistry/ARFilter.h"
|
|
#include "IAssetTools.h"
|
|
#include "AdvancedCopyCustomization.generated.h"
|
|
|
|
|
|
|
|
UCLASS()
|
|
class ASSETTOOLS_API UAdvancedCopyCustomization : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UAdvancedCopyCustomization(const class FObjectInitializer& ObjectInitializer);
|
|
|
|
/* Getter for whether or not we should generate relative paths for this advanced copy */
|
|
bool GetShouldGenerateRelativePaths() const
|
|
{
|
|
return bShouldGenerateRelativePaths;
|
|
}
|
|
|
|
/* Returns the ARFilter for this advanced copy */
|
|
virtual FARFilter GetARFilter() const
|
|
{
|
|
return FilterForExcludingDependencies;
|
|
}
|
|
|
|
/* Allows the customization to edit the parameters for the whole copy operation */
|
|
virtual void EditCopyParams(FAdvancedCopyParams& CopyParams) const {};
|
|
|
|
/* Apply any additional filtering after the ARFilter is run on the packages to copy */
|
|
virtual void ApplyAdditionalFiltering(TArray<FName>& PackagesToCopy) const {};
|
|
|
|
/* Once the destination map is generated for the set of assets, the destinations can be manipulated for renaming, restructuring, etc. */
|
|
virtual void TransformDestinationPaths(TMap<FString, FString>& OutPackagesAndDestinations) const {};
|
|
|
|
/* Allows for additional validation of the packages to be copied and their destination. Returns false if anything doesn't pass validation */
|
|
virtual bool CustomCopyValidate(const TMap<FString, FString>& OutPackagesAndDestinations) const { return true; };
|
|
|
|
/* Store the path of the package that caused this customization to be used */
|
|
void SetPackageThatInitiatedCopy(const FString& InBasePackage);
|
|
|
|
const FString GetPackageThatInitiatedCopy() const { return PackageThatInitiatedCopy; }
|
|
|
|
protected:
|
|
/* Whether or not the destinations for copy should be relative to the package that initiated the copy */
|
|
bool bShouldGenerateRelativePaths;
|
|
|
|
/* The filter to use when finding valid dependencies to also copy */
|
|
FARFilter FilterForExcludingDependencies;
|
|
|
|
/* The path of the package that caused this customization to be used */
|
|
FString PackageThatInitiatedCopy;
|
|
};
|
|
|