bShowGrid
bShowGrid
#Overview
name: bShowGrid
The value of this variable can be defined or overridden in .ini config files. 3
.ini config files referencing this setting variable.
It is referenced in 33
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bShowGrid is to control the visibility of a grid in a viewport or editor interface. This variable is commonly used in various Unreal Engine subsystems and tools to toggle the display of a reference grid.
Key points about bShowGrid:
-
It’s used in multiple Unreal Engine subsystems, including the Material Editor, Cascade (particle system editor), Persona (animation editor), and World Partition Editor.
-
The value is typically set through user preferences or editor options, allowing users to customize their viewing experience.
-
It’s often tied to a toggle command in the UI, allowing users to quickly show or hide the grid.
-
The variable interacts with the DrawHelper class in many viewports, which is responsible for rendering debug visualization elements like grids.
-
In some cases, it’s used in conjunction with other grid-related settings, such as grid color or size.
-
Developers should be aware that this variable might affect performance in some scenarios, especially in complex editors or large scenes.
-
When implementing custom tools or editors, it’s a good practice to respect this setting to maintain consistency with other Unreal Engine interfaces.
-
The variable is often saved in config files, allowing user preferences to persist between editor sessions.
Best practices when using this variable:
- Respect user preferences by checking the value of bShowGrid before rendering grid elements.
- Provide a way for users to toggle the grid visibility in custom tools or editors.
- Consider performance implications when rendering grids in complex scenes or viewports.
- Use consistent naming conventions (bShowGrid) when implementing similar functionality in custom code.
- When modifying the value, make sure to save the changes to the appropriate config file if persistence is desired.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:482, section: [/Script/UnrealEd.MaterialEditorOptions]
- INI Section:
/Script/UnrealEd.MaterialEditorOptions
- Raw value:
True
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:540, section: [/Script/UnrealEd.PersonaOptions]
- INI Section:
/Script/UnrealEd.PersonaOptions
- Raw value:
False
- Is Array:
False
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:597, section: [/Script/UnrealEd.CascadeOptions]
- INI Section:
/Script/UnrealEd.CascadeOptions
- Raw value:
false
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/STransformedWaveformViewPanel.cpp:345
Scope (from outer to inner):
file
function void STransformedWaveformViewPanel::SetUpValueGridOverlay
Source code excerpt:
const UWaveformEditorWidgetsSettings* Settings = GetWaveformEditorWidgetsSettings();
const bool bShowGrid = Settings ? Settings->ShowLoudnessGrid : true;
const bool bShowLabels = Settings ? Settings->ShowLoudnessGridDecibelValues : true;
const uint32 NumValueGridDivision = Settings ? Settings->MaxLoudnessGridDivisions : 3;
const FSampledSequenceValueGridOverlayStyle& ValueGridStyle = WaveformEditorStyle->GetWidgetStyle<FSampledSequenceValueGridOverlayStyle>("WaveformEditorValueGrid.Style");
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/STransformedWaveformViewPanel.cpp:358
Scope (from outer to inner):
file
function void STransformedWaveformViewPanel::SetUpValueGridOverlay
Source code excerpt:
.MaxDivisionParameter(NumValueGridDivision)
.HideLabels(!bShowLabels)
.HideGrid(!bShowGrid)
.Style(&ValueGridStyle);
WaveformEditorStyle->OnNewValueGridOverlayStyle.AddSP(ValueGridOverlay.ToSharedRef(), &SSampledSequenceValueGridOverlay::OnStyleUpdated);
}
#undef LOCTEXT_NAMESPACE
#Loc: <Workspace>/Engine/Plugins/Experimental/MeshModelingToolsetExp/Source/MeshModelingToolsEditorOnlyExp/Private/DrawSplineTool.cpp:285
Scope (from outer to inner):
file
function void UDrawSplineTool::Setup
Source code excerpt:
PlaneMechanic->Setup(this);
PlaneMechanic->Initialize(GetTargetWorld(), FFrame3d(FVector3d::Zero(), FVector3d::UnitX()));
PlaneMechanic->bShowGrid = Settings->bHitCustomPlane;
PlaneMechanic->CanUpdatePlaneFunc = [this] { return Settings->bHitCustomPlane; };
Settings->WatchProperty(Settings->bHitCustomPlane, [this](bool) {
PlaneMechanic->bShowGrid = Settings->bHitCustomPlane;
});
ClickOrDragBehavior = NewObject<USingleClickOrDragInputBehavior>();
ClickOrDragBehavior->Initialize(this, this);
AddInputBehavior(ClickOrDragBehavior);
#Loc: <Workspace>/Engine/Plugins/Experimental/MeshModelingToolsetExp/Source/MeshModelingToolsExp/Private/RevolveBoundaryTool.cpp:122
Scope (from outer to inner):
file
function void URevolveBoundaryTool::Setup
Source code excerpt:
FRotator(Settings->AxisOrientation.X, Settings->AxisOrientation.Y, 0).Quaternion()));
PlaneMechanic->UpdateClickPriority(ClickBehavior->GetPriority().MakeLower());
PlaneMechanic->bShowGrid = false;
PlaneMechanic->OnPlaneChanged.AddLambda([this]() {
Settings->AxisOrigin = (FVector)PlaneMechanic->Plane.Origin;
FRotator AxisOrientation = ((FQuat)PlaneMechanic->Plane.Rotation).Rotator();
Settings->AxisOrientation.X = AxisOrientation.Pitch;
Settings->AxisOrientation.Y = AxisOrientation.Yaw;
NotifyOfPropertyChangeByTool(Settings);
#Loc: <Workspace>/Engine/Plugins/Experimental/MeshModelingToolsetExp/Source/MeshModelingToolsExp/Private/RevolveSplineTool.cpp:72
Scope (from outer to inner):
file
function void URevolveSplineTool::Setup
Source code excerpt:
PlaneMechanic->Initialize(GetTargetWorld(), FFrame3d(Settings->AxisOrigin,
FRotator(Settings->AxisOrientation.X, Settings->AxisOrientation.Y, 0).Quaternion()));
PlaneMechanic->bShowGrid = false;
PlaneMechanic->OnPlaneChanged.AddLambda([this]() {
Settings->AxisOrigin = (FVector)PlaneMechanic->Plane.Origin;
FRotator AxisOrientation = ((FQuat)PlaneMechanic->Plane.Rotation).Rotator();
Settings->AxisOrientation.X = AxisOrientation.Pitch;
Settings->AxisOrientation.Y = AxisOrientation.Yaw;
NotifyOfPropertyChangeByTool(Settings);
#Loc: <Workspace>/Engine/Plugins/Experimental/Mutable/Source/CustomizableObjectEditor/Private/MuCOE/CustomizableObjectEditorViewportClient.cpp:103
Scope (from outer to inner):
file
function FCustomizableObjectEditorViewportClient::FCustomizableObjectEditorViewportClient
Source code excerpt:
EngineShowFlags.ScreenSpaceReflections = 1;
EngineShowFlags.AmbientOcclusion = 1;
EngineShowFlags.Grid = ConfigOption->bShowGrid;
OverrideNearClipPlane(1.0f);
SetPreviewComponent(nullptr);
// now add the ClipMorph plane
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Private/AudioVectorscopeUMG.cpp:120
Scope (from outer to inner):
file
function void UAudioVectorscope::SynchronizeProperties
Source code excerpt:
VectorscopePanelWidget->SetVectorViewerScaleFactor(Scale);
VectorscopePanelWidget->SetGridVisibility(bShowGrid);
}
}
void UAudioVectorscope::ReleaseSlateResources(bool bReleaseChildren)
{
Super::ReleaseSlateResources(bReleaseChildren);
#Loc: <Workspace>/Engine/Plugins/Runtime/AudioWidgets/Source/AudioWidgets/Public/AudioVectorscopeUMG.h:53
Scope (from outer to inner):
file
class class UAudioVectorscope: public UWidget
Source code excerpt:
/** Show/Hide the vectorscope grid. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Vectorscope Values")
bool bShowGrid = true;
/** The number of grid divisions. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Vectorscope Values", meta = (UIMin = 1, UIMax = 6, ClampMin = 1, ClampMax = 6))
int32 GridDivisions = 2;
/** For how long the audio samples should persist in the screen (in milliseconds). */
#Loc: <Workspace>/Engine/Plugins/Runtime/HairStrands/Source/HairStrandsEditor/Private/Widgets/SGroomEditorViewport.cpp:43
Scope (from outer to inner):
file
class class FGroomEditorViewportClient : public FEditorViewportClient
Source code excerpt:
virtual bool CanCycleWidgetMode() const override { return false; }
void SetShowGrid(bool bShowGrid);
virtual void SetIsSimulateInEditorViewport(bool bInIsSimulateInEditorViewport)override;
TWeakPtr<SGroomEditorViewport> GroomEditorViewportPtr;
};
#Loc: <Workspace>/Engine/Plugins/Runtime/HairStrands/Source/HairStrandsEditor/Private/Widgets/SGroomEditorViewport.cpp:108
Scope (from outer to inner):
file
function void FGroomEditorViewportClient::SetShowGrid
Source code excerpt:
}
void FGroomEditorViewportClient::SetShowGrid(bool bShowGrid)
{
DrawHelper.bDrawGrid = bShowGrid;
}
void FGroomEditorViewportClient::SetIsSimulateInEditorViewport(bool bInIsSimulateInEditorViewport)
{
bIsSimulateInEditorViewport = bInIsSimulateInEditorViewport;
}
#Loc: <Workspace>/Engine/Plugins/Runtime/HairStrands/Source/HairStrandsEditor/Private/Widgets/SGroomEditorViewport.cpp:122
Scope (from outer to inner):
file
function void SGroomEditorViewport::Construct
Source code excerpt:
void SGroomEditorViewport::Construct(const FArguments& InArgs)
{
bShowGrid = true;
GroomComponent = nullptr;
StaticGroomTarget = nullptr;
SkeletalGroomTarget = nullptr;
AdvancedPreviewScene = MakeShareable(new FAdvancedPreviewScene(FPreviewScene::ConstructionValues()));
AdvancedPreviewScene->SetFloorVisibility(false);
#Loc: <Workspace>/Engine/Plugins/Runtime/HairStrands/Source/HairStrandsEditor/Private/Widgets/SGroomEditorViewport.cpp:225
Scope (from outer to inner):
file
function void SGroomEditorViewport::TogglePreviewGrid
Source code excerpt:
void SGroomEditorViewport::TogglePreviewGrid()
{
bShowGrid = !bShowGrid;
SystemViewportClient->SetShowGrid(bShowGrid);
}
bool SGroomEditorViewport::IsTogglePreviewGridChecked() const
{
return bShowGrid;
}
void SGroomEditorViewport::SetStaticMeshComponent(UStaticMeshComponent *Target)
{
if (StaticGroomTarget != nullptr)
{
#Loc: <Workspace>/Engine/Plugins/Runtime/HairStrands/Source/HairStrandsEditor/Public/Widgets/SGroomEditorViewport.h:91
Scope (from outer to inner):
file
class class SGroomEditorViewport : public SEditorViewport, public FGCObject, public ICommonEditorViewportToolbarInfoProvider
Source code excerpt:
/** If true, render grid the preview scene. */
bool bShowGrid;
};
#Loc: <Workspace>/Engine/Plugins/Runtime/MeshModelingToolset/Source/MeshModelingTools/Private/DrawPolygonTool.cpp:295
Scope (from outer to inner):
file
function void UDrawPolygonTool::Render
Source code excerpt:
//
// Render the plane mechanic after correctly setting bShowGrid
//
PlaneMechanic->bShowGrid = !bInInteractiveExtrude;
PlaneMechanic->Render(RenderAPI);
//
// Generate the fixed polygon contour
//
if ((bInFixedPolygonMode) && (FixedPolygonClickPoints.Num() > 0))
#Loc: <Workspace>/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Private/Mechanics/ConstructionPlaneMechanic.cpp:149
Scope (from outer to inner):
file
function void UConstructionPlaneMechanic::Render
Source code excerpt:
{
const UModelingComponentsEditorSettings* Settings = GetMutableDefault<UModelingComponentsEditorSettings>();
if (bShowGrid && Settings != nullptr)
{
const FViewCameraState CameraState = RenderAPI->GetCameraState();
const float PDIScale = CameraState.GetPDIScalingFactor();
const FFrame3d DrawFrame(PlaneTransformProxy->GetTransform().GetLocation(), Plane.Rotation);
const int32 NumGridLines = Settings->NumGridLines;
#Loc: <Workspace>/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/ConstructionPlaneMechanic.h:30
Scope (from outer to inner):
file
class class UConstructionPlaneMechanic : public UInteractionMechanic
Source code excerpt:
TUniqueFunction<bool()> CanUpdatePlaneFunc = []() { return true; };
bool bShowGrid = true;
UE::Geometry::FFrame3d Plane;
DECLARE_MULTICAST_DELEGATE(OnConstructionPlaneChangedEvent);
OnConstructionPlaneChangedEvent OnPlaneChanged;
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/Cascade.cpp:3979
Scope (from outer to inner):
file
function void FCascade::OnToggleGrid
Source code excerpt:
// Toggle the grid and worldbox.
FEditorCommonDrawHelper& DrawHelper = PreviewViewport->GetViewportClient()->GetDrawHelper();
bool bShowGrid = !DrawHelper.bDrawGrid;
EditorOptions->bShowGrid = bShowGrid;
EditorOptions->SaveConfig();
DrawHelper.bDrawGrid = bShowGrid;
PreviewViewport->GetViewportClient()->EngineShowFlags.SetGrid(bShowGrid);
PreviewViewport->RefreshViewport();
}
}
bool FCascade::IsToggleGridChecked() const
{
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/CascadePreviewViewportClient.cpp:101
Scope (from outer to inner):
file
function FCascadeEdPreviewViewportClient::FCascadeEdPreviewViewportClient
Source code excerpt:
GridColorMinor = CascadePtr.Pin()->GetEditorOptions()->GridColor_Low;
DrawHelper.bDrawGrid = CascadePtr.Pin()->GetEditorOptions()->bShowGrid;
DrawHelper.GridColorAxis = GridColorAxis;
DrawHelper.GridColorMajor = GridColorMajor;
DrawHelper.GridColorMinor = GridColorMinor;
DrawHelper.bDrawKillZ = false;
DrawHelper.bDrawWorldBox = false;
DrawHelper.bDrawPivot = false;
#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/SCSEditorViewportClient.cpp:1098
Scope (from outer to inner):
file
function void FSCSEditorViewportClient::ToggleShowGrid
Source code excerpt:
UEditorPerProjectUserSettings* Settings = GetMutableDefault<UEditorPerProjectUserSettings>();
bool bShowGrid = Settings->bSCSEditorShowGrid;
bShowGrid = !bShowGrid;
DrawHelper.bDrawGrid = bShowGrid;
Settings->bSCSEditorShowGrid = bShowGrid;
Settings->PostEditChange();
Invalidate();
}
void FSCSEditorViewportClient::BeginTransaction(const FText& Description)
#Loc: <Workspace>/Engine/Source/Editor/LandscapeEditor/Private/LandscapeEdModePaintTools.cpp:1196
Scope (from outer to inner):
file
class class FLandscapeToolFlatten : public FLandscapeToolPaintBase<ToolTarget, FLandscapeToolStrokeFlatten<ToolTarget>>
function virtual void Tick
Source code excerpt:
if (HeightmapFlattenPreviewComponent != nullptr)
{
bool bShowGrid = this->EdMode->UISettings->bUseFlattenTarget && this->EdMode->UISettings->bShowFlattenTargetPreview;
HeightmapFlattenPreviewComponent->SetVisibility(bShowGrid);
}
}
virtual bool MouseMove(FEditorViewportClient* ViewportClient, FViewport* Viewport, int32 x, int32 y) override
{
bool bResult = Super::MouseMove(ViewportClient, Viewport, x, y);
#Loc: <Workspace>/Engine/Source/Editor/LandscapeEditor/Private/LandscapeEdModePaintTools.cpp:1246
Scope (from outer to inner):
file
class class FLandscapeToolFlatten : public FLandscapeToolPaintBase<ToolTarget, FLandscapeToolStrokeFlatten<ToolTarget>>
function virtual void EnterTool
Source code excerpt:
HeightmapFlattenPreviewComponent->RegisterComponent();
bool bShowGrid = this->EdMode->UISettings->bUseFlattenTarget && this->EdMode->UISettings->bShowFlattenTargetPreview;
HeightmapFlattenPreviewComponent->SetVisibility(bShowGrid);
// Try to set a sane initial location for the preview grid
const FTransform LocalToWorld = this->EdMode->CurrentToolTarget.LandscapeInfo->GetLandscapeProxy()->GetRootComponent()->GetComponentToWorld();
FVector Origin = FVector::ZeroVector;
Origin.Z = (FMath::RoundToFloat((this->EdMode->UISettings->FlattenTarget - LocalToWorld.GetTranslation().Z) / LocalToWorld.GetScale3D().Z * LANDSCAPE_INV_ZSCALE) - 0.1f) * LANDSCAPE_ZSCALE;
HeightmapFlattenPreviewComponent->SetRelativeLocation(Origin, false);
#Loc: <Workspace>/Engine/Source/Editor/MaterialEditor/Private/MaterialEditor.cpp:2503
Scope (from outer to inner):
file
function void FMaterialEditor::LoadEditorSettings
Source code excerpt:
if ( PreviewViewport.IsValid() )
{
if (EditorOptions->bShowGrid)
{
PreviewViewport->TogglePreviewGrid();
}
if (EditorOptions->bRealtimeMaterialViewport && PreviewViewport->GetViewportClient())
{
#Loc: <Workspace>/Engine/Source/Editor/MaterialEditor/Private/MaterialEditor.cpp:2534
Scope (from outer to inner):
file
function void FMaterialEditor::SaveEditorSettings
Source code excerpt:
if ( EditorOptions )
{
EditorOptions->bShowGrid = PreviewViewport->IsTogglePreviewGridChecked();
EditorOptions->bRealtimeMaterialViewport = PreviewViewport->IsRealtime();
EditorOptions->bHideUnusedConnectorsSetting = IsOnHideConnectorsChecked();
EditorOptions->bAlwaysRefreshAllPreviews = IsOnAlwaysRefreshAllPreviews();
EditorOptions->bRealtimeExpressionViewport = IsToggleRealTimeExpressionsChecked();
EditorOptions->bLivePreviewUpdate = IsToggleLivePreviewChecked();
EditorOptions->bHideUnrelatedNodes = bHideUnrelatedNodes;
#Loc: <Workspace>/Engine/Source/Editor/MaterialEditor/Private/MaterialInstanceEditor.cpp:1503
Scope (from outer to inner):
file
function void FMaterialInstanceEditor::SaveSettings
Source code excerpt:
void FMaterialInstanceEditor::SaveSettings()
{
GConfig->SetBool(TEXT("MaterialInstanceEditor"), TEXT("bShowGrid"), PreviewVC->IsTogglePreviewGridChecked(), GEditorPerProjectIni);
GConfig->SetBool(TEXT("MaterialInstanceEditor"), TEXT("bDrawGrid"), PreviewVC->IsRealtime(), GEditorPerProjectIni);
GConfig->SetInt(TEXT("MaterialInstanceEditor"), TEXT("PrimType"), PreviewVC->PreviewPrimType, GEditorPerProjectIni);
}
void FMaterialInstanceEditor::LoadSettings()
{
bool bRealtime=false;
bool bShowGrid=false;
int32 PrimType=static_cast<EThumbnailPrimType>( TPT_Sphere );
GConfig->GetBool(TEXT("MaterialInstanceEditor"), TEXT("bShowGrid"), bShowGrid, GEditorPerProjectIni);
GConfig->GetBool(TEXT("MaterialInstanceEditor"), TEXT("bDrawGrid"), bRealtime, GEditorPerProjectIni);
GConfig->GetInt(TEXT("MaterialInstanceEditor"), TEXT("PrimType"), PrimType, GEditorPerProjectIni);
if(PreviewVC.IsValid())
{
if ( bShowGrid )
{
PreviewVC->TogglePreviewGrid();
}
if ( bRealtime )
{
PreviewVC->OnToggleRealtime();
#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/AnimationEditorViewportClient.cpp:126
Scope (from outer to inner):
file
function FAnimationViewportClient::FAnimationViewportClient
Source code excerpt:
EngineShowFlags.AmbientOcclusion = 1;
EngineShowFlags.SetSnap(0);
EngineShowFlags.Grid = ConfigOption->bShowGrid;
SetRealtime(true);
if(GEditor->PlayWorld)
{
const bool bShouldBeRealtime = false;
AddRealtimeOverride(bShouldBeRealtime, LOCTEXT("RealtimeOverride_PIE", "Play in Editor"));
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/CascadeOptions.h:101
Scope (from outer to inner):
file
class class UCascadeOptions : public UObject
Source code excerpt:
UPROPERTY(EditAnywhere, config, Category=Options)
uint32 bShowGrid:1;
UPROPERTY(EditAnywhere, config, Category=Options)
FColor GridColor_Hi;
UPROPERTY(EditAnywhere, config, Category=Options)
FColor GridColor_Low;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/MaterialEditorOptions.h:20
Scope (from outer to inner):
file
class class UMaterialEditorOptions : public UObject
Source code excerpt:
/** If true, render grid the preview scene. */
UPROPERTY(EditAnywhere, config, Category=Options)
uint32 bShowGrid:1;
/** If true, don't render connectors that are not connected to anything. */
UPROPERTY(EditAnywhere, config, Category=Options)
uint32 bHideUnusedConnectorsSetting:1;
/** If true, the 3D material preview viewport updates in realtime. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/PersonaOptions.h:121
Scope (from outer to inner):
file
class class UPersonaOptions : public UObject
Source code excerpt:
/** Whether or not the grid should be visible by default for the Animation Editor(s)*/
UPROPERTY(EditAnywhere, config, Category = "Viewport")
uint32 bShowGrid:1;
/** Whether or not the XYZ axis at the origin should be highlighted on the grid by default */
UPROPERTY(EditAnywhere, config, Category = "Viewport")
uint32 bHighlightOrigin:1;
/** Whether or not audio should be muted by default for the Animation Editor(s)*/
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/PreferenceStubs.cpp:174
Scope (from outer to inner):
file
function void UPersonaOptions::SetShowGrid
Source code excerpt:
void UPersonaOptions::SetShowGrid( bool bInShowGrid )
{
bShowGrid = bInShowGrid;
SaveConfig();
}
void UPersonaOptions::SetHighlightOrigin( bool bInHighlightOrigin )
{
bHighlightOrigin = bInHighlightOrigin;
#Loc: <Workspace>/Engine/Source/Editor/WorldPartitionEditor/Private/WorldPartition/SWorldPartitionEditorGrid2D.cpp:435
Scope (from outer to inner):
file
function SWorldPartitionEditorGrid2D::SWorldPartitionEditorGrid2D
Source code excerpt:
, bShowActors(false)
, bShowHLODActors(false)
, bShowGrid(true)
, bShowMiniMap(true)
, bFollowPlayerInPIE(false)
, SelectBox(ForceInit)
, SelectBoxGridSnapped(ForceInit)
, WorldMiniMapBounds(ForceInit)
, TickTime(0)
#Loc: <Workspace>/Engine/Source/Editor/WorldPartitionEditor/Private/WorldPartition/SWorldPartitionEditorGrid2D.cpp:611
Scope (from outer to inner):
file
function void SWorldPartitionEditorGrid2D::BindCommands
lambda-function
Source code excerpt:
CommandList->MapAction(Commands.ShowActors, FExecuteAction::CreateLambda([this]() { bShowActors = !bShowActors; InvalidateShownActorsCache(); }), FCanExecuteAction(), FIsActionChecked::CreateLambda([this]() { return bShowActors; }));
CommandList->MapAction(Commands.ShowHLODActors, FExecuteAction::CreateLambda([this]() { bShowHLODActors = !bShowHLODActors; InvalidateShownActorsCache(); }), FCanExecuteAction(), FIsActionChecked::CreateLambda([this]() { return bShowHLODActors; }));
CommandList->MapAction(Commands.ShowGrid, FExecuteAction::CreateLambda([this]() { bShowGrid = !bShowGrid; }), FCanExecuteAction(), FIsActionChecked::CreateLambda([this]() { return bShowGrid; }));
CommandList->MapAction(Commands.ShowMiniMap, FExecuteAction::CreateLambda([this]() { bShowMiniMap = !bShowMiniMap; }), FCanExecuteAction(), FIsActionChecked::CreateLambda([this]() { return bShowMiniMap; }));
CommandList->MapAction(Commands.ShowCoords, FExecuteAction::CreateLambda([this]() { GetMutableDefault<UWorldPartitionEditorPerProjectUserSettings>()->SetShowCellCoords(!GetMutableDefault<UWorldPartitionEditorPerProjectUserSettings>()->GetShowCellCoords()); }), FCanExecuteAction(), FIsActionChecked::CreateLambda([this]() { return GetMutableDefault<UWorldPartitionEditorPerProjectUserSettings>()->GetShowCellCoords(); }), FIsActionButtonVisible::CreateLambda([this]() { return (GetWorldPartition() && GetWorldPartition()->IsStreamingEnabled()); }));
// Buttons
CommandList->MapAction(Commands.FocusSelection, FExecuteAction::CreateSP(this, &SWorldPartitionEditorGrid2D::FocusSelection), FCanExecuteAction::CreateLambda(CanFocusSelection));
CommandList->MapAction(Commands.FocusLoadedRegions, FExecuteAction::CreateSP(this, &SWorldPartitionEditorGrid2D::FocusLoadedRegions), FCanExecuteAction::CreateLambda([this]() { return IsInteractive() && GetWorldPartition() && GetWorldPartition()->HasLoadedUserCreatedRegions(); }), FIsActionChecked(), FIsActionButtonVisible::CreateLambda([this]() { return GetDefault<UWorldPartitionEditorSettings>()->bEnableLoadingInEditor; }));
#Loc: <Workspace>/Engine/Source/Editor/WorldPartitionEditor/Private/WorldPartition/SWorldPartitionEditorGridSpatialHash.cpp:180
Scope (from outer to inner):
file
function int32 SWorldPartitionEditorGridSpatialHash::PaintGrid
Source code excerpt:
};
if (bShowGrid)
{
PaintGridLinesFaded(4, 1.0f);
PaintGridLinesFaded(2, 1.0f);
PaintGridLinesFaded(1, 2.0f);
}
#Loc: <Workspace>/Engine/Source/Editor/WorldPartitionEditor/Public/WorldPartition/SWorldPartitionEditorGrid2D.h:168
Scope (from outer to inner):
file
class class SWorldPartitionEditorGrid2D : public SWorldPartitionEditorGrid
Source code excerpt:
bool bShowActors;
bool bShowHLODActors;
bool bShowGrid;
bool bShowMiniMap;
bool bFollowPlayerInPIE;
FVector2D MouseCursorPos;
FVector2D MouseCursorPosWorld;
FVector2D LastMouseCursorPosWorldDrag;
FVector2D SelectionStart;