bRealtimeExpressionViewport
bRealtimeExpressionViewport
#Overview
name: bRealtimeExpressionViewport
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 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bRealtimeExpressionViewport is to control real-time updates in the expression viewport of the Material Editor within Unreal Engine 5. This setting is specifically related to the Material editing system, which is a part of the engine’s rendering and asset creation pipeline.
The Material Editor module relies on this setting variable, as evidenced by its usage in the MaterialEditor.cpp file. This variable is part of the UMaterialEditorOptions class, which suggests it’s a user-configurable option for the Material Editor.
The value of this variable is set in two main ways:
- It can be loaded from saved editor settings (LoadEditorSettings function).
- It can be toggled by the user through the Material Editor interface (ToggleRealTimeExpressions function).
This variable interacts with other Material Editor settings, such as bAlwaysRefreshAllPreviews and bLivePreviewUpdate. These settings together control the behavior and performance of the Material Editor preview system.
Developers should be aware that enabling real-time expression viewport updates may impact performance, especially for complex materials. It’s a trade-off between immediate visual feedback and editor responsiveness.
Best practices when using this variable include:
- Enable it when working on complex expressions that benefit from immediate visual feedback.
- Disable it when working on performance-intensive materials to maintain editor responsiveness.
- Consider the target platform’s capabilities when deciding whether to keep this enabled during development.
- Use it in conjunction with other preview settings to optimize the material editing workflow.
Developers should also note that this setting is saved as part of the editor configuration, allowing for persistent preferences across editing sessions.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:486, section: [/Script/UnrealEd.MaterialEditorOptions]
- INI Section:
/Script/UnrealEd.MaterialEditorOptions
- Raw value:
False
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/MaterialEditor/Private/MaterialEditor.cpp:2499
Scope (from outer to inner):
file
function void FMaterialEditor::LoadEditorSettings
Source code excerpt:
}
if (EditorOptions->bAlwaysRefreshAllPreviews) {OnAlwaysRefreshAllPreviews();}
if (EditorOptions->bRealtimeExpressionViewport) {ToggleRealTimeExpressions();}
if ( PreviewViewport.IsValid() )
{
if (EditorOptions->bShowGrid)
{
PreviewViewport->TogglePreviewGrid();
#Loc: <Workspace>/Engine/Source/Editor/MaterialEditor/Private/MaterialEditor.cpp:2538
Scope (from outer to inner):
file
function void FMaterialEditor::SaveEditorSettings
Source code excerpt:
EditorOptions->bHideUnusedConnectorsSetting = IsOnHideConnectorsChecked();
EditorOptions->bAlwaysRefreshAllPreviews = IsOnAlwaysRefreshAllPreviews();
EditorOptions->bRealtimeExpressionViewport = IsToggleRealTimeExpressionsChecked();
EditorOptions->bLivePreviewUpdate = IsToggleLivePreviewChecked();
EditorOptions->bHideUnrelatedNodes = bHideUnrelatedNodes;
EditorOptions->SaveConfig();
}
GConfig->SetInt(TEXT("MaterialEditor"), TEXT("PrimType"), PreviewViewport->PreviewPrimType, GEditorPerProjectIni);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/MaterialEditorOptions.h:32
Scope (from outer to inner):
file
class class UMaterialEditorOptions : public UObject
Source code excerpt:
/** If true, the linked object viewport updates in realtime. */
UPROPERTY(EditAnywhere, config, Category=Options)
uint32 bRealtimeExpressionViewport:1;
/** If true, always refresh the material preview. */
UPROPERTY(EditAnywhere, config, Category = Options)
uint32 bLivePreviewUpdate : 1;
/** If true, fade nodes which are not connected to the selected nodes */