WaveformBackgroundColor
WaveformBackgroundColor
#Overview
name: WaveformBackgroundColor
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 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of WaveformBackgroundColor is to define the background color for the waveform viewer in the Unreal Engine 5 Waveform Editor plugin. This setting variable is specifically used for customizing the visual appearance of the waveform display in the editor.
The Unreal Engine subsystem that relies on this setting variable is the Waveform Editor plugin, particularly the WaveformEditorWidgets module. This can be seen from the file paths in the callsites, which are all within the WaveformEditor plugin directory.
The value of this variable is set in the UWaveformEditorWidgetsSettings constructor, as seen in the WaveformEditorWidgetsSettings.cpp file. It is initialized with a default value of FLinearColor(0.02f, 0.02f, 0.02f, 1.f), which represents a very dark gray color.
This variable interacts with other styling variables for the waveform viewer, such as WaveformColor, WaveformLineThickness, and SampleMarkersSize. Together, these variables define the overall appearance of the waveform display.
Developers should be aware that changes to this variable will affect the visual contrast between the waveform and its background. It’s important to choose a color that provides good visibility for the waveform while maintaining a comfortable viewing experience for users.
Best practices when using this variable include:
- Ensuring sufficient contrast between the background color and the waveform color for clear visibility.
- Considering the overall color scheme of the editor to maintain visual consistency.
- Testing different color values to find the optimal balance between aesthetics and functionality.
- Using the UWaveformEditorWidgetsSettings class to modify this value programmatically if needed.
- Being mindful of color accessibility guidelines to ensure the waveform viewer is usable for all users, including those with color vision deficiencies.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Config/BaseWaveformEditor.ini:4, section: [/Script/WaveformEditorWidgets.WaveformEditorWidgetsSettings]
- INI Section:
/Script/WaveformEditorWidgets.WaveformEditorWidgetsSettings
- Raw value:
(R=0.017642,G=0.017642,B=0.017642,A=1.000000)
- 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/WaveformEditorStyle.cpp:83
Scope (from outer to inner):
file
function void FWaveformEditorStyle::OnWidgetSettingsUpdated
Source code excerpt:
CreateWaveformViewerStyleFromSettings(*Settings);
}
else if (PropertyName == GET_MEMBER_NAME_CHECKED(UWaveformEditorWidgetsSettings, WaveformBackgroundColor))
{
CreateWaveformViewerStyleFromSettings(*Settings);
}
else if (PropertyName == GET_MEMBER_NAME_CHECKED(UWaveformEditorWidgetsSettings, WaveformLineThickness))
{
CreateWaveformViewerStyleFromSettings(*Settings);
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorStyle.cpp:152
Scope (from outer to inner):
file
function FSampledSequenceViewerStyle FWaveformEditorStyle::CreateWaveformViewerStyleFromSettings
Source code excerpt:
FSampledSequenceViewerStyle WaveViewerStyle = FSampledSequenceViewerStyle()
.SetSequenceColor(InSettings.WaveformColor)
.SetBackgroundColor(InSettings.WaveformBackgroundColor)
.SetSequenceLineThickness(InSettings.WaveformLineThickness)
.SetSampleMarkersSize(InSettings.SampleMarkersSize)
.SetMajorGridLineColor(InSettings.MajorGridColor)
.SetMinorGridLineColor(InSettings.MinorGridColor)
.SetZeroCrossingLineColor(InSettings.LoudnessGridColor)
.SetZeroCrossingLineThickness(InSettings.ZeroCrossingLineThickness);
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorWidgetsSettings.cpp:8
Scope (from outer to inner):
file
function UWaveformEditorWidgetsSettings::UWaveformEditorWidgetsSettings
Source code excerpt:
, WaveformLineThickness(1.f)
, SampleMarkersSize(2.5f)
, WaveformBackgroundColor(FLinearColor(0.02f, 0.02f, 0.02f, 1.f))
, ZeroCrossingLineThickness(1.f)
, MajorGridColor(FLinearColor::Black)
, MinorGridColor(FLinearColor(0.f, 0.f, 0.f, 0.5f))
, RulerBackgroundColor(FLinearColor::Black)
, RulerTicksColor(FLinearColor(1.f, 1.f, 1.f, 0.9f))
, RulerTextColor(FLinearColor(1.f, 1.f, 1.f, 0.9f))
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorWidgetsSettings.h:45
Scope (from outer to inner):
file
class class UWaveformEditorWidgetsSettings : public UDeveloperSettings
Source code excerpt:
UPROPERTY(config, EditAnywhere, Category = "Waveform Viewer")
FLinearColor WaveformBackgroundColor;
UPROPERTY(config, EditAnywhere, Category = "Waveform Viewer", Meta = (ClampMin = "1", ClampMax = "10"))
float ZeroCrossingLineThickness;
UPROPERTY(config, EditAnywhere, Category = "Waveform Viewer")
FLinearColor MajorGridColor;