ContentImportSettings

ContentImportSettings

#Overview

name: ContentImportSettings

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 ContentImportSettings is to manage and configure import settings for content in Unreal Engine 5. This variable is part of the Interchange system, which handles importing various types of assets into the engine.

ContentImportSettings is primarily used by the Interchange subsystem within Unreal Engine 5. It is specifically related to the Engine module of the Interchange system, as evidenced by its location in the InterchangeProjectSettings class.

The value of this variable is set in the UInterchangeProjectSettings class, which inherits from UDeveloperSettings. This means it can be configured through the project settings interface in the Unreal Editor.

ContentImportSettings interacts with several other variables and functions:

  1. It’s used in conjunction with SceneImportSettings to differentiate between content and scene imports.
  2. It contains a DefaultPipelineStackOverride map, which is used to determine the default pipeline stack for different asset types.
  3. It includes a ShowImportDialogOverride map, which controls whether to show import dialogs for specific asset types.

Developers should be aware of the following when using this variable:

  1. It affects the behavior of content imports across the entire project.
  2. Changes to this variable can impact the default pipeline stacks used for different asset types.
  3. It can control whether import dialogs are shown for specific asset types.

Best practices when using this variable include:

  1. Carefully consider the implications of changing default pipeline stacks or import dialog behaviors.
  2. Use the GetImportSettings and GetMutableImportSettings functions to access and modify these settings, rather than directly accessing the variable.
  3. When making changes, use the SaveConfig method to ensure the changes are persisted.
  4. Be aware of the different asset types (EInterchangeTranslatorAssetType) when configuring overrides.
  5. Consider the needs of your project and team when configuring these settings to streamline the import process.

#Setting Variables

#References In INI files

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

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Interchange/Engine/Private/InterchangeProjectSettings.cpp:12

Scope (from outer to inner):

file
function     const FInterchangeImportSettings& FInterchangeProjectSettingsUtils::GetImportSettings

Source code excerpt:

	else
	{
		return InterchangeProjectSettings.ContentImportSettings;
	}
}

FInterchangeImportSettings& FInterchangeProjectSettingsUtils::GetMutableImportSettings(UInterchangeProjectSettings& InterchangeProjectSettings, const bool bIsSceneImport)
{
	if (bIsSceneImport)

#Loc: <Workspace>/Engine/Source/Runtime/Interchange/Engine/Private/InterchangeProjectSettings.cpp:24

Scope (from outer to inner):

file
function     FInterchangeImportSettings& FInterchangeProjectSettingsUtils::GetMutableImportSettings

Source code excerpt:

	else
	{
		return InterchangeProjectSettings.ContentImportSettings;
	}
}

const FInterchangeImportSettings& FInterchangeProjectSettingsUtils::GetDefaultImportSettings(const bool bIsSceneImport)
{
	return GetImportSettings(*GetDefault<UInterchangeProjectSettings>(), bIsSceneImport);

#Loc: <Workspace>/Engine/Source/Runtime/Interchange/Engine/Private/InterchangeProjectSettings.cpp:52

Scope (from outer to inner):

file
function     FName FInterchangeProjectSettingsUtils::GetDefaultPipelineStackName

Source code excerpt:

			EInterchangeTranslatorAssetType SupportedAssetTypes = Translator->GetSupportedAssetTypes();

			const FInterchangeContentImportSettings& ContentImportSettings = GetDefault<UInterchangeProjectSettings>()->ContentImportSettings;
			for (TMap<EInterchangeTranslatorAssetType, FName>::TConstIterator StackOverridesIt = ContentImportSettings.DefaultPipelineStackOverride.CreateConstIterator(); StackOverridesIt; ++StackOverridesIt)
			{
				if ((SupportedAssetTypes ^ StackOverridesIt->Key) < StackOverridesIt->Key)
				{
					DefaultPipelineStack = StackOverridesIt->Value;
					break;
				}

#Loc: <Workspace>/Engine/Source/Runtime/Interchange/Engine/Private/InterchangeProjectSettings.cpp:87

Scope (from outer to inner):

file
function     void FInterchangeProjectSettingsUtils::SetDefaultPipelineStackName

Source code excerpt:

			EInterchangeTranslatorAssetType SupportedAssetTypes = Translator->GetSupportedAssetTypes();

			FInterchangeContentImportSettings& ContentImportSettings = GetMutableDefault<UInterchangeProjectSettings>()->ContentImportSettings;
			for (TMap<EInterchangeTranslatorAssetType, FName>::TIterator StackOverridesIt = ContentImportSettings.DefaultPipelineStackOverride.CreateIterator(); StackOverridesIt; ++StackOverridesIt)
			{
				if ((SupportedAssetTypes ^ StackOverridesIt->Key) < StackOverridesIt->Key)
				{
					//Update the override stack name and save the config
					StackOverridesIt->Value = StackName;
					GetMutableDefault<UInterchangeProjectSettings>()->SaveConfig();

#Loc: <Workspace>/Engine/Source/Runtime/Interchange/Engine/Private/InterchangeProjectSettings.cpp:124

Scope (from outer to inner):

file
function     bool FInterchangeProjectSettingsUtils::ShouldShowPipelineStacksConfigurationDialog

Source code excerpt:

			bool bFoundOverride = false;
			bool bShowFromOverrideStack = false;
			const FInterchangeContentImportSettings& ContentImportSettings = GetDefault<UInterchangeProjectSettings>()->ContentImportSettings;
			for (const TPair<EInterchangeTranslatorAssetType, FInterchangeDialogOverride>& ShowImportDialog : ContentImportSettings.ShowImportDialogOverride)
			{
				if ((ShowImportDialog.Key == EInterchangeTranslatorAssetType::None && SupportedAssetTypes == EInterchangeTranslatorAssetType::None)
					|| (static_cast<uint8>(ShowImportDialog.Key & SupportedAssetTypes) > 0))
				{
					//Look if there is a per translator override
					const FInterchangeDialogOverride& InterchangeDialogOverride = ShowImportDialog.Value;

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

Scope (from outer to inner):

file
class        class UInterchangeProjectSettings : public UDeveloperSettings

Source code excerpt:

	 */
	UPROPERTY(EditAnywhere, config, Category = "ImportContent")
	FInterchangeContentImportSettings ContentImportSettings;

	/**
	 * Settings used when importing into a level.
	 */
	UPROPERTY(EditAnywhere, config, Category = "ImportIntoLevel")
	FInterchangeImportSettings SceneImportSettings;