ModuleMenu_TypeDataToSpecificModuleRejections

ModuleMenu_TypeDataToSpecificModuleRejections

#Overview

name: ModuleMenu_TypeDataToSpecificModuleRejections

The value of this variable can be defined or overridden in .ini config files. 4 .ini config files referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of ModuleMenu_TypeDataToSpecificModuleRejections is to define mappings between module types and specific modules that should be rejected or excluded from the module menu in the Cascade particle system editor within Unreal Engine 5.

This setting variable is primarily used by the Cascade module, which is part of the Editor subsystem in Unreal Engine. Specifically, it’s utilized in the particle system editing functionality of Cascade.

The value of this variable is set through the UCascadeConfiguration class, which is a UObject-derived configuration class. It’s defined as an UPROPERTY with the EditAnywhere and config specifiers, allowing it to be edited in the editor and saved in configuration files.

This variable interacts closely with other configuration variables in the UCascadeConfiguration class, particularly ModuleMenu_ModuleRejections. While ModuleMenu_ModuleRejections defines a general list of modules to be rejected, ModuleMenu_TypeDataToSpecificModuleRejections provides more granular control by specifying rejections based on specific type data.

Developers must be aware that this variable affects the availability of modules in the Cascade editor’s menu system. It’s used to filter out incompatible or unwanted modules for specific type data, which can help streamline the user interface and prevent users from adding incompatible modules to particle systems.

Best practices when using this variable include:

  1. Carefully considering which modules should be rejected for each type data to maintain a balance between simplifying the UI and not overly restricting user options.
  2. Keeping the rejections list up-to-date as new modules are added or existing ones are modified.
  3. Documenting any changes made to this variable, as it can significantly impact the workflow of particle system designers.
  4. Testing thoroughly after making changes to ensure that all intended modules are still accessible and that no unintended restrictions are introduced.
  5. Considering the performance impact of large rejection lists, as the code iterates through this array when populating menus.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditor.ini:276, section: [/Script/Cascade.CascadeConfiguration]

Location: <Workspace>/Engine/Config/BaseEditor.ini:277, section: [/Script/Cascade.CascadeConfiguration]

Location: <Workspace>/Engine/Config/BaseEditor.ini:278, section: [/Script/Cascade.CascadeConfiguration]

Location: <Workspace>/Engine/Config/BaseEditor.ini:279, section: [/Script/Cascade.CascadeConfiguration]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/Cascade/Classes/CascadeConfiguration.h:41

Scope (from outer to inner):

file
class        class UCascadeConfiguration : public UObject

Source code excerpt:

	/** Module-to-TypeData mappings. */
	UPROPERTY(EditAnywhere, config, Category=Configure)
	TArray<struct FModuleMenuMapper> ModuleMenu_TypeDataToSpecificModuleRejections;

	/** Modules that Cascade should ignore in the menu system. */
	UPROPERTY(EditAnywhere, config, Category=Configure)
	TArray<FString> ModuleMenu_ModuleRejections;

	/** Returns true if the given module class name is valid for the type data class name. */

#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/Cascade.cpp:5408

Scope (from outer to inner):

file
function     void UCascadeConfiguration::CacheModuleRejections

Source code excerpt:

		}

		for (int32 TypeDataIndex = 0; TypeDataIndex < ModuleMenu_TypeDataToSpecificModuleRejections.Num(); ++TypeDataIndex)
		{
			FModuleMenuMapper& MenuMapper = ModuleMenu_TypeDataToSpecificModuleRejections[TypeDataIndex];
			FName TypeDataName = FName(*MenuMapper.ObjName);
			TSet<FName>& Rejections = TypeDataModuleRejections.FindOrAdd(TypeDataName);
			for (int32 ModuleIndex = 0; ModuleIndex < MenuMapper.InvalidObjNames.Num(); ++ModuleIndex)
			{
				Rejections.Add(FName(*MenuMapper.InvalidObjNames[ModuleIndex]));
			}

#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/CascadeEmitterCanvasClient.cpp:2306

Scope (from outer to inner):

file
function     bool FCascadeEmitterCanvasClient::IsModuleTypeDataPairSuitableForModuleMenu

Source code excerpt:


	FModuleMenuMapper* Mapper = NULL;
	for (int32 MapIndex = 0; MapIndex < EditorConfig->ModuleMenu_TypeDataToSpecificModuleRejections.Num(); MapIndex++)
	{
		if (EditorConfig->ModuleMenu_TypeDataToSpecificModuleRejections[MapIndex].ObjName == TDName)
		{
			Mapper = &(EditorConfig->ModuleMenu_TypeDataToSpecificModuleRejections[MapIndex]);
			break;
		}
	}

	if (Mapper)
	{