ExpandDistributions

ExpandDistributions

#Overview

name: ExpandDistributions

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 ExpandDistributions is to control the automatic expansion of distribution structs in the Unreal Engine property editor. This setting is part of the property editing system, which is used for displaying and editing object properties in the Unreal Editor.

This setting variable is primarily used in the PropertyEditor module, which is responsible for rendering and managing property windows in the Unreal Editor. It specifically affects how certain struct types (RawDistributionFloat and RawDistributionVector) are displayed in property windows.

The value of this variable is set in the constructor of FPropertySettings, which reads the value from the GEditorPerProjectIni configuration file under the “PropertySettings” section.

ExpandDistributions interacts with other property-related settings such as ShowHiddenProperties and ShowFriendlyPropertyNames, which are part of the same FPropertySettings class.

Developers must be aware that this variable affects the default expansion state of distribution structs in property windows. When set to false, it triggers the auto-expansion of these structs, which may impact the user experience when working with objects that contain these types of properties.

Best practices when using this variable include:

  1. Consider the impact on editor performance and usability when changing this setting.
  2. Ensure consistency across team members by managing this setting at the project level rather than individual editor preferences.
  3. Document any custom behavior that relies on this setting to avoid confusion for other team members or future maintainers.
  4. Be cautious when modifying this setting, as it may affect existing workflows for designers and artists working with particle systems or other features that use distribution structs.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:476, section: [PropertySettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/PropertyEditor/Private/ItemPropertyNode.cpp:365

Scope (from outer to inner):

file
function     void FItemPropertyNode::InitChildNodes

Source code excerpt:

			AddChildNode(NewItemNode);

			if ( FPropertySettings::Get().ExpandDistributions() == false)
			{
				// auto-expand distribution structs
				if ( CastField<FObjectProperty>(StructMember) || CastField<FWeakObjectProperty>(StructMember) || CastField<FLazyObjectProperty>(StructMember) || CastField<FSoftObjectProperty>(StructMember) )
				{
					const FName StructName = StructProperty->Struct->GetFName();
					if (StructName == NAME_RawDistributionFloat || StructName == NAME_RawDistributionVector)

#Loc: <Workspace>/Engine/Source/Editor/PropertyEditor/Private/PropertyNode.cpp:45

Scope (from outer to inner):

file
function     FPropertySettings::FPropertySettings

Source code excerpt:

	GConfig->GetBool(TEXT("PropertySettings"), TEXT("ShowHiddenProperties"), bShowHiddenProperties, GEditorPerProjectIni);
	GConfig->GetBool(TEXT("PropertySettings"), TEXT("ShowFriendlyPropertyNames"), bShowFriendlyPropertyNames, GEditorPerProjectIni);
	GConfig->GetBool(TEXT("PropertySettings"), TEXT("ExpandDistributions"), bExpandDistributions, GEditorPerProjectIni);
}

DEFINE_LOG_CATEGORY(LogPropertyNode);

static FObjectPropertyNode* NotifyFindObjectItemParent(FPropertyNode* InNode)
{

#Loc: <Workspace>/Engine/Source/Editor/PropertyEditor/Private/PropertyNode.h:89

Scope (from outer to inner):

file
class        class FPropertySettings
function     bool ExpandDistributions

Source code excerpt:

	bool ShowFriendlyPropertyNames() const { return bShowFriendlyPropertyNames; }
	bool ShowHiddenProperties() const { return bShowHiddenProperties; }
	bool ExpandDistributions() const { return bExpandDistributions; }
private:
	FPropertySettings();
private:
	bool bShowFriendlyPropertyNames;
	bool bExpandDistributions;
	bool bShowHiddenProperties;