modeling.EnablePrototypes

modeling.EnablePrototypes

#Overview

name: modeling.EnablePrototypes

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 modeling.EnablePrototypes is to enable unsupported experimental prototype Modeling Tools in the Unreal Engine editor. This setting variable is primarily used for the modeling system within the engine.

The Unreal Engine subsystem that relies on this setting variable is the ModelingToolsEditorMode plugin, specifically the ModelingToolsEditorModeToolkit module. This can be seen from the file path where the variable is defined and used.

The value of this variable is set as a console variable (CVar) with an initial value of 0, meaning it’s disabled by default. Developers can change this value at runtime or through configuration files.

This variable interacts directly with its associated variable CVarEnablePrototypeModelingTools. They share the same value and purpose.

Developers must be aware that enabling this variable will expose unsupported and experimental prototype modeling tools in the editor. These tools may be unstable, incomplete, or subject to significant changes in future updates.

Best practices when using this variable include:

  1. Only enable it in development environments, not in production builds.
  2. Be prepared for potential instability or unexpected behavior when using the prototype tools.
  3. Regularly check for updates to these tools as they may evolve rapidly.
  4. Provide feedback to the Unreal Engine team about any issues or improvements for these prototype tools.

Regarding the associated variable CVarEnablePrototypeModelingTools:

The purpose of CVarEnablePrototypeModelingTools is identical to modeling.EnablePrototypes. It’s an internal representation of the console variable within the C++ code.

This variable is used directly in the ModelingToolsEditorModeToolkit to determine whether to add the Prototypes tab to the tool palette. When the value is greater than 0, the Prototypes tab is added to the list of palette names.

The value of this variable is set through the console variable system and can be queried using GetValueOnGameThread().

Developers should be aware that this variable directly controls the visibility of prototype modeling tools in the editor interface. Changing its value at runtime will affect the available tools in the modeling mode.

Best practices for using CVarEnablePrototypeModelingTools include:

  1. Use it for debugging and development purposes only.
  2. Be cautious when enabling it in shared development environments, as it may affect other team members.
  3. Document any use of prototype tools enabled by this variable, as they may not be available or may behave differently in future engine versions.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Editor/ModelingToolsEditorMode/Source/ModelingToolsEditorMode/Private/ModelingToolsEditorModeToolkit.cpp:72

Scope: file

Source code excerpt:

// if set to 1, then on mode initialization we include buttons for prototype modeling tools
static TAutoConsoleVariable<int32> CVarEnablePrototypeModelingTools(
	TEXT("modeling.EnablePrototypes"),
	0,
	TEXT("Enable unsupported Experimental prototype Modeling Tools"));
static TAutoConsoleVariable<int32> CVarEnablePolyModeling(
	TEXT("modeling.EnablePolyModel"),
	0,
	TEXT("Enable prototype PolyEdit tab"));

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Plugins/Editor/ModelingToolsEditorMode/Source/ModelingToolsEditorMode/Private/ModelingToolsEditorModeToolkit.cpp:71

Scope: file

Source code excerpt:


// if set to 1, then on mode initialization we include buttons for prototype modeling tools
static TAutoConsoleVariable<int32> CVarEnablePrototypeModelingTools(
	TEXT("modeling.EnablePrototypes"),
	0,
	TEXT("Enable unsupported Experimental prototype Modeling Tools"));
static TAutoConsoleVariable<int32> CVarEnablePolyModeling(
	TEXT("modeling.EnablePolyModel"),
	0,

#Loc: <Workspace>/Engine/Plugins/Editor/ModelingToolsEditorMode/Source/ModelingToolsEditorMode/Private/ModelingToolsEditorModeToolkit.cpp:1733

Scope (from outer to inner):

file
function     void FModelingToolsEditorModeToolkit::GetToolPaletteNames

Source code excerpt:

	}

	bool bEnablePrototypes = (CVarEnablePrototypeModelingTools.GetValueOnGameThread() > 0);
	if (bEnablePrototypes)
	{
		PaletteNames.Add(PrototypesTabName);
		ExistingNames.Add(PrototypesTabName);
	}