// Copyright Voulz 2021-2025. All Rights Reserved. #include "MovieGraphArchVisObjectIdNode.h" #include "ArchVisMoviePipelineObjectIdUtils.h" #include "MovieGraphArchVisObjectIdPass.h" #include "MoviePipelineTelemetry.h" #include "Editor/EditorPerProjectUserSettings.h" FUObjectAnnotationSparse& UDEPRECATED_MovieGraphArchVisObjectIdNode::GetManifestAnnotation() { static FUObjectAnnotationSparse 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 UDEPRECATED_MovieGraphArchVisObjectIdNode::CreateInstance() const { return MakeUnique(); } 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(); bPrevAllowSelectTranslucent = EditorSettings->bAllowSelectTranslucent; EditorSettings->bAllowSelectTranslucent = bIncludeTranslucentObjects; #endif } void UDEPRECATED_MovieGraphArchVisObjectIdNode::TeardownImpl() { #if WITH_EDITOR UEditorPerProjectUserSettings* EditorSettings = GetMutableDefault(); EditorSettings->bAllowSelectTranslucent = bPrevAllowSelectTranslucent; #endif Super::TeardownImpl(); }