bFilterStaticMesh
bFilterStaticMesh
#Overview
name: bFilterStaticMesh
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 7
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bFilterStaticMesh is to control whether static mesh components should be included in the foliage painting process within the Unreal Engine 5 editor. This setting variable is part of the foliage editing system, which allows developers to place and paint foliage instances in the game world.
The Unreal Engine subsystem that relies on this setting variable is the Foliage Edit module, specifically within the FoliageEdMode class. This module is responsible for handling foliage painting and editing functionality in the Unreal Editor.
The value of this variable is set in several ways:
- It is initialized to true in the FFoliageUISettings constructor.
- It can be loaded from the editor configuration file using GConfig->GetBool().
- It can be saved to the editor configuration file using GConfig->SetBool().
- It can be set programmatically using the SetFilterStaticMesh() function.
This variable interacts with other similar filtering variables such as bFilterLandscape, bFilterBSP, bFilterFoliage, and bFilterTranslucent. Together, these variables determine which types of geometry can be painted with foliage.
Developers must be aware that:
- This variable affects the foliage painting behavior in the editor.
- Changing this variable will impact which objects can receive foliage during the painting process.
- The setting is persistent across editor sessions as it is saved in the configuration file.
Best practices when using this variable include:
- Consider the performance implications of enabling or disabling static mesh filtering, especially in scenes with many static mesh components.
- Use this variable in conjunction with other filtering options to achieve the desired foliage painting behavior.
- Be consistent in its usage across your project to maintain a predictable foliage painting experience.
- Document any custom settings or changes to this variable for your development team to ensure everyone understands the current foliage painting configuration.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:769, section: [FoliageEdit]
- INI Section:
FoliageEdit
- Raw value:
True
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/FoliageEdit/Private/FoliageEdMode.cpp:2844
Scope (from outer to inner):
file
function void FEdModeFoliage::ApplyPaintBucket_Add
Source code excerpt:
UMaterialInterface* Material = StaticMeshComponent->GetMaterial(0);
if (UISettings.bFilterStaticMesh && StaticMeshComponent->GetStaticMesh() && StaticMeshComponent->GetStaticMesh()->GetRenderData() &&
(UISettings.bFilterTranslucent || !Material || !IsTranslucentBlendMode(*Material)))
{
UStaticMesh* StaticMesh = StaticMeshComponent->GetStaticMesh();
FStaticMeshLODResources& LODModel = StaticMesh->GetRenderData()->LODResources[0];
TArray<FFoliagePaintBucketTriangle>& PotentialTriangles = ComponentPotentialTriangles.Add(StaticMeshComponent, TArray<FFoliagePaintBucketTriangle>());
#Loc: <Workspace>/Engine/Source/Editor/FoliageEdit/Private/FoliageEdMode.cpp:4081
Scope (from outer to inner):
file
function void FFoliageUISettings::Load
Source code excerpt:
GConfig->GetFloat(TEXT("FoliageEdit"), TEXT("UnpaintDensity"), UnpaintDensity, GEditorPerProjectIni);
GConfig->GetBool(TEXT("FoliageEdit"), TEXT("bFilterLandscape"), bFilterLandscape, GEditorPerProjectIni);
GConfig->GetBool(TEXT("FoliageEdit"), TEXT("bFilterStaticMesh"), bFilterStaticMesh, GEditorPerProjectIni);
GConfig->GetBool(TEXT("FoliageEdit"), TEXT("bFilterBSP"), bFilterBSP, GEditorPerProjectIni);
GConfig->GetBool(TEXT("FoliageEdit"), TEXT("bFilterFoliage"), bFilterFoliage, GEditorPerProjectIni);
GConfig->GetBool(TEXT("FoliageEdit"), TEXT("bFilterTranslucent"), bFilterTranslucent, GEditorPerProjectIni);
GConfig->GetBool(TEXT("FoliageEdit"), TEXT("bShowPaletteItemDetails"), bShowPaletteItemDetails, GEditorPerProjectIni);
GConfig->GetBool(TEXT("FoliageEdit"), TEXT("bShowPaletteItemTooltips"), bShowPaletteItemTooltips, GEditorPerProjectIni);
#Loc: <Workspace>/Engine/Source/Editor/FoliageEdit/Private/FoliageEdMode.cpp:4113
Scope (from outer to inner):
file
function void FFoliageUISettings::Save
Source code excerpt:
GConfig->SetFloat(TEXT("FoliageEdit"), TEXT("UnpaintDensity"), UnpaintDensity, GEditorPerProjectIni);
GConfig->SetBool(TEXT("FoliageEdit"), TEXT("bFilterLandscape"), bFilterLandscape, GEditorPerProjectIni);
GConfig->SetBool(TEXT("FoliageEdit"), TEXT("bFilterStaticMesh"), bFilterStaticMesh, GEditorPerProjectIni);
GConfig->SetBool(TEXT("FoliageEdit"), TEXT("bFilterBSP"), bFilterBSP, GEditorPerProjectIni);
GConfig->SetBool(TEXT("FoliageEdit"), TEXT("bFilterFoliage"), bFilterFoliage, GEditorPerProjectIni);
GConfig->SetBool(TEXT("FoliageEdit"), TEXT("bFilterTranslucent"), bFilterTranslucent, GEditorPerProjectIni);
GConfig->SetBool(TEXT("FoliageEdit"), TEXT("bShowPaletteItemDetails"), bShowPaletteItemDetails, GEditorPerProjectIni);
GConfig->SetBool(TEXT("FoliageEdit"), TEXT("bShowPaletteItemTooltips"), bShowPaletteItemTooltips, GEditorPerProjectIni);
#Loc: <Workspace>/Engine/Source/Editor/FoliageEdit/Private/FoliageEdMode.h:104
Scope (from outer to inner):
file
function bool GetFilterStaticMesh
Source code excerpt:
bool GetFilterLandscape() const { return bFilterLandscape ? true : false; }
void SetFilterLandscape(bool InbFilterLandscape) { bFilterLandscape = InbFilterLandscape; }
bool GetFilterStaticMesh() const { return bFilterStaticMesh ? true : false; }
void SetFilterStaticMesh(bool InbFilterStaticMesh) { bFilterStaticMesh = InbFilterStaticMesh; }
bool GetFilterBSP() const { return bFilterBSP ? true : false; }
void SetFilterBSP(bool InbFilterBSP) { bFilterBSP = InbFilterBSP; }
bool GetFilterFoliage() const { return bFilterFoliage; }
void SetFilterFoliage(bool InbFilterFoliage) { bFilterFoliage = InbFilterFoliage; }
bool GetFilterTranslucent() const { return bFilterTranslucent; }
void SetFilterTranslucent(bool InbFilterTranslucent) { bFilterTranslucent = InbFilterTranslucent; }
#Loc: <Workspace>/Engine/Source/Editor/FoliageEdit/Private/FoliageEdMode.h:169
Scope (from outer to inner):
file
function FFoliageUISettings
Source code excerpt:
, IsInSpawnInCurrentLevelMode(false)
, bFilterLandscape(true)
, bFilterStaticMesh(true)
, bFilterBSP(true)
, bFilterFoliage(false)
, bFilterTranslucent(false)
{
}
#Loc: <Workspace>/Engine/Source/Editor/FoliageEdit/Private/FoliageEdMode.h:212
Scope: file
Source code excerpt:
public:
bool bFilterLandscape;
bool bFilterStaticMesh;
bool bFilterBSP;
bool bFilterFoliage;
bool bFilterTranslucent;
};
#Loc: <Workspace>/Engine/Source/Editor/FoliageEdit/Private/FoliageEdMode.h:285
Scope (from outer to inner):
file
function FFoliagePaintingGeometryFilter
Source code excerpt:
FFoliagePaintingGeometryFilter(const FFoliageUISettings& InUISettings)
: bAllowLandscape(InUISettings.bFilterLandscape)
, bAllowStaticMesh(InUISettings.bFilterStaticMesh)
, bAllowBSP(InUISettings.bFilterBSP)
, bAllowFoliage(InUISettings.bFilterFoliage)
, bAllowTranslucent(InUISettings.bFilterTranslucent)
{
}