WaveformColor
WaveformColor
#Overview
name: WaveformColor
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 WaveformColor is to define the color of the waveform display in the Waveform Editor plugin for Unreal Engine 5. This setting variable is used to customize the visual appearance of audio waveforms in the editor interface.
The WaveformColor variable is primarily used by the Waveform Editor plugin, specifically within the WaveformEditorWidgets module. This plugin is designed to provide visual tools for editing and analyzing audio waveforms within the Unreal Engine editor.
The value of this variable is set in the UWaveformEditorWidgetsSettings class, which is derived from UDeveloperSettings. It is initialized with a default value of FLinearColor::White in the constructor of UWaveformEditorWidgetsSettings.
WaveformColor interacts with several other variables in the Waveform Editor settings, such as:
- WaveformBackgroundColor: Sets the background color of the waveform viewer
- WaveformLineThickness: Determines the thickness of the waveform line
- SampleMarkersSize: Defines the size of sample markers in the waveform display
Developers should be aware that changes to this variable will affect the visual representation of audio waveforms in the editor. It’s important to choose a color that provides good contrast with the WaveformBackgroundColor for optimal visibility.
Best practices when using this variable include:
- Selecting a color that contrasts well with the background for clear visibility
- Considering color-blind accessibility when choosing the waveform color
- Using the config and EditAnywhere attributes to allow easy customization in the editor settings
- Updating the waveform viewer style when this setting is changed, as demonstrated in the OnWidgetSettingsUpdated function
By following these practices, developers can ensure that the waveform display is both visually appealing and functional for all users of the Waveform Editor plugin.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Config/BaseWaveformEditor.ini:3, section: [/Script/WaveformEditorWidgets.WaveformEditorWidgetsSettings]
- INI Section:
/Script/WaveformEditorWidgets.WaveformEditorWidgetsSettings
- Raw value:
(R=1.000000,G=1.000000,B=1.000000,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:79
Scope (from outer to inner):
file
function void FWaveformEditorStyle::OnWidgetSettingsUpdated
Source code excerpt:
check(Settings)
if (PropertyName == GET_MEMBER_NAME_CHECKED(UWaveformEditorWidgetsSettings, WaveformColor))
{
CreateWaveformViewerStyleFromSettings(*Settings);
}
else if (PropertyName == GET_MEMBER_NAME_CHECKED(UWaveformEditorWidgetsSettings, WaveformBackgroundColor))
{
CreateWaveformViewerStyleFromSettings(*Settings);
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorStyle.cpp:151
Scope: file
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)
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorWidgetsSettings.cpp:5
Scope (from outer to inner):
file
function UWaveformEditorWidgetsSettings::UWaveformEditorWidgetsSettings
Source code excerpt:
: Super(ObjectInitializer)
, PlayheadColor(FLinearColor(255.f, 0.1f, 0.2f, 1.f))
, WaveformColor(FLinearColor::White)
, 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))
#Loc: <Workspace>/Engine/Plugins/Editor/WaveformEditor/Source/WaveformEditorWidgets/Private/WaveformEditorWidgetsSettings.h:36
Scope (from outer to inner):
file
class class UWaveformEditorWidgetsSettings : public UDeveloperSettings
Source code excerpt:
UPROPERTY(config, EditAnywhere, Category = "Waveform Viewer")
FLinearColor WaveformColor;
UPROPERTY(config, EditAnywhere, Category = "Waveform Viewer", Meta = (ClampMin = "1", ClampMax = "10"))
float WaveformLineThickness;
UPROPERTY(config, EditAnywhere, Category = "Waveform Viewer", Meta = (ClampMin = "0", ClampMax = "30"))
float SampleMarkersSize;