DefaultFilmbackPreset

DefaultFilmbackPreset

#Overview

name: DefaultFilmbackPreset

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 6 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of DefaultFilmbackPreset is to define the default filmback settings for cinematic cameras in Unreal Engine 5. This setting is primarily used in the cinematic camera system, which is part of the CinematicCamera module.

The CinematicCamera module relies on this setting variable, specifically within the UCineCameraComponent and UCineCameraSettings classes. These classes are responsible for managing camera properties and settings in cinematic-quality camera setups.

The value of this variable is set in the UCineCameraSettings class, which is a UDeveloperSettings subclass. It can be configured through project settings or programmatically using the SetDefaultFilmbackPreset function.

This variable interacts with other filmback-related variables and functions, such as FilmbackPresets and SetFilmbackPresetByNameInternal. It’s used to initialize the default filmback settings for cinematic camera components.

Developers must be aware that this variable has undergone changes in UE5.1. Previously, it was located in the UCineCameraComponent class, but it has been moved to UCineCameraSettings. There are deprecated properties that developers should avoid using in new code.

Best practices when using this variable include:

  1. Always access it through the UCineCameraSettings class.
  2. Use the provided setter function (SetDefaultFilmbackPreset) when modifying its value.
  3. Ensure that the specified preset name exists in the FilmbackPresets array.
  4. Be mindful of the deprecation notices and update any old code that might be referencing the deprecated locations of this variable.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:3341, section: [/Script/CinematicCamera.CineCameraSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/CinematicCamera/Private/CineCameraComponent.cpp:48

Scope (from outer to inner):

file
function     UCineCameraComponent::UCineCameraComponent

Source code excerpt:

	check(CineCameraSettings);
	// default filmback
	SetFilmbackPresetByNameInternal(CineCameraSettings->DefaultFilmbackPreset, Filmback);
	SetFilmbackPresetByNameInternal(CineCameraSettings->DefaultFilmbackPreset, FilmbackSettings_DEPRECATED);
	SetLensPresetByNameInternal(CineCameraSettings->DefaultLensPresetName);
	SetCropPresetByNameInternal(CineCameraSettings->DefaultCropPresetName);
	// other lens defaults
	CurrentAperture = CineCameraSettings->DefaultLensFStop;
	CurrentFocalLength = CineCameraSettings->DefaultLensFocalLength;

#Loc: <Workspace>/Engine/Source/Runtime/CinematicCamera/Private/CineCameraComponent.cpp:338

Scope (from outer to inner):

file
function     FString UCineCameraComponent::GetDefaultFilmbackPresetName

Source code excerpt:

	if (const UCineCameraSettings* CineCameraSettings = GetDefault<UCineCameraSettings>())
	{
		return CineCameraSettings->DefaultFilmbackPreset;
	}
	return FString();
}

void UCineCameraComponent::SetFilmbackPresetByName(const FString& InPresetName)
{

#Loc: <Workspace>/Engine/Source/Runtime/CinematicCamera/Private/CineCameraSettings.cpp:77

Scope (from outer to inner):

file
function     void UCineCameraSettings::SetDefaultFilmbackPreset

Source code excerpt:

void UCineCameraSettings::SetDefaultFilmbackPreset(const FString InDefaultFilmbackPreset)
{
	DefaultFilmbackPreset = InDefaultFilmbackPreset;
	SaveConfig();
}

void UCineCameraSettings::SetFilmbackPresets(const TArray<FNamedFilmbackPreset>& InFilmbackPresets)
{
	FilmbackPresets = InFilmbackPresets;

#Loc: <Workspace>/Engine/Source/Runtime/CinematicCamera/Private/CineCameraSettings.cpp:255

Scope (from outer to inner):

file
function     void UCineCameraSettings::CopyOldConfigSettings

Source code excerpt:


	FString OldDefaultFilmbackPreset;
	if (GConfig->GetString(*CineCameraConfigSection, TEXT("DefaultFilmbackPreset"), OldDefaultFilmbackPreset, GEngineIni))
	{
		GConfig->SetString(*SettingsConfigSection, TEXT("DefaultFilmbackPreset"), *OldDefaultFilmbackPreset, GEngineIni);
	}

	TArray<FString> OldFilmbackPresets;
	if (GConfig->GetArray(*CineCameraConfigSection, TEXT("FilmbackPresets"), OldFilmbackPresets, GEngineIni))
	{
		TArray<FString> CurrentFilmbackPresets;

#Loc: <Workspace>/Engine/Source/Runtime/CinematicCamera/Public/CineCameraComponent.h:216

Scope: file

Source code excerpt:

	TArray<FNamedLensPreset> LensPresets;

	/** Deprecated. See DefaultFilmbackPreset */
	UE_DEPRECATED(5.1, "This property has been removed and fully replaced by DefaultFilmbackPreset on the UCineCameraSettings object")
	UPROPERTY(config)
	FString DefaultFilmbackPresetName_DEPRECATED;

	/** Name of the default filmback preset */
	UE_DEPRECATED(5.1, "This property is now located on the UCineCameraSettings object")
	UPROPERTY(config)
	FString DefaultFilmbackPreset;

	/** Name of the default lens preset */
	UE_DEPRECATED(5.1, "This property is now located on the UCineCameraSettings object")
	UPROPERTY(config)
	FString DefaultLensPresetName;

#Loc: <Workspace>/Engine/Source/Runtime/CinematicCamera/Public/CineCameraSettings.h:297

Scope (from outer to inner):

file
class        class UCineCameraSettings : public UDeveloperSettings

Source code excerpt:

	/** Name of the default filmback preset */
	UPROPERTY(config, EditAnywhere, BlueprintReadWrite, BlueprintSetter=SetDefaultfilmbackPreset, Category=Filmback, meta=(GetOptions=GetFilmbackPresetNames))
	FString DefaultFilmbackPreset;

	/** List of available filmback presets */
	UPROPERTY(config, EditAnywhere, BlueprintReadWrite, BlueprintSetter=SetFilmbackPresets, Category=Filmback, meta=(TitleProperty=Name))
	TArray<FNamedFilmbackPreset> FilmbackPresets;

	/** Name of the default crop preset */