bHideUnusedConnectorsSetting
bHideUnusedConnectorsSetting
#Overview
name: bHideUnusedConnectorsSetting
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 bHideUnusedConnectorsSetting is to control the visibility of unused connectors in the Material Editor interface within Unreal Engine 5.
This setting variable is primarily used by the Material Editor subsystem, which is part of the Unreal Engine’s editor tools. It’s specifically referenced in the MaterialEditor module.
The value of this variable is set in the Material Editor options. It can be loaded from and saved to the editor settings, as seen in the LoadEditorSettings and SaveEditorSettings functions in MaterialEditor.cpp.
bHideUnusedConnectorsSetting interacts with other Material Editor settings, such as bShowGrid, bRealtimeMaterialViewport, and bAlwaysRefreshAllPreviews. It’s part of a group of settings that control the Material Editor’s behavior and appearance.
Developers should be aware that this setting affects the visual representation of materials in the editor. When enabled, it hides connectors that are not connected to anything, which can help reduce visual clutter in complex material graphs.
Best practices for using this variable include:
- Consider enabling it for large, complex materials to improve readability.
- Be cautious when disabling it, as it might make it harder to spot unused connections that could be optimized or removed.
- Remember that this setting is a user preference and should be respected when developing tools or plugins that interact with the Material Editor.
- When writing documentation or tutorials for material creation, mention this setting as it can significantly affect the appearance of material graphs in screenshots or videos.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:484, 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:2493
Scope (from outer to inner):
file
function void FMaterialEditor::LoadEditorSettings
Source code excerpt:
EditorOptions = NewObject<UMaterialEditorOptions>();
if (EditorOptions->bHideUnusedConnectorsSetting) {OnHideConnectors();}
if (bLivePreview != EditorOptions->bLivePreviewUpdate)
{
ToggleLivePreview();
}
if (EditorOptions->bAlwaysRefreshAllPreviews) {OnAlwaysRefreshAllPreviews();}
if (EditorOptions->bRealtimeExpressionViewport) {ToggleRealTimeExpressions();}
#Loc: <Workspace>/Engine/Source/Editor/MaterialEditor/Private/MaterialEditor.cpp:2536
Scope (from outer to inner):
file
function void FMaterialEditor::SaveEditorSettings
Source code excerpt:
EditorOptions->bShowGrid = PreviewViewport->IsTogglePreviewGridChecked();
EditorOptions->bRealtimeMaterialViewport = PreviewViewport->IsRealtime();
EditorOptions->bHideUnusedConnectorsSetting = IsOnHideConnectorsChecked();
EditorOptions->bAlwaysRefreshAllPreviews = IsOnAlwaysRefreshAllPreviews();
EditorOptions->bRealtimeExpressionViewport = IsToggleRealTimeExpressionsChecked();
EditorOptions->bLivePreviewUpdate = IsToggleLivePreviewChecked();
EditorOptions->bHideUnrelatedNodes = bHideUnrelatedNodes;
EditorOptions->SaveConfig();
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/MaterialEditorOptions.h:24
Scope (from outer to inner):
file
class class UMaterialEditorOptions : public UObject
Source code excerpt:
/** 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. */
UPROPERTY(EditAnywhere, config, Category=Options)
uint32 bRealtimeMaterialViewport:1;
/** If true, the linked object viewport updates in realtime. */