bUseSelectionOutline
bUseSelectionOutline
#Overview
name: bUseSelectionOutline
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 44
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bUseSelectionOutline is to control whether a mesh or primitive should display a selection outline when selected in the Unreal Engine editor viewport. This setting is primarily used for visualization and selection feedback in the editor environment.
Key points about bUseSelectionOutline:
-
It is used by the rendering system, specifically for editor visualization.
-
The main Unreal Engine subsystems that rely on this variable are the editor’s viewport rendering system and the selection system.
-
The value is typically set based on the ULevelEditorViewportSettings::bUseSelectionOutline property, which is a user-configurable setting.
-
It often interacts with other selection-related variables like bUseWireframeSelectionColoring and IsSelected() checks on scene proxies.
-
Developers should be aware that this variable is only relevant in editor builds and has no effect in shipping games.
-
Best practices:
- Only enable selection outlines for objects that should be selectable in the editor.
- Consider performance implications when enabling selection outlines for many objects.
- Use in conjunction with other selection feedback mechanisms for clarity.
-
The variable is commonly used in various scene proxies and mesh element creation functions throughout the engine, indicating its importance for editor visualization.
-
It can be overridden on a per-mesh or per-primitive basis, allowing for fine-grained control over which objects display selection outlines.
-
The actual rendering of the selection outline is handled by the editor’s rendering pipeline, specifically in classes like FEditorSelectionMeshProcessor.
Understanding and properly using bUseSelectionOutline is crucial for creating a responsive and visually clear editing experience in custom editor tools and components built with Unreal Engine.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:446, section: [/Script/UnrealEd.LevelEditorViewportSettings]
- INI Section:
/Script/UnrealEd.LevelEditorViewportSettings
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Enterprise/DataprepEditor/Source/DataprepEditor/Private/Widgets/SDataprepEditorViewport.cpp:125
Scope (from outer to inner):
file
class class FStaticMeshSceneProxyExt : public FStaticMeshSceneProxy
function virtual bool GetMeshElement
Source code excerpt:
int32 ElementIndex,
uint8 InDepthPriorityGroup,
bool bUseSelectionOutline,
bool bAllowPreCulledIndices,
FMeshBatch& OutMeshBatch) const override
{
if(FStaticMeshSceneProxy::GetMeshElement(LODIndex, BatchIndex, ElementIndex, InDepthPriorityGroup, bUseSelectionOutline, bAllowPreCulledIndices, OutMeshBatch))
{
OutMeshBatch.bWireframe = CustomComponent->bForceWireframe;
OutMeshBatch.bUseWireframeSelectionColoring = 0;
return true;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/ClonerEffector/Source/ClonerEffector/Private/Cloner/CEClonerActor.cpp:1344
Scope (from outer to inner):
file
function void ACEClonerActor::OnEditorSelectionChanged
Source code excerpt:
if (ActorSelection->Num() == 1 && ActorSelection->GetSelectedObject(0) == this)
{
UseSelectionOutline = ViewportSettings->bUseSelectionOutline;
ViewportSettings->bUseSelectionOutline = false;
}
else if (UseSelectionOutline.IsSet())
{
ViewportSettings->bUseSelectionOutline = UseSelectionOutline.GetValue();
UseSelectionOutline.Reset();
}
}
}
}
#endif
#Loc: <Workspace>/Engine/Plugins/Experimental/Water/Source/Runtime/Private/WaterBodyInfoMeshComponent.cpp:68
Scope (from outer to inner):
file
function bool FWaterBodyInfoMeshSceneProxy::GetMeshElement
Source code excerpt:
}
bool FWaterBodyInfoMeshSceneProxy::GetMeshElement(int32 LODIndex, int32 BatchIndex, int32 ElementIndex, uint8 InDepthPriorityGroup, bool bUseSelectionOutline, bool bAllowPreCulledIndices, FMeshBatch& OutMeshBatch) const
{
bool bResult = FStaticMeshSceneProxy::GetMeshElement(LODIndex, BatchIndex, ElementIndex, InDepthPriorityGroup, bUseSelectionOutline, bAllowPreCulledIndices, OutMeshBatch);
if (bResult)
{
OutMeshBatch.bUseForWaterInfoTextureDepth = bIsDilatedMesh; // The dilated mesh is drawn in the water info texture depth-only pass
}
return bResult;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Water/Source/Runtime/Private/WaterBodyInfoMeshComponent.h:51
Scope: file
Source code excerpt:
int32 ElementIndex,
uint8 InDepthPriorityGroup,
bool bUseSelectionOutline,
bool bAllowPreCulledIndices,
FMeshBatch& OutMeshBatch) const override;
virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View) const override;
SIZE_T GetTypeHash() const
#Loc: <Workspace>/Engine/Plugins/Experimental/Water/Source/Runtime/Private/WaterMeshSceneProxy.cpp:567
Scope (from outer to inner):
file
function void FWaterMeshSceneProxy::GetDynamicMeshElements
Source code excerpt:
#if WITH_WATER_SELECTION_SUPPORT
Mesh.bUseSelectionOutline = (RenderGroup == EWaterMeshRenderGroupType::RG_RenderSelectedWaterTilesOnly);
Mesh.bUseWireframeSelectionColoring = (RenderGroup == EWaterMeshRenderGroupType::RG_RenderSelectedWaterTilesOnly);
#endif // WITH_WATER_SELECTION_SUPPORT
Mesh.Elements.SetNumZeroed(1);
{
TRACE_CPUPROFILER_EVENT_SCOPE_STR("Setup batch element");
#Loc: <Workspace>/Engine/Plugins/Experimental/Water/Source/Runtime/Private/WaterMeshSceneProxy.cpp:770
Scope (from outer to inner):
file
function void FWaterMeshSceneProxy::GetDynamicMeshElements
Source code excerpt:
#if WITH_WATER_SELECTION_SUPPORT
Mesh.bUseSelectionOutline = (RenderGroup == EWaterMeshRenderGroupType::RG_RenderSelectedWaterTilesOnly);
Mesh.bUseWireframeSelectionColoring = (RenderGroup == EWaterMeshRenderGroupType::RG_RenderSelectedWaterTilesOnly);
#endif // WITH_WATER_SELECTION_SUPPORT
Mesh.Elements.SetNumZeroed(1);
{
#Loc: <Workspace>/Engine/Plugins/Runtime/nDisplay/Source/DisplayClusterConfigurator/Private/Views/Viewport/DisplayClusterConfiguratorSCSEditorViewportClient.cpp:52
Scope (from outer to inner):
file
function FDisplayClusterConfiguratorSCSEditorViewportClient::FDisplayClusterConfiguratorSCSEditorViewportClient
Source code excerpt:
// Selectively set particular show flags that we need
EngineShowFlags.SetSelectionOutline(GetDefault<ULevelEditorViewportSettings>()->bUseSelectionOutline);
DefaultSettings = UAssetViewerSettings::Get();
check(DefaultSettings);
const UDisplayClusterConfiguratorEditorSettings* DisplayClusterSettings = GetDefault<UDisplayClusterConfiguratorEditorSettings>();
#Loc: <Workspace>/Engine/Plugins/Runtime/nDisplay/Source/DisplayClusterLightCardEditorShaders/Private/DisplayClusterMeshProjectionRenderer.cpp:679
Scope (from outer to inner):
file
class class FMeshProjectionSelectionPassProcessor : public FMeshProjectionPassProcessorBase<FMeshProjectionVS<ProjectionType>, FMeshProjectionColorPS>
function virtual bool CanDrawMeshBatch
Source code excerpt:
{
const bool bDrawMeshBatch = MeshBatch.bUseForMaterial
&& MeshBatch.bUseSelectionOutline
&& PrimitiveSceneProxy
&& PrimitiveSceneProxy->WantsSelectionOutline()
&& (PrimitiveSceneProxy->IsSelected() || PrimitiveSceneProxy->IsHovered());
return bDrawMeshBatch;
}
#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/SCSEditorViewportClient.cpp:176
Scope (from outer to inner):
file
function FSCSEditorViewportClient::FSCSEditorViewportClient
Source code excerpt:
// Selectively set particular show flags that we need
EngineShowFlags.SetSelectionOutline(GetDefault<ULevelEditorViewportSettings>()->bUseSelectionOutline);
// Set if the grid will be drawn
DrawHelper.bDrawGrid = GetDefault<UEditorPerProjectUserSettings>()->bSCSEditorShowGrid;
// now add floor
EditorFloorComp = NewObject<UStaticMeshComponent>(GetTransientPackage(), TEXT("EditorFloorComp"));
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/SLevelViewport.cpp:609
Scope (from outer to inner):
file
function void SLevelViewport::ConstructLevelEditorViewportClient
Source code excerpt:
// Set the selection outline flag based on preferences
LevelViewportClient->EngineShowFlags.SetSelectionOutline(GetDefault<ULevelEditorViewportSettings>()->bUseSelectionOutline);
// Always composite editor objects after post processing in the editor
LevelViewportClient->EngineShowFlags.SetCompositeEditorPrimitives(true);
LevelViewportClient->SetViewModes(ViewportInstanceSettings.PerspViewModeIndex, ViewportInstanceSettings.OrthoViewModeIndex );
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/SLevelViewport.cpp:2282
Scope (from outer to inner):
file
function void SLevelViewport::OnUseDefaultShowFlags
Source code excerpt:
LevelViewportClient->EngineShowFlags = EditorShowFlags;
// Restore the state of SelectionOutline based on user settings
LevelViewportClient->EngineShowFlags.SetSelectionOutline(GetDefault<ULevelEditorViewportSettings>()->bUseSelectionOutline);
LevelViewportClient->LastEngineShowFlags = GameShowFlags;
// re-apply the cached viewmode, as it was trashed with FEngineShowFlags()
ApplyViewMode(CachedViewMode, LevelViewportClient->IsPerspective(), LevelViewportClient->EngineShowFlags);
ApplyViewMode(CachedViewMode, LevelViewportClient->IsPerspective(), LevelViewportClient->LastEngineShowFlags);
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/SLevelViewport.cpp:2860
Scope (from outer to inner):
file
function void SLevelViewport::OnActorSelectionChanged
Source code excerpt:
LevelViewportClient->ShowWidget(true);
LevelViewportClient->EngineShowFlags.SetSelection(true);
LevelViewportClient->EngineShowFlags.SetSelectionOutline(GetDefault<ULevelEditorViewportSettings>()->bUseSelectionOutline);
}
bNeedToUpdatePreviews = true;
}
void SLevelViewport::OnElementSelectionChanged(const UTypedElementSelectionSet* SelectionSet, bool bForceRefresh)
#Loc: <Workspace>/Engine/Source/Editor/StaticMeshEditor/Private/StaticMeshEditorViewportClient.cpp:74
Scope (from outer to inner):
file
function FStaticMeshEditorViewportClient::FStaticMeshEditorViewportClient
Source code excerpt:
EngineShowFlags.SetSnap(0);
EngineShowFlags.SetCompositeEditorPrimitives(true);
EngineShowFlags.SetSelectionOutline(GetDefault<ULevelEditorViewportSettings>()->bUseSelectionOutline);
OverrideNearClipPlane(1.0f);
bUsingOrbitCamera = true;
bShowSimpleCollision = false;
bShowComplexCollision = false;
bShowSockets = true;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/LevelEditorViewportSettings.h:521
Scope (from outer to inner):
file
class class ULevelEditorViewportSettings : public UObject
Source code excerpt:
/** Whether to show selection outlines for selected Actors */
UPROPERTY(EditAnywhere, config, Category=LookAndFeel, meta=(DisplayName = "Use Selection Outline"))
uint32 bUseSelectionOutline:1;
/** Sets the intensity of the overlay displayed when an object is selected */
UPROPERTY(EditAnywhere, config, Category=LookAndFeel, meta=(DisplayName = "Selection Highlight Intensity" ,ClampMin = "0", UIMin = "0", UIMax = "1"))
float SelectionHighlightIntensity;
/** Sets the intensity of the overlay displayed when an object is selected */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorViewportClient.cpp:6390
Scope (from outer to inner):
file
function void FEditorViewportClient::SetGameView
Source code excerpt:
}
EngineShowFlags.SetSelectionOutline(bGameViewEnable ? false : GetDefault<ULevelEditorViewportSettings>()->bUseSelectionOutline);
ApplyViewMode(GetViewMode(), IsPerspective(), EngineShowFlags);
bInGameViewMode = bGameViewEnable;
Invalidate();
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorViewportClient.cpp:6444
Scope (from outer to inner):
file
function void FEditorViewportClient::SetVREditView
Source code excerpt:
}
EngineShowFlags.SetSelectionOutline(bVREditViewEnable ? true : GetDefault<ULevelEditorViewportSettings>()->bUseSelectionOutline);
ApplyViewMode(GetViewMode(), IsPerspective(), EngineShowFlags);
bInVREditViewMode = bVREditViewEnable;
Invalidate();
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/LevelEditorViewport.cpp:3826
Scope (from outer to inner):
file
function void FLevelEditorViewportClient::HandleViewportSettingChanged
Source code excerpt:
void FLevelEditorViewportClient::HandleViewportSettingChanged(FName PropertyName)
{
if (PropertyName == GET_MEMBER_NAME_CHECKED(ULevelEditorViewportSettings, bUseSelectionOutline))
{
EngineShowFlags.SetSelectionOutline(GetDefault<ULevelEditorViewportSettings>()->bUseSelectionOutline);
}
}
void FLevelEditorViewportClient::OnMapChanged(UWorld* InWorld, EMapChangeType MapChangeType)
{
if (InWorld != GetWorld())
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Engine/InstancedStaticMesh.h:491
Scope (from outer to inner):
file
class class FInstancedStaticMeshSceneProxy : public FStaticMeshSceneProxy
Source code excerpt:
/** Sets up a FMeshBatch for a specific LOD and element. */
ENGINE_API virtual bool GetMeshElement(int32 LODIndex, int32 BatchIndex, int32 ElementIndex, uint8 InDepthPriorityGroup, bool bUseSelectionOutline, bool bAllowPreCulledIndices, FMeshBatch& OutMeshBatch) const override;
/** Sets up a wireframe FMeshBatch for a specific LOD. */
ENGINE_API virtual bool GetWireframeMeshElement(int32 LODIndex, int32 BatchIndex, const FMaterialRenderProxy* WireframeRenderProxy, uint8 InDepthPriorityGroup, bool bAllowPreCulledIndices, FMeshBatch& OutMeshBatch) const override;
ENGINE_API virtual void GetDistanceFieldAtlasData(const FDistanceFieldVolumeData*& OutDistanceFieldData, float& SelfShadowBias) const override;
ENGINE_API virtual void GetDistanceFieldInstanceData(TArray<FRenderTransform>& InstanceLocalToPrimitiveTransforms) const override;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/HeterogeneousVolumeComponent.cpp:217
Scope (from outer to inner):
file
function void FHeterogeneousVolumeSceneProxy::GetDynamicMeshElements
Source code excerpt:
Mesh.bCanApplyViewModeOverrides = true;
Mesh.bUseWireframeSelectionColoring = IsSelected();
Mesh.bUseSelectionOutline = false;
Mesh.bSelectable = false;
Collector.AddMesh(ViewIndex, Mesh);
}
const FSceneView* View = Views[ViewIndex];
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/DynamicMeshBuilder.cpp:787
Scope (from outer to inner):
file
function void FDynamicMeshBuilder::GetMesh
Source code excerpt:
}
void FDynamicMeshBuilder::GetMesh(const FMatrix& LocalToWorld,const FMaterialRenderProxy* MaterialRenderProxy,uint8 DepthPriorityGroup,bool bDisableBackfaceCulling, bool bReceivesDecals, bool bUseSelectionOutline, int32 ViewIndex, FMeshElementCollector& Collector, HHitProxy* HitProxy)
{
GetMesh(LocalToWorld, MaterialRenderProxy, DepthPriorityGroup, bDisableBackfaceCulling, bReceivesDecals, true, ViewIndex, Collector, HitProxy != nullptr ? HitProxy->Id : FHitProxyId());
}
void FDynamicMeshBuilder::GetMesh(const FMatrix& LocalToWorld, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriorityGroup, bool bDisableBackfaceCulling, bool bReceivesDecals, bool bUseSelectionOutline, int32 ViewIndex, FMeshElementCollector& Collector, const FHitProxyId HitProxyId)
{
FDynamicMeshBuilderSettings Settings;
Settings.bDisableBackfaceCulling = bDisableBackfaceCulling;
Settings.bReceivesDecals = bReceivesDecals;
Settings.bUseSelectionOutline = bUseSelectionOutline;
GetMesh(LocalToWorld, MaterialRenderProxy, DepthPriorityGroup, Settings, nullptr, ViewIndex, Collector, HitProxyId);
}
void FDynamicMeshBuilder::GetMesh(
const FMatrix& LocalToWorld,
const FMaterialRenderProxy* MaterialRenderProxy,
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/DynamicMeshBuilder.cpp:894
Scope (from outer to inner):
file
function void FDynamicMeshBuilder::GetMesh
Source code excerpt:
Mesh.Type = PT_TriangleList;
Mesh.DepthPriorityGroup = DepthPriorityGroup;
Mesh.bUseSelectionOutline = Settings.bUseSelectionOutline;
Mesh.BatchHitProxyId = HitProxyId;
BatchElement.FirstIndex = DrawOffset ? DrawOffset->FirstIndex : 0;
BatchElement.NumPrimitives = DrawOffset ? DrawOffset->NumPrimitives : (bHasValidIndexBuffer ? (OneFrameResources->IndexBuffer->Indices.Num() / 3) : (bHasValidVertexBuffer ? OneFrameResources->VertexBuffer->Vertices.Num() / 3 : 0));
BatchElement.MinVertexIndex = DrawOffset ? DrawOffset->MinVertexIndex : 0;
BatchElement.MaxVertexIndex = DrawOffset ? DrawOffset->MaxVertexIndex : (bHasValidVertexBuffer ? OneFrameResources->VertexBuffer->Vertices.Num() - 1 : 0);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/DynamicMeshBuilder.cpp:977
Scope (from outer to inner):
file
function void FDynamicMeshBuilder::GetMeshElement
Source code excerpt:
Mesh.Type = PT_TriangleList;
Mesh.DepthPriorityGroup = DepthPriorityGroup;
Mesh.bUseSelectionOutline = false;
Mesh.BatchHitProxyId = FHitProxyId();
}
}
void FDynamicMeshBuilder::Draw(FPrimitiveDrawInterface* PDI,const FMatrix& LocalToWorld,const FMaterialRenderProxy* MaterialRenderProxy,uint8 DepthPriorityGroup,bool bDisableBackfaceCulling, bool bReceivesDecals, const FHitProxyId HitProxyId )
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/HierarchicalInstancedStaticMesh.cpp:1263
Scope (from outer to inner):
file
function void FHierarchicalStaticMeshSceneProxy::FillDynamicMeshElements
Source code excerpt:
checkSlow(MeshBatch.GetNumPrimitives() > 0);
MeshBatch.bCanApplyViewModeOverrides = true;
MeshBatch.bUseSelectionOutline = ElementParams.BatchRenderSelection[SelectionGroupIndex];
MeshBatch.bUseWireframeSelectionColoring = ElementParams.BatchRenderSelection[SelectionGroupIndex];
MeshBatch.bUseAsOccluder = ShouldUseAsOccluder();
MeshBatch.VertexFactory = &InstancedRenderData.VertexFactories[LODIndex];
FMeshBatchElement& MeshBatchElement = MeshBatch.Elements[0];
MeshBatchElement.UserData = ElementParams.PassUserData[SelectionGroupIndex];
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/HierarchicalInstancedStaticMesh.cpp:1376
Scope (from outer to inner):
file
function void FHierarchicalStaticMeshSceneProxy::FillDynamicMeshElements
Source code excerpt:
BatchElement0.LooseParametersUniformBuffer = LooseUniformBuffer;
MeshElement.bCanApplyViewModeOverrides = true;
MeshElement.bUseSelectionOutline = ElementParams.BatchRenderSelection[SelectionGroupIndex];
MeshElement.bUseWireframeSelectionColoring = ElementParams.BatchRenderSelection[SelectionGroupIndex];
MeshElement.bUseAsOccluder = ShouldUseAsOccluder();
if (!bDidStats)
{
bDidStats = true;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/InstancedStaticMesh.cpp:1079
Scope (from outer to inner):
file
function void FInstancedStaticMeshSceneProxy::GetDynamicMeshElements
Source code excerpt:
MeshElement.Elements[0].LooseParametersUniformBuffer = LooseUniformBuffer;
MeshElement.bCanApplyViewModeOverrides = true;
MeshElement.bUseSelectionOutline = BatchRenderSelection[SelectionGroupIndex];
MeshElement.bUseWireframeSelectionColoring = BatchRenderSelection[SelectionGroupIndex];
if (View->bRenderFirstInstanceOnly)
{
for (int32 ElementIndex = 0; ElementIndex < MeshElement.Elements.Num(); ElementIndex++)
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/InstancedStaticMesh.cpp:1523
Scope (from outer to inner):
file
function bool FInstancedStaticMeshSceneProxy::GetMeshElement
Source code excerpt:
/** Sets up a FMeshBatch for a specific LOD and element. */
bool FInstancedStaticMeshSceneProxy::GetMeshElement(int32 LODIndex, int32 BatchIndex, int32 ElementIndex, uint8 InDepthPriorityGroup, bool bUseSelectionOutline, bool bAllowPreCulledIndices, FMeshBatch& OutMeshBatch) const
{
if (LODIndex < InstancedRenderData.VertexFactories.Num() && FStaticMeshSceneProxy::GetMeshElement(LODIndex, BatchIndex, ElementIndex, InDepthPriorityGroup, bUseSelectionOutline, bAllowPreCulledIndices, OutMeshBatch))
{
SetupInstancedMeshBatch(LODIndex, BatchIndex, OutMeshBatch);
return true;
}
return false;
};
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ModelRender.cpp:447
Scope: file
Source code excerpt:
MeshElement.bCanApplyViewModeOverrides = true;
MeshElement.bUseWireframeSelectionColoring = false;
MeshElement.bUseSelectionOutline = bOnlySelectedSurfaces;
MeshElement.LODIndex = 0;
Collector.AddMesh(ViewIndex, MeshElement);
FirstIndex += NumIndices;
}
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PrimitiveDrawingUtils.cpp:223
Scope (from outer to inner):
file
function void GetOrientedHalfSphereMesh
Source code excerpt:
void GetOrientedHalfSphereMesh(const FVector& Center, const FRotator& Orientation, const FVector& Radii, int32 NumSides, int32 NumRings, float StartAngle, float EndAngle, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriority,
bool bDisableBackfaceCulling, int32 ViewIndex, FMeshElementCollector& Collector, bool bUseSelectionOutline, HHitProxy* HitProxy)
{
// Use a mesh builder to draw the sphere.
FDynamicMeshBuilder MeshBuilder(Collector.GetFeatureLevel());
{
// The first/last arc are on top of each other.
int32 NumVerts = (NumSides + 1) * (NumRings + 1);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PrimitiveDrawingUtils.cpp:303
Scope (from outer to inner):
file
function void GetOrientedHalfSphereMesh
Source code excerpt:
FMemory::Free(ArcVerts);
}
MeshBuilder.GetMesh(FScaleMatrix(Radii) * FRotationMatrix(Orientation) * FTranslationMatrix(Center), MaterialRenderProxy, DepthPriority, bDisableBackfaceCulling, false, bUseSelectionOutline, ViewIndex, Collector, HitProxy);
}
void GetHalfSphereMesh(const FVector& Center, const FVector& Radii, int32 NumSides, int32 NumRings, float StartAngle, float EndAngle, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriority,
bool bDisableBackfaceCulling, int32 ViewIndex, FMeshElementCollector& Collector,bool bUseSelectionOutline,HHitProxy* HitProxy)
{
GetOrientedHalfSphereMesh(Center, FRotator::ZeroRotator, Radii, NumSides, NumRings, StartAngle, EndAngle, MaterialRenderProxy, DepthPriority, bDisableBackfaceCulling, ViewIndex, Collector, bUseSelectionOutline, HitProxy);
}
void GetSphereMesh(const FVector& Center, const FVector& Radii, int32 NumSides, int32 NumRings, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriority,
bool bDisableBackfaceCulling, int32 ViewIndex, FMeshElementCollector& Collector)
{
GetSphereMesh(Center, Radii, NumSides, NumRings, MaterialRenderProxy, DepthPriority, bDisableBackfaceCulling, ViewIndex, Collector, true, NULL);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PrimitiveDrawingUtils.cpp:319
Scope (from outer to inner):
file
function extern void GetSphereMesh
Source code excerpt:
extern ENGINE_API void GetSphereMesh(const FVector& Center, const FVector& Radii, int32 NumSides, int32 NumRings, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriority,
bool bDisableBackfaceCulling, int32 ViewIndex, FMeshElementCollector& Collector, bool bUseSelectionOutline, HHitProxy* HitProxy)
{
GetHalfSphereMesh(Center, Radii, NumSides, NumRings, 0, UE_PI, MaterialRenderProxy, DepthPriority, bDisableBackfaceCulling, ViewIndex, Collector, bUseSelectionOutline, HitProxy);
}
void DrawSphere(FPrimitiveDrawInterface* PDI,const FVector& Center,const FRotator& Orientation,const FVector& Radii,int32 NumSides,int32 NumRings,const FMaterialRenderProxy* MaterialRenderProxy,uint8 DepthPriority,bool bDisableBackfaceCulling)
{
// Use a mesh builder to draw the sphere.
FDynamicMeshBuilder MeshBuilder(PDI->View->GetFeatureLevel());
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SkeletalMesh.cpp:6747
Scope (from outer to inner):
file
function void FSkeletalMeshSceneProxy::GetDynamicElementsSection
Source code excerpt:
if (bSectionSelected && bCanHighlightSelectedSections)
{
Mesh.bUseSelectionOutline = true;
}
else
{
Mesh.bUseSelectionOutline = !bCanHighlightSelectedSections && bIsSelected;
}
#endif
#if WITH_EDITORONLY_DATA
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
if (bIsSelected)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SplineMeshSceneProxy.cpp:123
Scope (from outer to inner):
file
function bool FSplineMeshSceneProxy::GetMeshElement
Source code excerpt:
}
bool FSplineMeshSceneProxy::GetMeshElement(int32 LODIndex, int32 BatchIndex, int32 SectionIndex, uint8 InDepthPriorityGroup, bool bUseSelectionOutline, bool bAllowPreCulledIndices, FMeshBatch& OutMeshBatch) const
{
//checkf(LODIndex == 0 /*&& SectionIndex == 0*/, TEXT("Getting spline static mesh element with invalid params [%d, %d]"), LODIndex, SectionIndex);
if (FStaticMeshSceneProxy::GetMeshElement(LODIndex, BatchIndex, SectionIndex, InDepthPriorityGroup, bUseSelectionOutline, bAllowPreCulledIndices, OutMeshBatch))
{
SetupMeshBatchForSpline(LODIndex, OutMeshBatch);
return true;
}
return false;
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/StaticMeshRender.cpp:607
Scope (from outer to inner):
file
function bool FStaticMeshSceneProxy::GetMeshElement
Source code excerpt:
int32 SectionIndex,
uint8 InDepthPriorityGroup,
bool bUseSelectionOutline,
bool bAllowPreCulledIndices,
FMeshBatch& OutMeshBatch) const
{
const ERHIFeatureLevel::Type FeatureLevel = GetScene().GetFeatureLevel();
const FStaticMeshLODResources& LOD = RenderData->LODResources[LODIndex];
const FStaticMeshVertexFactories& VFs = RenderData->LODVertexFactories[LODIndex];
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/StaticMeshRender.cpp:643
Scope (from outer to inner):
file
function bool FStaticMeshSceneProxy::GetMeshElement
Source code excerpt:
}
OutMeshBatch.bUseSelectionOutline = bPerSectionSelection ? bUseSelectionOutline : true;
#endif
// Has the mesh component overridden the vertex color stream for this mesh LOD?
if (ProxyLODInfo.OverrideColorVertexBuffer)
{
// Make sure the indices are accessing data within the vertex buffer's
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/DynamicMeshBuilder.h:121
Scope: file
Source code excerpt:
bool bWireframe = false;
bool bReceivesDecals = true;
bool bUseSelectionOutline = true;
bool bCanApplyViewModeOverrides = false;
bool bUseWireframeSelectionColoring = false;
};
/**
* This class provides the vertex/index allocator interface used by FDynamicMeshBuilder which is
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/DynamicMeshBuilder.h:194
Scope (from outer to inner):
file
class class FDynamicMeshBuilder
Source code excerpt:
/** Adds a mesh of what's been built so far to the collector. */
ENGINE_API void GetMesh(const FMatrix& LocalToWorld, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriorityGroup, bool bDisableBackfaceCulling, bool bReceivesDecals, int32 ViewIndex, FMeshElementCollector& Collector);
ENGINE_API void GetMesh(const FMatrix& LocalToWorld, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriorityGroup, bool bDisableBackfaceCulling, bool bReceivesDecals, bool bUseSelectionOutline, int32 ViewIndex,
FMeshElementCollector& Collector, HHitProxy* HitProxy);
ENGINE_API void GetMesh(const FMatrix& LocalToWorld, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriorityGroup, bool bDisableBackfaceCulling, bool bReceivesDecals, bool bUseSelectionOutline, int32 ViewIndex,
FMeshElementCollector& Collector, const FHitProxyId HitProxyId = FHitProxyId());
ENGINE_API void GetMesh(const FMatrix& LocalToWorld, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriorityGroup, const FDynamicMeshBuilderSettings& Settings, FDynamicMeshDrawOffset const * const DrawOffset, int32 ViewIndex,
FMeshElementCollector& Collector, const FHitProxyId HitProxyId = FHitProxyId());
ENGINE_API void GetMesh(const FMatrix& LocalToWorld, const FMatrix& PrevLocalToWorld, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriorityGroup, const FDynamicMeshBuilderSettings& Settings,
FDynamicMeshDrawOffset const * const DrawOffset, int32 ViewIndex, FMeshElementCollector& Collector, const FHitProxyId HitProxyId = FHitProxyId());
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/MeshBatch.h:386
Scope: file
Source code excerpt:
* Whether the batch should receive the selection outline.
* This is useful for proxies which support selection on a per-mesh batch basis.
* They submit multiple mesh batches when selected, some of which have bUseSelectionOutline enabled.
*/
uint32 bUseSelectionOutline : 1;
/** Whether the mesh batch can be selected through editor selection, aka hit proxies. */
uint32 bSelectable : 1;
/** Whether the mesh batch should apply dithered LOD. */
uint32 bDitheredLODTransition : 1;
/** Whether the mesh batch can be rendered to virtual textures. */
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/MeshBatch.h:489
Scope (from outer to inner):
file
function FMeshBatch
Source code excerpt:
, bCanApplyViewModeOverrides(false)
, bUseWireframeSelectionColoring(false)
, bUseSelectionOutline(true)
, bSelectable(true)
, bDitheredLODTransition(false)
, bRenderToVirtualTexture(false)
, RuntimeVirtualTextureMaterialType(0)
, bOverlayMaterial(false)
#if RHI_RAYTRACING
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/SceneManagement.h:2309
Scope: file
Source code excerpt:
extern ENGINE_API void GetBoxMesh(const FMatrix& BoxToWorld,const FVector& Radii,const FMaterialRenderProxy* MaterialRenderProxy,uint8 DepthPriority,int32 ViewIndex,FMeshElementCollector& Collector, HHitProxy* HitProxy = NULL);
extern ENGINE_API void GetOrientedHalfSphereMesh(const FVector& Center, const FRotator& Orientation, const FVector& Radii, int32 NumSides, int32 NumRings, float StartAngle, float EndAngle, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriority, bool bDisableBackfaceCulling,
int32 ViewIndex, FMeshElementCollector& Collector, bool bUseSelectionOutline = false, HHitProxy* HitProxy = NULL);
extern ENGINE_API void GetHalfSphereMesh(const FVector& Center, const FVector& Radii, int32 NumSides, int32 NumRings, float StartAngle, float EndAngle, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriority, bool bDisableBackfaceCulling,
int32 ViewIndex, FMeshElementCollector& Collector, bool bUseSelectionOutline=false, HHitProxy* HitProxy=NULL);
extern ENGINE_API void GetSphereMesh(const FVector& Center, const FVector& Radii, int32 NumSides, int32 NumRings, const FMaterialRenderProxy* MaterialRenderProxy, uint8 DepthPriority,
bool bDisableBackfaceCulling, int32 ViewIndex, FMeshElementCollector& Collector);
extern ENGINE_API void GetSphereMesh(const FVector& Center,const FVector& Radii,int32 NumSides,int32 NumRings,const FMaterialRenderProxy* MaterialRenderProxy,uint8 DepthPriority,
bool bDisableBackfaceCulling,int32 ViewIndex,FMeshElementCollector& Collector, bool bUseSelectionOutline, HHitProxy* HitProxy);
extern ENGINE_API void GetCylinderMesh(const FVector& Base, const FVector& XAxis, const FVector& YAxis, const FVector& ZAxis,
double Radius, double HalfHeight, int32 Sides, const FMaterialRenderProxy* MaterialInstance, uint8 DepthPriority, int32 ViewIndex, FMeshElementCollector& Collector, HHitProxy* HitProxy = NULL);
extern ENGINE_API void GetCylinderMesh(const FMatrix& CylToWorld, const FVector& Base, const FVector& XAxis, const FVector& YAxis, const FVector& ZAxis,
double Radius, double HalfHeight, uint32 Sides, const FMaterialRenderProxy* MaterialInstance, uint8 DepthPriority, int32 ViewIndex, FMeshElementCollector& Collector, HHitProxy* HitProxy = NULL);
//Draws a cylinder along the axis from Start to End
extern ENGINE_API void GetCylinderMesh(const FVector& Start, const FVector& End, double Radius, int32 Sides, const FMaterialRenderProxy* MaterialInstance, uint8 DepthPriority, int32 ViewIndex, FMeshElementCollector& Collector, HHitProxy* HitProxy = NULL);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/SplineMeshSceneProxy.h:164
Scope (from outer to inner):
file
class class FSplineMeshSceneProxy final : public FStaticMeshSceneProxy, public TSplineMeshSceneProxyCommon<FSplineMeshSceneProxy>
Source code excerpt:
virtual SIZE_T GetTypeHash() const override;
virtual bool GetShadowMeshElement(int32 LODIndex, int32 BatchIndex, uint8 InDepthPriorityGroup, FMeshBatch& OutMeshBatch, bool bDitheredLODTransition) const override;
virtual bool GetMeshElement(int32 LODIndex, int32 BatchIndex, int32 ElementIndex, uint8 InDepthPriorityGroup, bool bUseSelectionOutline, bool bAllowPreCulledIndices, FMeshBatch& OutMeshBatch) const override;
virtual bool GetWireframeMeshElement(int32 LODIndex, int32 BatchIndex, const FMaterialRenderProxy* WireframeRenderProxy, uint8 InDepthPriorityGroup, bool bAllowPreCulledIndices, FMeshBatch& OutMeshBatch) const override;
virtual bool GetCollisionMeshElement(int32 LODIndex, int32 BatchIndex, int32 ElementIndex, uint8 InDepthPriorityGroup, const FMaterialRenderProxy* RenderProxy, FMeshBatch& OutMeshBatch) const override;
#if RHI_RAYTRACING
virtual bool HasRayTracingRepresentation() const override { return true; }
virtual bool IsRayTracingRelevant() const override { return true; }
virtual void GetDynamicRayTracingInstances(FRayTracingMaterialGatheringContext& Context, TArray<FRayTracingInstance>& OutRayTracingInstances) override;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/StaticMeshSceneProxy.h:50
Scope (from outer to inner):
file
class class FStaticMeshSceneProxy : public FPrimitiveSceneProxy
Source code excerpt:
int32 ElementIndex,
uint8 InDepthPriorityGroup,
bool bUseSelectionOutline,
bool bAllowPreCulledIndices,
FMeshBatch& OutMeshBatch) const;
ENGINE_API virtual void CreateRenderThreadResources(FRHICommandListBase& RHICmdList) override;
ENGINE_API virtual void DestroyRenderThreadResources() override;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneHitProxyRendering.cpp:938
Scope (from outer to inner):
file
function void FEditorSelectionMeshProcessor::AddMeshBatch
Source code excerpt:
{
if (MeshBatch.bUseForMaterial
&& MeshBatch.bUseSelectionOutline
&& PrimitiveSceneProxy
&& PrimitiveSceneProxy->WantsSelectionOutline()
&& (PrimitiveSceneProxy->IsSelected() || PrimitiveSceneProxy->IsHovered()))
{
const FMaterialRenderProxy* MaterialRenderProxy = MeshBatch.MaterialRenderProxy;
while (MaterialRenderProxy)
#Loc: <Workspace>/Engine/Source/Runtime/UMG/Private/Components/WidgetComponent.cpp:396
Scope (from outer to inner):
file
class class FWidget3DSceneProxy final : public FPrimitiveSceneProxy
function virtual void GetDynamicMeshElements
Source code excerpt:
Settings.bDisableBackfaceCulling = false;
Settings.bReceivesDecals = true;
Settings.bUseSelectionOutline = true;
MeshBuilder.GetMesh(ViewportLocalToWorld, PreviousLocalToWorld, ParentMaterialProxy, SDPG_World, Settings, nullptr, ViewIndex, Collector, FHitProxyId());
}
}
}
else
{
#Loc: <Workspace>/Engine/Source/Runtime/UMG/Private/Components/WidgetComponent.cpp:478
Scope (from outer to inner):
file
class class FWidget3DSceneProxy final : public FPrimitiveSceneProxy
function virtual void GetDynamicMeshElements
Source code excerpt:
Settings.bDisableBackfaceCulling = false;
Settings.bReceivesDecals = true;
Settings.bUseSelectionOutline = true;
MeshBuilder.GetMesh(ViewportLocalToWorld, PreviousLocalToWorld, ParentMaterialProxy, SDPG_World, Settings, nullptr, ViewIndex, Collector, FHitProxyId());
}
}
}
}
}