You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.9 KiB
93 lines
2.9 KiB
// Copyright Voulz 2021-2025. All Rights Reserved.
|
|
|
|
#include "MovieGraphArchVisObjectIdNode.h"
|
|
|
|
#include "ArchVisMoviePipelineObjectIdUtils.h"
|
|
#include "MovieGraphArchVisObjectIdPass.h"
|
|
#include "MoviePipelineTelemetry.h"
|
|
#include "Editor/EditorPerProjectUserSettings.h"
|
|
|
|
|
|
FUObjectAnnotationSparse<ArchVisMoviePipeline::FObjectIdAccelerationData, true>& UDEPRECATED_MovieGraphArchVisObjectIdNode::GetManifestAnnotation()
|
|
{
|
|
static FUObjectAnnotationSparse<ArchVisMoviePipeline::FObjectIdAccelerationData, true> MovieGraphArchVisManifestAnnotation;
|
|
|
|
return MovieGraphArchVisManifestAnnotation;
|
|
}
|
|
|
|
FEngineShowFlags UDEPRECATED_MovieGraphArchVisObjectIdNode::GetShowFlags() const
|
|
{
|
|
FEngineShowFlags Flags(ESFIM_Game);
|
|
Flags.DisableAdvancedFeatures();
|
|
Flags.SetPostProcessing(false);
|
|
Flags.SetPostProcessMaterial(false);
|
|
|
|
// The most important flag. The Hit Proxy IDs will be used to generate Object IDs.
|
|
Flags.SetHitProxies(true);
|
|
|
|
// Screen-percentage scaling mixes IDs when doing down-sampling, so it is disabled.
|
|
Flags.SetScreenPercentage(false);
|
|
|
|
return Flags;
|
|
}
|
|
|
|
EViewModeIndex UDEPRECATED_MovieGraphArchVisObjectIdNode::GetViewModeIndex() const
|
|
{
|
|
return VMI_Unlit;
|
|
}
|
|
|
|
bool UDEPRECATED_MovieGraphArchVisObjectIdNode::GetAllowsShowFlagsCustomization() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
#if WITH_EDITOR
|
|
FText UDEPRECATED_MovieGraphArchVisObjectIdNode::GetNodeTitle(const bool bGetDescriptive) const
|
|
{
|
|
return NSLOCTEXT("MovieRenderGraph", "ObjectIdNodeTitle", "[ArchVis] Object IDs");
|
|
}
|
|
|
|
FSlateIcon UDEPRECATED_MovieGraphArchVisObjectIdNode::GetIconAndTint(FLinearColor& OutColor) const
|
|
{
|
|
static const FSlateIcon DeferredRendererIcon = FSlateIcon(FAppStyle::GetAppStyleSetName(), "ContentBrowser.SizeMap");
|
|
OutColor = FLinearColor::White;
|
|
|
|
return DeferredRendererIcon;
|
|
}
|
|
#endif // WITH_EDITOR
|
|
|
|
void UDEPRECATED_MovieGraphArchVisObjectIdNode::UpdateTelemetry(FMoviePipelineShotRenderTelemetry* InTelemetry) const
|
|
{
|
|
InTelemetry->bUsesObjectID = true;
|
|
}
|
|
|
|
TUniquePtr<UE::MovieGraph::Rendering::FMovieGraphImagePassBase> UDEPRECATED_MovieGraphArchVisObjectIdNode::CreateInstance() const
|
|
{
|
|
return MakeUnique<FMovieGraphArchVisObjectIdPass>();
|
|
}
|
|
|
|
FString UDEPRECATED_MovieGraphArchVisObjectIdNode::GetRendererNameImpl() const
|
|
{
|
|
return TEXT("[ArchVis] ObjectID");
|
|
}
|
|
|
|
void UDEPRECATED_MovieGraphArchVisObjectIdNode::SetupImpl(const FMovieGraphRenderPassSetupData& InSetupData)
|
|
{
|
|
Super::SetupImpl(InSetupData);
|
|
|
|
#if WITH_EDITOR
|
|
UEditorPerProjectUserSettings* EditorSettings = GetMutableDefault<UEditorPerProjectUserSettings>();
|
|
bPrevAllowSelectTranslucent = EditorSettings->bAllowSelectTranslucent;
|
|
EditorSettings->bAllowSelectTranslucent = bIncludeTranslucentObjects;
|
|
#endif
|
|
}
|
|
|
|
void UDEPRECATED_MovieGraphArchVisObjectIdNode::TeardownImpl()
|
|
{
|
|
#if WITH_EDITOR
|
|
UEditorPerProjectUserSettings* EditorSettings = GetMutableDefault<UEditorPerProjectUserSettings>();
|
|
EditorSettings->bAllowSelectTranslucent = bPrevAllowSelectTranslucent;
|
|
#endif
|
|
|
|
Super::TeardownImpl();
|
|
}
|
|
|