Collections.MaxCLDescriptionPathCount

Collections.MaxCLDescriptionPathCount

#Overview

name: Collections.MaxCLDescriptionPathCount

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of Collections.MaxCLDescriptionPathCount is to set the maximum number of paths reported in a changelist when checking in a collection that adds or removes entries. This setting variable is primarily used in the Collection Management system of Unreal Engine.

This setting variable is relied upon by the CollectionManager module, specifically within the collection check-in process. It’s used to limit the number of paths listed in the changelist description when making changes to a collection.

The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 1000 but can be modified at runtime or through configuration files.

The associated variable CVarCollectionsMaxCLDescriptionPathCount directly interacts with Collections.MaxCLDescriptionPathCount. They share the same value and purpose.

Developers must be aware that this variable affects the verbosity of changelist descriptions. If set too low, it might omit important information about changes made to collections. If set too high, it could potentially create overly long and unwieldy changelist descriptions.

Best practices when using this variable include:

  1. Adjusting the value based on the project’s needs and the typical size of collection changes.
  2. Monitoring the impact on version control system performance and readability of changelists.
  3. Considering the balance between comprehensive change documentation and manageable changelist sizes.

Regarding the associated variable CVarCollectionsMaxCLDescriptionPathCount:

The purpose of CVarCollectionsMaxCLDescriptionPathCount is identical to Collections.MaxCLDescriptionPathCount. It’s the actual console variable that controls the behavior described above.

This variable is part of the CollectionManager module and is used in the collection check-in process.

The value is set using the TAutoConsoleVariable template, which allows for runtime modification of the variable.

It directly interacts with the Collections.MaxCLDescriptionPathCount setting, as they represent the same concept.

Developers should be aware that changes to this variable will immediately affect the behavior of collection check-ins.

Best practices for using CVarCollectionsMaxCLDescriptionPathCount include:

  1. Using it for debugging or performance tuning purposes.
  2. Documenting any non-default values used in the project.
  3. Considering the implications on source control and code review processes when modifying this value.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Developer/CollectionManager/Private/Collection.cpp:24

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarCollectionsMaxCLDescriptionPathCount(
	TEXT("Collections.MaxCLDescriptionPathCount"),
	1000,
	TEXT("Sets the maximum number of paths reported in a changelist when checking in a collection that adds or removes entries."),
	ECVF_Default);

struct FCollectionUtils
{

#Associated Variable and Callsites

This variable is associated with another variable named CVarCollectionsMaxCLDescriptionPathCount. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Developer/CollectionManager/Private/Collection.cpp:23

Scope: file

Source code excerpt:

#define LOCTEXT_NAMESPACE "CollectionManager"

static TAutoConsoleVariable<int32> CVarCollectionsMaxCLDescriptionPathCount(
	TEXT("Collections.MaxCLDescriptionPathCount"),
	1000,
	TEXT("Sets the maximum number of paths reported in a changelist when checking in a collection that adds or removes entries."),
	ECVF_Default);

struct FCollectionUtils

#Loc: <Workspace>/Engine/Source/Developer/CollectionManager/Private/Collection.cpp:966

Scope (from outer to inner):

file
function     bool FCollection::CheckinCollection
lambda-function

Source code excerpt:

			auto AddFileListToDescription = [&ChangelistDescBuilder](const TArray<FSoftObjectPath>& Paths)
			{
				const int32 MaxPaths = CVarCollectionsMaxCLDescriptionPathCount.GetValueOnAnyThread();
				const int32 ReportedPaths = FMath::Min(Paths.Num(), MaxPaths);
				const int32 UnreportedPaths = FMath::Max(0, Paths.Num() - MaxPaths);
				for (int32 PathIdx = 0; PathIdx < ReportedPaths; ++PathIdx)
				{
					const FSoftObjectPath& AddedObjectName = Paths[PathIdx];
					ChangelistDescBuilder.AppendLine(FText::FromString(AddedObjectName.ToString()));