FilePickerClass

FilePickerClass

#Overview

name: FilePickerClass

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 FilePickerClass is to specify the class used for file selection in the Interchange system of Unreal Engine 5. This setting variable is part of the editor interface configuration and is used to determine which file picker implementation to use when selecting files for various operations within the engine.

FilePickerClass is primarily used by the Interchange system, which is responsible for importing and exporting assets in Unreal Engine. Based on the callsites, it’s utilized in the UnrealEd module and the Interchange Engine module.

The value of this variable is set in the InterchangeProjectSettings, which is a subclass of UDeveloperSettings. This means it can be configured through the project settings in the Unreal Editor.

FilePickerClass interacts with the InterchangeFilePickerBase class. It’s stored as a TSoftClassPtr, which allows for lazy loading of the class.

Developers should be aware that:

  1. This variable is only used with editor-only data (WITH_EDITORONLY_DATA).
  2. It’s important to ensure that the specified class is valid and inherits from UInterchangeFilePickerBase.
  3. The file picker is created dynamically when needed, using NewObject.

Best practices when using this variable include:

  1. Ensure that the specified class is compatible with the Interchange system’s requirements.
  2. Consider performance implications when changing the file picker class, as it may affect the user experience during file selection operations.
  3. Test thoroughly after changing this setting to ensure it works correctly with all relevant asset types and import/export operations.
  4. Document any custom file picker implementations to maintain consistency across the project.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:3501, section: [/Script/InterchangeEngine.InterchangeProjectSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/SkinWeightsUtilities.cpp:458

Scope (from outer to inner):

file
function     FString FSkinWeightsUtilities::PickSkinWeightPath

Source code excerpt:

		//In runtime we do not have any pipeline configurator
#if WITH_EDITORONLY_DATA
		TSoftClassPtr <UInterchangeFilePickerBase> FilePickerClass = InterchangeProjectSettings->FilePickerClass;
		if (FilePickerClass.IsValid())
		{
			UClass* FilePickerClassLoaded = FilePickerClass.LoadSynchronous();
			if (FilePickerClassLoaded)
			{
				FilePicker = NewObject<UInterchangeFilePickerBase>(GetTransientPackage(), FilePickerClassLoaded, NAME_None, RF_NoFlags);
			}
		}
#endif

#Loc: <Workspace>/Engine/Source/Runtime/Interchange/Engine/Private/InterchangeMeshUtilities.cpp:47

Scope (from outer to inner):

file
function     TFuture<bool> UInterchangeMeshUtilities::ImportCustomLod

Source code excerpt:

	//In runtime we do not have any pipeline configurator
#if WITH_EDITORONLY_DATA
	TSoftClassPtr <UInterchangeFilePickerBase> FilePickerClass = InterchangeProjectSettings->FilePickerClass;
	if (FilePickerClass.IsValid())
	{
		UClass* FilePickerClassLoaded = FilePickerClass.LoadSynchronous();
		if (FilePickerClassLoaded)
		{
			FilePicker = NewObject<UInterchangeFilePickerBase>(GetTransientPackage(), FilePickerClassLoaded, NAME_None, RF_NoFlags);
		}
	}
#endif

#Loc: <Workspace>/Engine/Source/Runtime/Interchange/Engine/Public/InterchangeProjectSettings.h:119

Scope (from outer to inner):

file
class        class UInterchangeProjectSettings : public UDeveloperSettings

Source code excerpt:

	/** This tells Interchange which file picker class to construct when we need to choose a file for a source. */
	UPROPERTY(EditAnywhere, config, Category = "EditorInterface")
	TSoftClassPtr <UInterchangeFilePickerBase> FilePickerClass;

	/**
	 * If enabled, both Interchange translators and the legacy import process smooth the edges of static meshes that don't contain smoothing information.
	 * If you have an older project that relies on leaving hard edges by default, you can disable this setting to preserve consistency with older assets.
	 */
	UPROPERTY(EditAnywhere, config, Category = "Generic|ImportSettings")